pax_global_header00006660000000000000000000000064146526705430014526gustar00rootroot0000000000000052 comment=c6a9925ff5344d5fb5908d149e5ae35291836402 golang-github-ionos-cloud-sdk-go-6.2.0/000077500000000000000000000000001465267054300176755ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/.gitbook.yaml000066400000000000000000000001001465267054300222640ustar00rootroot00000000000000root: docs structure: readme: README.md summary: summary.md golang-github-ionos-cloud-sdk-go-6.2.0/.github/000077500000000000000000000000001465267054300212355ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/.github/IONOS.CLOUD.BLU.svg000066400000000000000000000064721465267054300241440ustar00rootroot00000000000000IONOS.CLOUD Blugolang-github-ionos-cloud-sdk-go-6.2.0/.github/ISSUE_TEMPLATE/000077500000000000000000000000001465267054300234205ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000020301465267054300261050ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve title: '' labels: bug assignees: LiviusP --- ## Description ## Expected behavior ## Environment GO version: ``` ``` SDK version: ``` ``` OS: ``` ``` ## Configuration Files ## How to Reproduce ## Error and Debug Output ## Additional Notes ## References golang-github-ionos-cloud-sdk-go-6.2.0/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000002161465267054300254070ustar00rootroot00000000000000blank_issues_enabled: false contact_links: - name: IONOS Cloud API url: https://devops.ionos.com/api/ about: View API documentation golang-github-ionos-cloud-sdk-go-6.2.0/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000032421465267054300271460ustar00rootroot00000000000000--- name: Feature request about: Suggest an idea for this project title: '' labels: enhancement assignees: LiviusP --- ### Current SDK Version ``` ... ``` ### Use-cases ### Attempted Solutions ### Proposal ### References golang-github-ionos-cloud-sdk-go-6.2.0/.github/workflows/000077500000000000000000000000001465267054300232725ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/.github/workflows/build.yml000066400000000000000000000011301465267054300251070ustar00rootroot00000000000000name: Build on: workflow_dispatch: push: branches: - master pull_request: types: [opened, synchronize, reopened] jobs: sonarcloud: name: SonarCloud runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} golang-github-ionos-cloud-sdk-go-6.2.0/.github/workflows/issue-creation.yml000066400000000000000000000054751465267054300267620ustar00rootroot00000000000000name: Issue Creation Tracker on: issues: types: [ opened, reopened ] jobs: build: runs-on: ubuntu-latest steps: - name: Git Issue Details run: | echo "Issue creator: ${{ github.event.issue.user.login }}" echo "Issue title: ${{ github.event.issue.title }}" echo "Issue number: ${{ github.event.issue.number }}" echo "Issue url: ${{ github.event.issue.html_url }}" - name: Google Chat Notification run: | curl --location --request POST '${{ secrets.ISSUE_TRACKER_WEBHOOK }}' \ --header 'Content-Type: application/json' \ --data-raw '{ "cards": [ { "header": { "title": "New Issue 🔨", "subtitle": "Issue No: #${{ github.event.issue.number }}" }, "sections": [ { "widgets": [ { "keyValue": { "topLabel": "Repository", "content": "${{ github.repository }}" }, }, { "keyValue": { "topLabel": "Title", "content": "${{ github.event.issue.title }}" } }, { "keyValue": { "topLabel": "Assigned Labels", "content": "- ${{ join(github.event.issue.labels.*.name) }}" } }, { "buttons": [ { "textButton": { "text": "OPEN ISSUE", "onClick": { "openLink": { "url": "${{ github.event.issue.html_url }}" } } } } ] } ] } ] } ] }' golang-github-ionos-cloud-sdk-go-6.2.0/.gitignore000066400000000000000000000004211465267054300216620ustar00rootroot00000000000000# Compiled Object files, Static and Dynamic libs (Shared Objects) *.o *.a *.so # Folders _obj _test .idea/ # Architecture specific extensions/prefixes *.[568vq] [568vq].out *.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* _testmain.go *.exe *.test *.prof golang-github-ionos-cloud-sdk-go-6.2.0/.travis.yml000066400000000000000000000001071465267054300220040ustar00rootroot00000000000000language: go install: - go get -d -v . script: - go build -v ./ golang-github-ionos-cloud-sdk-go-6.2.0/LICENSE000066400000000000000000000247751465267054300207210ustar00rootroot00000000000000 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 Copyright 2021 IONOS 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.golang-github-ionos-cloud-sdk-go-6.2.0/README.md000066400000000000000000002152141465267054300211610ustar00rootroot00000000000000![CI](https://github.com/ionos-cloud/sdk-resources/workflows/%5B%20CI%20%5D%20CloudApi%20V6%20/%20Go/badge.svg) [![Gitter](https://img.shields.io/gitter/room/ionos-cloud/sdk-general)](https://gitter.im/ionos-cloud/sdk-general) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-go&metric=alert_status)](https://sonarcloud.io/dashboard?id=ionos-cloud_sdk-go) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-go&metric=bugs)](https://sonarcloud.io/dashboard?id=ionos-cloud_sdk-go) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-go&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=ionos-cloud_sdk-go) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-go&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=ionos-cloud_sdk-go) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-go&metric=security_rating)](https://sonarcloud.io/dashboard?id=ionos-cloud_sdk-go) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=ionos-cloud_sdk-go&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=ionos-cloud_sdk-go) [![Release](https://img.shields.io/github/v/release/ionos-cloud/sdk-go.svg)](https://github.com/ionos-cloud/sdk-go/releases/latest) [![Release Date](https://img.shields.io/github/release-date/ionos-cloud/sdk-go.svg)](https://github.com/ionos-cloud/sdk-go/releases/latest) [![Go](https://img.shields.io/github/go-mod/go-version/ionos-cloud/sdk-go.svg)](https://github.com/ionos-cloud/sdk-go) ![Alt text](.github/IONOS.CLOUD.BLU.svg?raw=true "Title") # Go API client for ionoscloud IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. ## Overview The IONOS Cloud SDK for GO provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in GO . The SDK for GO wraps the IONOS Cloud API. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response. ## Installing ### Use go get to retrieve the SDK to add it to your GOPATH workspace, or project's Go module dependencies. ```bash go get github.com/ionos-cloud/sdk-go/v6 ``` To update the SDK use go get -u to retrieve the latest version of the SDK. ```bash go get -u github.com/ionos-cloud/sdk-go/v6 ``` ### Go Modules If you are using Go modules, your go get will default to the latest tagged release version of the SDK. To get a specific release version of the SDK use @ in your go get command. ```bash go get github.com/ionos-cloud/sdk-go/v6@v6.0.0 ``` To get the latest SDK repository, use @latest. ```bash go get github.com/ionos-cloud/sdk-go/v6@latest ``` ## Environment Variables | Environment Variable | Description | |-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `IONOS_USERNAME` | Specify the username used to login, to authenticate against the IONOS Cloud API | | `IONOS_PASSWORD` | Specify the password used to login, to authenticate against the IONOS Cloud API | | `IONOS_TOKEN` | Specify the token used to login, if a token is being used instead of username and password | | `IONOS_API_URL` | Specify the API URL. It will overwrite the API endpoint default value `api.ionos.com`. Note: the host URL does not contain the `/cloudapi/v6` path, so it should _not_ be included in the `IONOS_API_URL` environment variable | | `IONOS_LOG_LEVEL` | Specify the Log Level used to log messages. Possible values: Off, Debug, Trace | | `IONOS_PINNED_CERT` | Specify the SHA-256 public fingerprint here, enables certificate pinning | | `IONOS_CONTRACT_NUMBER` | Specify the contract number on which you wish to provision. Only valid for reseller accounts, for other types of accounts the header will be ignored | ⚠️ **_Note: To overwrite the api endpoint - `api.ionos.com`, the environment variable `$IONOS_API_URL` can be set, and used with `NewConfigurationFromEnv()` function._** ## Examples Examples for creating resources using the Go SDK can be found [here](examples/) ## Authentication ### Basic Authentication - **Type**: HTTP basic authentication Example ```golang import ( "context" "fmt" "github.com/ionos-cloud/sdk-go/v6" "log" ) func basicAuthExample() error { cfg := ionoscloud.NewConfiguration("username_here", "pwd_here", "", "") cfg.Debug = true apiClient := ionoscloud.NewAPIClient(cfg) datacenters, _, err := apiClient.DataCentersApi.DatacentersGet(context.Background()).Depth(1).Execute() if err != nil { return fmt.Errorf("error retrieving datacenters %w", err) } if datacenters.HasItems() { for _, dc := range *datacenters.GetItems() { if dc.HasProperties() && dc.GetProperties().HasName() { fmt.Println(*dc.GetProperties().GetName()) } } } return nil } ``` ### Token Authentication There are 2 ways to generate your token: ### Generate token using [sdk-go-auth](https://github.com/ionos-cloud/sdk-go-auth): ```golang import ( "context" "fmt" authApi "github.com/ionos-cloud/sdk-go-auth" "github.com/ionos-cloud/sdk-go/v6" "log" ) func TokenAuthExample() error { //note: to use NewConfigurationFromEnv(), you need to previously set IONOS_USERNAME and IONOS_PASSWORD as env variables authClient := authApi.NewAPIClient(authApi.NewConfigurationFromEnv()) jwt, _, err := authClient.TokensApi.TokensGenerate(context.Background()).Execute() if err != nil { return fmt.Errorf("error occurred while generating token (%w)", err) } if !jwt.HasToken() { return fmt.Errorf("could not generate token") } cfg := ionoscloud.NewConfiguration("", "", *jwt.GetToken(), "") cfg.Debug = true apiClient := ionoscloud.NewAPIClient(cfg) datacenters, _, err := apiClient.DataCentersApi.DatacenterGet(context.Background()).Depth(1).Execute() if err != nil { return fmt.Errorf("error retrieving datacenters (%w)", err) } return nil } ``` ### Generate token using ionosctl: Install ionosctl as explained [here](https://github.com/ionos-cloud/ionosctl) Run commands to login and generate your token. ```golang ionosctl login ionosctl token generate export IONOS_TOKEN="insert_here_token_saved_from_generate_command" ``` Save the generated token and use it to authenticate: ```golang import ( "context" "fmt" "github.com/ionos-cloud/sdk-go/v6" "log" ) func TokenAuthExample() error { //note: to use NewConfigurationFromEnv(), you need to previously set IONOS_TOKEN as env variables authClient := authApi.NewAPIClient(authApi.NewConfigurationFromEnv()) cfg.Debug = true apiClient := ionoscloud.NewAPIClient(cfg) datacenters, _, err := apiClient.DataCenter6Api.DatacentersGet(context.Background()).Depth(1).Execute() if err != nil { return fmt.Errorf("error retrieving datacenters (%w)", err) } return nil } ``` ## Certificate pinning: You can enable certificate pinning if you want to bypass the normal certificate checking procedure, by doing the following: Set env variable IONOS_PINNED_CERT= You can get the sha256 fingerprint most easily from the browser by inspecting the certificate. ### Depth Many of the _List_ or _Get_ operations will accept an optional _depth_ argument. Setting this to a value between 0 and 5 affects the amount of data that is returned. The details returned vary depending on the resource being queried, but it generally follows this pattern. By default, the SDK sets the _depth_ argument to the maximum value. | Depth | Description | | :--- | :--- | | 0 | Only direct properties are included. Children are not included. | | 1 | Direct properties and children's references are returned. | | 2 | Direct properties and children's properties are returned. | | 3 | Direct properties, children's properties, and descendants' references are returned. | | 4 | Direct properties, children's properties, and descendants' properties are returned. | | 5 | Returns all available properties. | #### How to set Depth parameter: ⚠️ **_Please use this parameter with caution. We recommend using the default value and raising its value only if it is needed._** * On the configuration level: ```go configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "URL") configuration.SetDepth(5) ``` Using this method, the depth parameter will be set **on all the API calls**. * When calling a method: ```go request := apiClient.DataCenterApi.DatacentersGet(context.Background()).Depth(1) ``` Using this method, the depth parameter will be set **on the current API call**. * Using the default value: If the depth parameter is not set, it will have the default value from the API that can be found [here](https://api.ionos.com/cloudapi/v6/swagger.json). > Note: The priority for setting the depth parameter is: *set on function call > set on configuration level > set using the default value from the API* ### Pretty The operations will also accept an optional _pretty_ argument. Setting this to a value of `true` or `false` controls whether the response is pretty-printed \(with indentation and new lines\). By default, the SDK sets the _pretty_ argument to `true`. ### Changing the base URL Base URL for the HTTP operation can be changed by using the following function: ```go requestProperties.SetURL("https://api.ionos.com/cloudapi/v6") ``` ## Debugging You can now inject any logger that implements Printf as a logger instead of using the default sdk logger. There are now Loglevels that you can set: `Off`, `Debug` and `Trace`. `Off` - does not show any logs `Debug` - regular logs, no sensitive information `Trace` - we recommend you only set this field for debugging purposes. Disable it in your production environments because it can log sensitive data. It logs the full request and response without encryption, even for an HTTPS call. Verbose request and response logging can also significantly impact your application's performance. ```golang package main import "github.com/ionos-cloud/sdk-go/v6" import "github.com/sirupsen/logrus" func main() { // create your configuration. replace username, password, token and url with correct values, or use NewConfigurationFromEnv() // if you have set your env variables as explained above cfg := ionoscloud.NewConfiguration("username", "password", "token", "hostUrl") // enable request and response logging. this is the most verbose loglevel cfg.LogLevel = Trace // inject your own logger that implements Printf cfg.Logger = logrus.New() // create you api client with the configuration apiClient := ionoscloud.NewAPIClient(cfg) } ``` If you want to see the API call request and response messages, you need to set the Debug field in the Configuration struct: ⚠️ **_Note: the field `Debug` is now deprecated and will be replaced with `LogLevel` in the future. ```golang package main import "github.com/ionos-cloud/sdk-go/v6" func main() { // create your configuration. replace username, password, token and url with correct values, or use NewConfigurationFromEnv() // if you have set your env variables as explained above cfg := ionoscloud.NewConfiguration("username", "password", "token", "hostUrl") // enable request and response logging cfg.Debug = true // create you api client with the configuration apiClient := ionoscloud.NewAPIClient(cfg) } ``` ⚠️ **_Note: We recommend you only set this field for debugging purposes. Disable it in your production environments because it can log sensitive data. It logs the full request and response without encryption, even for an HTTPS call. Verbose request and response logging can also significantly impact your application's performance._** ## Documentation for API Endpoints All URIs are relative to *https://api.ionos.com/cloudapi/v6*
API Endpoints table Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- DefaultApi | [**ApiInfoGet**](docs/api/DefaultApi.md#apiinfoget) | **Get** / | Get API information ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersDelete**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersdelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Delete an Application Load Balancer by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersfindbyapplicationloadbalancerid) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Get an Application Load Balancer by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsDelete**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsdelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Delete an ALB Flow Log by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsfindbyflowlogid) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Get an ALB Flow Log by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsGet**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsget) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Get ALB Flow Logs ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsPatch**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogspatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Partially Modify an ALB Flow Log by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsPost**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogspost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Create an ALB Flow Log ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersFlowlogsPut**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersflowlogsput) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Modify an ALB Flow Log by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesDelete**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesdelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete an ALB Forwarding Rule by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesfindbyforwardingruleid) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Get an ALB Forwarding Rule by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesGet**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesget) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Get ALB Forwarding Rules ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesPatch**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulespatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify an ALB Forwarding Rule by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesPost**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulespost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Create an ALB Forwarding Rule ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersForwardingrulesPut**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersforwardingrulesput) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify an ALB Forwarding Rule by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersGet**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersget) | **Get** /datacenters/{datacenterId}/applicationloadbalancers | Get Application Load Balancers ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersPatch**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancerspatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Partially Modify an Application Load Balancer by ID ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersPost**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancerspost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers | Create an Application Load Balancer ApplicationLoadBalancersApi | [**DatacentersApplicationloadbalancersPut**](docs/api/ApplicationLoadBalancersApi.md#datacentersapplicationloadbalancersput) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Modify an Application Load Balancer by ID BackupUnitsApi | [**BackupunitsDelete**](docs/api/BackupUnitsApi.md#backupunitsdelete) | **Delete** /backupunits/{backupunitId} | Delete backup units BackupUnitsApi | [**BackupunitsFindById**](docs/api/BackupUnitsApi.md#backupunitsfindbyid) | **Get** /backupunits/{backupunitId} | Retrieve backup units BackupUnitsApi | [**BackupunitsGet**](docs/api/BackupUnitsApi.md#backupunitsget) | **Get** /backupunits | List backup units BackupUnitsApi | [**BackupunitsPatch**](docs/api/BackupUnitsApi.md#backupunitspatch) | **Patch** /backupunits/{backupunitId} | Partially modify backup units BackupUnitsApi | [**BackupunitsPost**](docs/api/BackupUnitsApi.md#backupunitspost) | **Post** /backupunits | Create backup units BackupUnitsApi | [**BackupunitsPut**](docs/api/BackupUnitsApi.md#backupunitsput) | **Put** /backupunits/{backupunitId} | Modify backup units BackupUnitsApi | [**BackupunitsSsourlGet**](docs/api/BackupUnitsApi.md#backupunitsssourlget) | **Get** /backupunits/{backupunitId}/ssourl | Retrieve BU single sign-on URLs ContractResourcesApi | [**ContractsGet**](docs/api/ContractResourcesApi.md#contractsget) | **Get** /contracts | Get Contract Information DataCentersApi | [**DatacentersDelete**](docs/api/DataCentersApi.md#datacentersdelete) | **Delete** /datacenters/{datacenterId} | Delete data centers DataCentersApi | [**DatacentersFindById**](docs/api/DataCentersApi.md#datacentersfindbyid) | **Get** /datacenters/{datacenterId} | Retrieve data centers DataCentersApi | [**DatacentersGet**](docs/api/DataCentersApi.md#datacentersget) | **Get** /datacenters | List your data centers DataCentersApi | [**DatacentersPatch**](docs/api/DataCentersApi.md#datacenterspatch) | **Patch** /datacenters/{datacenterId} | Partially modify a Data Center by ID DataCentersApi | [**DatacentersPost**](docs/api/DataCentersApi.md#datacenterspost) | **Post** /datacenters | Create a Data Center DataCentersApi | [**DatacentersPut**](docs/api/DataCentersApi.md#datacentersput) | **Put** /datacenters/{datacenterId} | Modify a Data Center by ID FirewallRulesApi | [**DatacentersServersNicsFirewallrulesDelete**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulesdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Delete firewall rules FirewallRulesApi | [**DatacentersServersNicsFirewallrulesFindById**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulesfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Retrieve firewall rules FirewallRulesApi | [**DatacentersServersNicsFirewallrulesGet**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulesget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | List firewall rules FirewallRulesApi | [**DatacentersServersNicsFirewallrulesPatch**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulespatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Partially modify firewall rules FirewallRulesApi | [**DatacentersServersNicsFirewallrulesPost**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulespost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | Create a Firewall Rule FirewallRulesApi | [**DatacentersServersNicsFirewallrulesPut**](docs/api/FirewallRulesApi.md#datacentersserversnicsfirewallrulesput) | **Put** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Modify a Firewall Rule FlowLogsApi | [**DatacentersServersNicsFlowlogsDelete**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogsdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Delete Flow Logs FlowLogsApi | [**DatacentersServersNicsFlowlogsFindById**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogsfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Retrieve Flow Logs FlowLogsApi | [**DatacentersServersNicsFlowlogsGet**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogsget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | List Flow Logs FlowLogsApi | [**DatacentersServersNicsFlowlogsPatch**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogspatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Partially modify Flow Logs FlowLogsApi | [**DatacentersServersNicsFlowlogsPost**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | Create a Flow Log FlowLogsApi | [**DatacentersServersNicsFlowlogsPut**](docs/api/FlowLogsApi.md#datacentersserversnicsflowlogsput) | **Put** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Modify Flow Logs IPBlocksApi | [**IpblocksDelete**](docs/api/IPBlocksApi.md#ipblocksdelete) | **Delete** /ipblocks/{ipblockId} | Delete IP blocks IPBlocksApi | [**IpblocksFindById**](docs/api/IPBlocksApi.md#ipblocksfindbyid) | **Get** /ipblocks/{ipblockId} | Retrieve IP blocks IPBlocksApi | [**IpblocksGet**](docs/api/IPBlocksApi.md#ipblocksget) | **Get** /ipblocks | List IP blocks IPBlocksApi | [**IpblocksPatch**](docs/api/IPBlocksApi.md#ipblockspatch) | **Patch** /ipblocks/{ipblockId} | Partially modify IP blocks IPBlocksApi | [**IpblocksPost**](docs/api/IPBlocksApi.md#ipblockspost) | **Post** /ipblocks | Reserve a IP Block IPBlocksApi | [**IpblocksPut**](docs/api/IPBlocksApi.md#ipblocksput) | **Put** /ipblocks/{ipblockId} | Modify a IP Block by ID ImagesApi | [**ImagesDelete**](docs/api/ImagesApi.md#imagesdelete) | **Delete** /images/{imageId} | Delete images ImagesApi | [**ImagesFindById**](docs/api/ImagesApi.md#imagesfindbyid) | **Get** /images/{imageId} | Retrieve images ImagesApi | [**ImagesGet**](docs/api/ImagesApi.md#imagesget) | **Get** /images | List images ImagesApi | [**ImagesPatch**](docs/api/ImagesApi.md#imagespatch) | **Patch** /images/{imageId} | Partially modify images ImagesApi | [**ImagesPut**](docs/api/ImagesApi.md#imagesput) | **Put** /images/{imageId} | Modify an Image by ID KubernetesApi | [**K8sDelete**](docs/api/KubernetesApi.md#k8sdelete) | **Delete** /k8s/{k8sClusterId} | Delete a Kubernetes Cluster by ID KubernetesApi | [**K8sFindByClusterId**](docs/api/KubernetesApi.md#k8sfindbyclusterid) | **Get** /k8s/{k8sClusterId} | Get a Kubernetes Cluster by ID KubernetesApi | [**K8sGet**](docs/api/KubernetesApi.md#k8sget) | **Get** /k8s | Get Kubernetes Clusters KubernetesApi | [**K8sKubeconfigGet**](docs/api/KubernetesApi.md#k8skubeconfigget) | **Get** /k8s/{k8sClusterId}/kubeconfig | Get Kubernetes Configuration File KubernetesApi | [**K8sNodepoolsDelete**](docs/api/KubernetesApi.md#k8snodepoolsdelete) | **Delete** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Delete a Kubernetes Node Pool by ID KubernetesApi | [**K8sNodepoolsFindById**](docs/api/KubernetesApi.md#k8snodepoolsfindbyid) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Get a Kubernetes Node Pool by ID KubernetesApi | [**K8sNodepoolsGet**](docs/api/KubernetesApi.md#k8snodepoolsget) | **Get** /k8s/{k8sClusterId}/nodepools | Get Kubernetes Node Pools KubernetesApi | [**K8sNodepoolsNodesDelete**](docs/api/KubernetesApi.md#k8snodepoolsnodesdelete) | **Delete** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Delete a Kubernetes Node by ID KubernetesApi | [**K8sNodepoolsNodesFindById**](docs/api/KubernetesApi.md#k8snodepoolsnodesfindbyid) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Get Kubernetes Node by ID KubernetesApi | [**K8sNodepoolsNodesGet**](docs/api/KubernetesApi.md#k8snodepoolsnodesget) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes | Get Kubernetes Nodes KubernetesApi | [**K8sNodepoolsNodesReplacePost**](docs/api/KubernetesApi.md#k8snodepoolsnodesreplacepost) | **Post** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace | Recreate a Kubernetes Node by ID KubernetesApi | [**K8sNodepoolsPost**](docs/api/KubernetesApi.md#k8snodepoolspost) | **Post** /k8s/{k8sClusterId}/nodepools | Create a Kubernetes Node Pool KubernetesApi | [**K8sNodepoolsPut**](docs/api/KubernetesApi.md#k8snodepoolsput) | **Put** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Modify a Kubernetes Node Pool by ID KubernetesApi | [**K8sPost**](docs/api/KubernetesApi.md#k8spost) | **Post** /k8s | Create a Kubernetes Cluster KubernetesApi | [**K8sPut**](docs/api/KubernetesApi.md#k8sput) | **Put** /k8s/{k8sClusterId} | Modify a Kubernetes Cluster by ID KubernetesApi | [**K8sVersionsDefaultGet**](docs/api/KubernetesApi.md#k8sversionsdefaultget) | **Get** /k8s/versions/default | Get Default Kubernetes Version KubernetesApi | [**K8sVersionsGet**](docs/api/KubernetesApi.md#k8sversionsget) | **Get** /k8s/versions | Get Kubernetes Versions LANsApi | [**DatacentersLansDelete**](docs/api/LANsApi.md#datacenterslansdelete) | **Delete** /datacenters/{datacenterId}/lans/{lanId} | Delete LANs LANsApi | [**DatacentersLansFindById**](docs/api/LANsApi.md#datacenterslansfindbyid) | **Get** /datacenters/{datacenterId}/lans/{lanId} | Retrieve LANs LANsApi | [**DatacentersLansGet**](docs/api/LANsApi.md#datacenterslansget) | **Get** /datacenters/{datacenterId}/lans | List LANs LANsApi | [**DatacentersLansNicsFindById**](docs/api/LANsApi.md#datacenterslansnicsfindbyid) | **Get** /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId} | Retrieve attached NICs LANsApi | [**DatacentersLansNicsGet**](docs/api/LANsApi.md#datacenterslansnicsget) | **Get** /datacenters/{datacenterId}/lans/{lanId}/nics | List LAN members LANsApi | [**DatacentersLansNicsPost**](docs/api/LANsApi.md#datacenterslansnicspost) | **Post** /datacenters/{datacenterId}/lans/{lanId}/nics | Attach NICs LANsApi | [**DatacentersLansPatch**](docs/api/LANsApi.md#datacenterslanspatch) | **Patch** /datacenters/{datacenterId}/lans/{lanId} | Partially modify LANs LANsApi | [**DatacentersLansPost**](docs/api/LANsApi.md#datacenterslanspost) | **Post** /datacenters/{datacenterId}/lans | Create LANs LANsApi | [**DatacentersLansPut**](docs/api/LANsApi.md#datacenterslansput) | **Put** /datacenters/{datacenterId}/lans/{lanId} | Modify LANs LabelsApi | [**DatacentersLabelsDelete**](docs/api/LabelsApi.md#datacenterslabelsdelete) | **Delete** /datacenters/{datacenterId}/labels/{key} | Delete data center labels LabelsApi | [**DatacentersLabelsFindByKey**](docs/api/LabelsApi.md#datacenterslabelsfindbykey) | **Get** /datacenters/{datacenterId}/labels/{key} | Retrieve data center labels LabelsApi | [**DatacentersLabelsGet**](docs/api/LabelsApi.md#datacenterslabelsget) | **Get** /datacenters/{datacenterId}/labels | List data center labels LabelsApi | [**DatacentersLabelsPost**](docs/api/LabelsApi.md#datacenterslabelspost) | **Post** /datacenters/{datacenterId}/labels | Create a Data Center Label LabelsApi | [**DatacentersLabelsPut**](docs/api/LabelsApi.md#datacenterslabelsput) | **Put** /datacenters/{datacenterId}/labels/{key} | Modify a Data Center Label by Key LabelsApi | [**DatacentersServersLabelsDelete**](docs/api/LabelsApi.md#datacentersserverslabelsdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Delete server labels LabelsApi | [**DatacentersServersLabelsFindByKey**](docs/api/LabelsApi.md#datacentersserverslabelsfindbykey) | **Get** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Retrieve server labels LabelsApi | [**DatacentersServersLabelsGet**](docs/api/LabelsApi.md#datacentersserverslabelsget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/labels | List server labels LabelsApi | [**DatacentersServersLabelsPost**](docs/api/LabelsApi.md#datacentersserverslabelspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/labels | Create a Server Label LabelsApi | [**DatacentersServersLabelsPut**](docs/api/LabelsApi.md#datacentersserverslabelsput) | **Put** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Modify a Server Label LabelsApi | [**DatacentersVolumesLabelsDelete**](docs/api/LabelsApi.md#datacentersvolumeslabelsdelete) | **Delete** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Delete volume labels LabelsApi | [**DatacentersVolumesLabelsFindByKey**](docs/api/LabelsApi.md#datacentersvolumeslabelsfindbykey) | **Get** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Retrieve volume labels LabelsApi | [**DatacentersVolumesLabelsGet**](docs/api/LabelsApi.md#datacentersvolumeslabelsget) | **Get** /datacenters/{datacenterId}/volumes/{volumeId}/labels | List volume labels LabelsApi | [**DatacentersVolumesLabelsPost**](docs/api/LabelsApi.md#datacentersvolumeslabelspost) | **Post** /datacenters/{datacenterId}/volumes/{volumeId}/labels | Create a Volume Label LabelsApi | [**DatacentersVolumesLabelsPut**](docs/api/LabelsApi.md#datacentersvolumeslabelsput) | **Put** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Modify a Volume Label LabelsApi | [**ImagesLabelsDelete**](docs/api/LabelsApi.md#imageslabelsdelete) | **Delete** /images/{imageId}/labels/{key} | Delete image label LabelsApi | [**ImagesLabelsFindByKey**](docs/api/LabelsApi.md#imageslabelsfindbykey) | **Get** /images/{imageId}/labels/{key} | Retrieve image labels LabelsApi | [**ImagesLabelsGet**](docs/api/LabelsApi.md#imageslabelsget) | **Get** /images/{imageId}/labels | List image labels LabelsApi | [**ImagesLabelsPost**](docs/api/LabelsApi.md#imageslabelspost) | **Post** /images/{imageId}/labels | Create an Image Label LabelsApi | [**ImagesLabelsPut**](docs/api/LabelsApi.md#imageslabelsput) | **Put** /images/{imageId}/labels/{key} | Modify an Image Label by Key LabelsApi | [**IpblocksLabelsDelete**](docs/api/LabelsApi.md#ipblockslabelsdelete) | **Delete** /ipblocks/{ipblockId}/labels/{key} | Delete IP block labels LabelsApi | [**IpblocksLabelsFindByKey**](docs/api/LabelsApi.md#ipblockslabelsfindbykey) | **Get** /ipblocks/{ipblockId}/labels/{key} | Retrieve IP block labels LabelsApi | [**IpblocksLabelsGet**](docs/api/LabelsApi.md#ipblockslabelsget) | **Get** /ipblocks/{ipblockId}/labels | List IP block labels LabelsApi | [**IpblocksLabelsPost**](docs/api/LabelsApi.md#ipblockslabelspost) | **Post** /ipblocks/{ipblockId}/labels | Create IP block labels LabelsApi | [**IpblocksLabelsPut**](docs/api/LabelsApi.md#ipblockslabelsput) | **Put** /ipblocks/{ipblockId}/labels/{key} | Modify a IP Block Label by ID LabelsApi | [**LabelsFindByUrn**](docs/api/LabelsApi.md#labelsfindbyurn) | **Get** /labels/{labelurn} | Retrieve labels by URN LabelsApi | [**LabelsGet**](docs/api/LabelsApi.md#labelsget) | **Get** /labels | List labels LabelsApi | [**SnapshotsLabelsDelete**](docs/api/LabelsApi.md#snapshotslabelsdelete) | **Delete** /snapshots/{snapshotId}/labels/{key} | Delete snapshot labels LabelsApi | [**SnapshotsLabelsFindByKey**](docs/api/LabelsApi.md#snapshotslabelsfindbykey) | **Get** /snapshots/{snapshotId}/labels/{key} | Retrieve snapshot labels LabelsApi | [**SnapshotsLabelsGet**](docs/api/LabelsApi.md#snapshotslabelsget) | **Get** /snapshots/{snapshotId}/labels | List snapshot labels LabelsApi | [**SnapshotsLabelsPost**](docs/api/LabelsApi.md#snapshotslabelspost) | **Post** /snapshots/{snapshotId}/labels | Create a Snapshot Label LabelsApi | [**SnapshotsLabelsPut**](docs/api/LabelsApi.md#snapshotslabelsput) | **Put** /snapshots/{snapshotId}/labels/{key} | Modify a Snapshot Label by ID LoadBalancersApi | [**DatacentersLoadbalancersBalancednicsDelete**](docs/api/LoadBalancersApi.md#datacentersloadbalancersbalancednicsdelete) | **Delete** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Detach balanced NICs LoadBalancersApi | [**DatacentersLoadbalancersBalancednicsFindByNicId**](docs/api/LoadBalancersApi.md#datacentersloadbalancersbalancednicsfindbynicid) | **Get** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Retrieve balanced NICs LoadBalancersApi | [**DatacentersLoadbalancersBalancednicsGet**](docs/api/LoadBalancersApi.md#datacentersloadbalancersbalancednicsget) | **Get** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | List balanced NICs LoadBalancersApi | [**DatacentersLoadbalancersBalancednicsPost**](docs/api/LoadBalancersApi.md#datacentersloadbalancersbalancednicspost) | **Post** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | Attach balanced NICs LoadBalancersApi | [**DatacentersLoadbalancersDelete**](docs/api/LoadBalancersApi.md#datacentersloadbalancersdelete) | **Delete** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Delete Load Balancers LoadBalancersApi | [**DatacentersLoadbalancersFindById**](docs/api/LoadBalancersApi.md#datacentersloadbalancersfindbyid) | **Get** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Retrieve Load Balancers LoadBalancersApi | [**DatacentersLoadbalancersGet**](docs/api/LoadBalancersApi.md#datacentersloadbalancersget) | **Get** /datacenters/{datacenterId}/loadbalancers | List Load Balancers LoadBalancersApi | [**DatacentersLoadbalancersPatch**](docs/api/LoadBalancersApi.md#datacentersloadbalancerspatch) | **Patch** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Partially modify Load Balancers LoadBalancersApi | [**DatacentersLoadbalancersPost**](docs/api/LoadBalancersApi.md#datacentersloadbalancerspost) | **Post** /datacenters/{datacenterId}/loadbalancers | Create a Load Balancer LoadBalancersApi | [**DatacentersLoadbalancersPut**](docs/api/LoadBalancersApi.md#datacentersloadbalancersput) | **Put** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Modify a Load Balancer by ID LocationsApi | [**LocationsFindByRegionId**](docs/api/LocationsApi.md#locationsfindbyregionid) | **Get** /locations/{regionId} | Get Locations within a Region LocationsApi | [**LocationsFindByRegionIdAndId**](docs/api/LocationsApi.md#locationsfindbyregionidandid) | **Get** /locations/{regionId}/{locationId} | Get Location by ID LocationsApi | [**LocationsGet**](docs/api/LocationsApi.md#locationsget) | **Get** /locations | Get Locations NATGatewaysApi | [**DatacentersNatgatewaysDelete**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysdelete) | **Delete** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Delete NAT Gateways NATGatewaysApi | [**DatacentersNatgatewaysFindByNatGatewayId**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysfindbynatgatewayid) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Retrieve NAT Gateways NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsDelete**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogsdelete) | **Delete** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Delete NAT Gateway Flow Logs NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsFindByFlowLogId**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogsfindbyflowlogid) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Retrieve NAT Gateway Flow Logs NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsGet**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogsget) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | List NAT Gateway Flow Logs NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsPatch**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogspatch) | **Patch** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Partially modify NAT Gateway Flow Logs NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsPost**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogspost) | **Post** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | Create a NAT Gateway Flow Log NATGatewaysApi | [**DatacentersNatgatewaysFlowlogsPut**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysflowlogsput) | **Put** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Modify NAT Gateway Flow Logs NATGatewaysApi | [**DatacentersNatgatewaysGet**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysget) | **Get** /datacenters/{datacenterId}/natgateways | List NAT Gateways NATGatewaysApi | [**DatacentersNatgatewaysPatch**](docs/api/NATGatewaysApi.md#datacentersnatgatewayspatch) | **Patch** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Partially modify NAT Gateways NATGatewaysApi | [**DatacentersNatgatewaysPost**](docs/api/NATGatewaysApi.md#datacentersnatgatewayspost) | **Post** /datacenters/{datacenterId}/natgateways | Create a NAT Gateway NATGatewaysApi | [**DatacentersNatgatewaysPut**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysput) | **Put** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Modify NAT Gateways NATGatewaysApi | [**DatacentersNatgatewaysRulesDelete**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulesdelete) | **Delete** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Delete NAT Gateway rules NATGatewaysApi | [**DatacentersNatgatewaysRulesFindByNatGatewayRuleId**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulesfindbynatgatewayruleid) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Retrieve NAT Gateway rules NATGatewaysApi | [**DatacentersNatgatewaysRulesGet**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulesget) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | List NAT Gateway rules NATGatewaysApi | [**DatacentersNatgatewaysRulesPatch**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulespatch) | **Patch** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Partially Modify a NAT Gateway Rule by ID NATGatewaysApi | [**DatacentersNatgatewaysRulesPost**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulespost) | **Post** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | Create a NAT Gateway Rule NATGatewaysApi | [**DatacentersNatgatewaysRulesPut**](docs/api/NATGatewaysApi.md#datacentersnatgatewaysrulesput) | **Put** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Modify a NAT Gateway Rule by ID NetworkInterfacesApi | [**DatacentersServersNicsDelete**](docs/api/NetworkInterfacesApi.md#datacentersserversnicsdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Delete NICs NetworkInterfacesApi | [**DatacentersServersNicsFindById**](docs/api/NetworkInterfacesApi.md#datacentersserversnicsfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Retrieve NICs NetworkInterfacesApi | [**DatacentersServersNicsGet**](docs/api/NetworkInterfacesApi.md#datacentersserversnicsget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics | List NICs NetworkInterfacesApi | [**DatacentersServersNicsPatch**](docs/api/NetworkInterfacesApi.md#datacentersserversnicspatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Partially modify NICs NetworkInterfacesApi | [**DatacentersServersNicsPost**](docs/api/NetworkInterfacesApi.md#datacentersserversnicspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics | Create a NIC NetworkInterfacesApi | [**DatacentersServersNicsPut**](docs/api/NetworkInterfacesApi.md#datacentersserversnicsput) | **Put** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Modify NICs NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersDelete**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersdelete) | **Delete** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Delete Network Load Balancers NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersfindbynetworkloadbalancerid) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Retrieve Network Load Balancers NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsDelete**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogsdelete) | **Delete** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Delete NLB Flow Logs NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogsfindbyflowlogid) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Retrieve NLB Flow Logs NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsGet**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogsget) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | List NLB Flow Logs NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsPatch**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogspatch) | **Patch** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Partially modify NLB Flow Logs NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsPost**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogspost) | **Post** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | Create a NLB Flow Log NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersFlowlogsPut**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersflowlogsput) | **Put** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Modify NLB Flow Logs NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesDelete**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulesdelete) | **Delete** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete NLB forwarding rules NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulesfindbyforwardingruleid) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Retrieve NLB forwarding rules NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesGet**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulesget) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | List NLB forwarding rules NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesPatch**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulespatch) | **Patch** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify NLB forwarding rules NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesPost**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulespost) | **Post** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | Create a NLB Forwarding Rule NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersForwardingrulesPut**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersforwardingrulesput) | **Put** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify NLB forwarding rules NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersGet**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersget) | **Get** /datacenters/{datacenterId}/networkloadbalancers | List Network Load Balancers NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersPatch**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancerspatch) | **Patch** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Partially modify Network Load Balancers NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersPost**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancerspost) | **Post** /datacenters/{datacenterId}/networkloadbalancers | Create a Network Load Balancer NetworkLoadBalancersApi | [**DatacentersNetworkloadbalancersPut**](docs/api/NetworkLoadBalancersApi.md#datacentersnetworkloadbalancersput) | **Put** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Modify Network Load Balancers PrivateCrossConnectsApi | [**PccsDelete**](docs/api/PrivateCrossConnectsApi.md#pccsdelete) | **Delete** /pccs/{pccId} | Delete Cross Connects PrivateCrossConnectsApi | [**PccsFindById**](docs/api/PrivateCrossConnectsApi.md#pccsfindbyid) | **Get** /pccs/{pccId} | Retrieve a Cross Connect PrivateCrossConnectsApi | [**PccsGet**](docs/api/PrivateCrossConnectsApi.md#pccsget) | **Get** /pccs | List Cross Connects PrivateCrossConnectsApi | [**PccsPatch**](docs/api/PrivateCrossConnectsApi.md#pccspatch) | **Patch** /pccs/{pccId} | Partially modify a Cross Connects PrivateCrossConnectsApi | [**PccsPost**](docs/api/PrivateCrossConnectsApi.md#pccspost) | **Post** /pccs | Create a Cross Connect RequestsApi | [**RequestsFindById**](docs/api/RequestsApi.md#requestsfindbyid) | **Get** /requests/{requestId} | Retrieve requests RequestsApi | [**RequestsGet**](docs/api/RequestsApi.md#requestsget) | **Get** /requests | List requests RequestsApi | [**RequestsStatusGet**](docs/api/RequestsApi.md#requestsstatusget) | **Get** /requests/{requestId}/status | Retrieve request status ServersApi | [**DatacentersServersCdromsDelete**](docs/api/ServersApi.md#datacentersserverscdromsdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Detach a CD-ROM by ID ServersApi | [**DatacentersServersCdromsFindById**](docs/api/ServersApi.md#datacentersserverscdromsfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Get Attached CD-ROM by ID ServersApi | [**DatacentersServersCdromsGet**](docs/api/ServersApi.md#datacentersserverscdromsget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Get Attached CD-ROMs ServersApi | [**DatacentersServersCdromsPost**](docs/api/ServersApi.md#datacentersserverscdromspost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Attach a CD-ROM ServersApi | [**DatacentersServersDelete**](docs/api/ServersApi.md#datacentersserversdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId} | Delete servers ServersApi | [**DatacentersServersFindById**](docs/api/ServersApi.md#datacentersserversfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId} | Retrieve servers by ID ServersApi | [**DatacentersServersGet**](docs/api/ServersApi.md#datacentersserversget) | **Get** /datacenters/{datacenterId}/servers | List servers ServersApi | [**DatacentersServersPatch**](docs/api/ServersApi.md#datacentersserverspatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId} | Partially modify servers ServersApi | [**DatacentersServersPost**](docs/api/ServersApi.md#datacentersserverspost) | **Post** /datacenters/{datacenterId}/servers | Create a Server ServersApi | [**DatacentersServersPut**](docs/api/ServersApi.md#datacentersserversput) | **Put** /datacenters/{datacenterId}/servers/{serverId} | Modify a Server by ID ServersApi | [**DatacentersServersRebootPost**](docs/api/ServersApi.md#datacentersserversrebootpost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/reboot | Reboot servers ServersApi | [**DatacentersServersRemoteConsoleGet**](docs/api/ServersApi.md#datacentersserversremoteconsoleget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/remoteconsole | Get Remote Console link ServersApi | [**DatacentersServersResumePost**](docs/api/ServersApi.md#datacentersserversresumepost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/resume | Resume a Cube Server by ID ServersApi | [**DatacentersServersStartPost**](docs/api/ServersApi.md#datacentersserversstartpost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/start | Start an Enterprise Server by ID ServersApi | [**DatacentersServersStopPost**](docs/api/ServersApi.md#datacentersserversstoppost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/stop | Stop an Enterprise Server by ID ServersApi | [**DatacentersServersSuspendPost**](docs/api/ServersApi.md#datacentersserverssuspendpost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/suspend | Suspend a Cube Server by ID ServersApi | [**DatacentersServersTokenGet**](docs/api/ServersApi.md#datacentersserverstokenget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/token | Get JSON Web Token ServersApi | [**DatacentersServersUpgradePost**](docs/api/ServersApi.md#datacentersserversupgradepost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/upgrade | Upgrade a Server by ID ServersApi | [**DatacentersServersVolumesDelete**](docs/api/ServersApi.md#datacentersserversvolumesdelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Detach a Volume by ID ServersApi | [**DatacentersServersVolumesFindById**](docs/api/ServersApi.md#datacentersserversvolumesfindbyid) | **Get** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Get Attached Volume by ID ServersApi | [**DatacentersServersVolumesGet**](docs/api/ServersApi.md#datacentersserversvolumesget) | **Get** /datacenters/{datacenterId}/servers/{serverId}/volumes | Get Attached Volumes ServersApi | [**DatacentersServersVolumesPost**](docs/api/ServersApi.md#datacentersserversvolumespost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/volumes | Attach a Volume to a Server SnapshotsApi | [**SnapshotsDelete**](docs/api/SnapshotsApi.md#snapshotsdelete) | **Delete** /snapshots/{snapshotId} | Delete snapshots SnapshotsApi | [**SnapshotsFindById**](docs/api/SnapshotsApi.md#snapshotsfindbyid) | **Get** /snapshots/{snapshotId} | Retrieve snapshots by ID SnapshotsApi | [**SnapshotsGet**](docs/api/SnapshotsApi.md#snapshotsget) | **Get** /snapshots | List snapshots SnapshotsApi | [**SnapshotsPatch**](docs/api/SnapshotsApi.md#snapshotspatch) | **Patch** /snapshots/{snapshotId} | Partially modify snapshots SnapshotsApi | [**SnapshotsPut**](docs/api/SnapshotsApi.md#snapshotsput) | **Put** /snapshots/{snapshotId} | Modify a Snapshot by ID TargetGroupsApi | [**TargetGroupsDelete**](docs/api/TargetGroupsApi.md#targetgroupsdelete) | **Delete** /targetgroups/{targetGroupId} | Delete a Target Group by ID TargetGroupsApi | [**TargetgroupsFindByTargetGroupId**](docs/api/TargetGroupsApi.md#targetgroupsfindbytargetgroupid) | **Get** /targetgroups/{targetGroupId} | Get a Target Group by ID TargetGroupsApi | [**TargetgroupsGet**](docs/api/TargetGroupsApi.md#targetgroupsget) | **Get** /targetgroups | Get Target Groups TargetGroupsApi | [**TargetgroupsPatch**](docs/api/TargetGroupsApi.md#targetgroupspatch) | **Patch** /targetgroups/{targetGroupId} | Partially Modify a Target Group by ID TargetGroupsApi | [**TargetgroupsPost**](docs/api/TargetGroupsApi.md#targetgroupspost) | **Post** /targetgroups | Create a Target Group TargetGroupsApi | [**TargetgroupsPut**](docs/api/TargetGroupsApi.md#targetgroupsput) | **Put** /targetgroups/{targetGroupId} | Modify a Target Group by ID TemplatesApi | [**TemplatesFindById**](docs/api/TemplatesApi.md#templatesfindbyid) | **Get** /templates/{templateId} | Get Cubes Template by ID TemplatesApi | [**TemplatesGet**](docs/api/TemplatesApi.md#templatesget) | **Get** /templates | Get Cubes Templates UserManagementApi | [**UmGroupsDelete**](docs/api/UserManagementApi.md#umgroupsdelete) | **Delete** /um/groups/{groupId} | Delete groups UserManagementApi | [**UmGroupsFindById**](docs/api/UserManagementApi.md#umgroupsfindbyid) | **Get** /um/groups/{groupId} | Retrieve groups UserManagementApi | [**UmGroupsGet**](docs/api/UserManagementApi.md#umgroupsget) | **Get** /um/groups | List all groups UserManagementApi | [**UmGroupsPost**](docs/api/UserManagementApi.md#umgroupspost) | **Post** /um/groups | Create groups UserManagementApi | [**UmGroupsPut**](docs/api/UserManagementApi.md#umgroupsput) | **Put** /um/groups/{groupId} | Modify groups UserManagementApi | [**UmGroupsResourcesGet**](docs/api/UserManagementApi.md#umgroupsresourcesget) | **Get** /um/groups/{groupId}/resources | Retrieve group resources UserManagementApi | [**UmGroupsSharesDelete**](docs/api/UserManagementApi.md#umgroupssharesdelete) | **Delete** /um/groups/{groupId}/shares/{resourceId} | Remove group shares UserManagementApi | [**UmGroupsSharesFindByResourceId**](docs/api/UserManagementApi.md#umgroupssharesfindbyresourceid) | **Get** /um/groups/{groupId}/shares/{resourceId} | Retrieve group shares UserManagementApi | [**UmGroupsSharesGet**](docs/api/UserManagementApi.md#umgroupssharesget) | **Get** /um/groups/{groupId}/shares | List group shares UserManagementApi | [**UmGroupsSharesPost**](docs/api/UserManagementApi.md#umgroupssharespost) | **Post** /um/groups/{groupId}/shares/{resourceId} | Add group shares UserManagementApi | [**UmGroupsSharesPut**](docs/api/UserManagementApi.md#umgroupssharesput) | **Put** /um/groups/{groupId}/shares/{resourceId} | Modify group share privileges UserManagementApi | [**UmGroupsUsersDelete**](docs/api/UserManagementApi.md#umgroupsusersdelete) | **Delete** /um/groups/{groupId}/users/{userId} | Remove users from groups UserManagementApi | [**UmGroupsUsersGet**](docs/api/UserManagementApi.md#umgroupsusersget) | **Get** /um/groups/{groupId}/users | List group members UserManagementApi | [**UmGroupsUsersPost**](docs/api/UserManagementApi.md#umgroupsuserspost) | **Post** /um/groups/{groupId}/users | Add a Group Member UserManagementApi | [**UmResourcesFindByType**](docs/api/UserManagementApi.md#umresourcesfindbytype) | **Get** /um/resources/{resourceType} | List resources by type UserManagementApi | [**UmResourcesFindByTypeAndId**](docs/api/UserManagementApi.md#umresourcesfindbytypeandid) | **Get** /um/resources/{resourceType}/{resourceId} | Retrieve resources by type UserManagementApi | [**UmResourcesGet**](docs/api/UserManagementApi.md#umresourcesget) | **Get** /um/resources | List all resources UserManagementApi | [**UmUsersDelete**](docs/api/UserManagementApi.md#umusersdelete) | **Delete** /um/users/{userId} | Delete users UserManagementApi | [**UmUsersFindById**](docs/api/UserManagementApi.md#umusersfindbyid) | **Get** /um/users/{userId} | Retrieve users UserManagementApi | [**UmUsersGet**](docs/api/UserManagementApi.md#umusersget) | **Get** /um/users | List all users UserManagementApi | [**UmUsersGroupsGet**](docs/api/UserManagementApi.md#umusersgroupsget) | **Get** /um/users/{userId}/groups | Retrieve group resources by user ID UserManagementApi | [**UmUsersOwnsGet**](docs/api/UserManagementApi.md#umusersownsget) | **Get** /um/users/{userId}/owns | Retrieve user resources by user ID UserManagementApi | [**UmUsersPost**](docs/api/UserManagementApi.md#umuserspost) | **Post** /um/users | Create users UserManagementApi | [**UmUsersPut**](docs/api/UserManagementApi.md#umusersput) | **Put** /um/users/{userId} | Modify users UserS3KeysApi | [**UmUsersS3keysDelete**](docs/api/UserS3KeysApi.md#umuserss3keysdelete) | **Delete** /um/users/{userId}/s3keys/{keyId} | Delete S3 keys UserS3KeysApi | [**UmUsersS3keysFindByKeyId**](docs/api/UserS3KeysApi.md#umuserss3keysfindbykeyid) | **Get** /um/users/{userId}/s3keys/{keyId} | Retrieve user S3 keys by key ID UserS3KeysApi | [**UmUsersS3keysGet**](docs/api/UserS3KeysApi.md#umuserss3keysget) | **Get** /um/users/{userId}/s3keys | List user S3 keys UserS3KeysApi | [**UmUsersS3keysPost**](docs/api/UserS3KeysApi.md#umuserss3keyspost) | **Post** /um/users/{userId}/s3keys | Create user S3 keys UserS3KeysApi | [**UmUsersS3keysPut**](docs/api/UserS3KeysApi.md#umuserss3keysput) | **Put** /um/users/{userId}/s3keys/{keyId} | Modify a S3 Key by Key ID UserS3KeysApi | [**UmUsersS3ssourlGet**](docs/api/UserS3KeysApi.md#umuserss3ssourlget) | **Get** /um/users/{userId}/s3ssourl | Retrieve S3 single sign-on URLs VolumesApi | [**DatacentersVolumesCreateSnapshotPost**](docs/api/VolumesApi.md#datacentersvolumescreatesnapshotpost) | **Post** /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot | Create volume snapshots VolumesApi | [**DatacentersVolumesDelete**](docs/api/VolumesApi.md#datacentersvolumesdelete) | **Delete** /datacenters/{datacenterId}/volumes/{volumeId} | Delete volumes VolumesApi | [**DatacentersVolumesFindById**](docs/api/VolumesApi.md#datacentersvolumesfindbyid) | **Get** /datacenters/{datacenterId}/volumes/{volumeId} | Retrieve volumes VolumesApi | [**DatacentersVolumesGet**](docs/api/VolumesApi.md#datacentersvolumesget) | **Get** /datacenters/{datacenterId}/volumes | List volumes VolumesApi | [**DatacentersVolumesPatch**](docs/api/VolumesApi.md#datacentersvolumespatch) | **Patch** /datacenters/{datacenterId}/volumes/{volumeId} | Partially modify volumes VolumesApi | [**DatacentersVolumesPost**](docs/api/VolumesApi.md#datacentersvolumespost) | **Post** /datacenters/{datacenterId}/volumes | Create a Volume VolumesApi | [**DatacentersVolumesPut**](docs/api/VolumesApi.md#datacentersvolumesput) | **Put** /datacenters/{datacenterId}/volumes/{volumeId} | Modify a Volume by ID VolumesApi | [**DatacentersVolumesRestoreSnapshotPost**](docs/api/VolumesApi.md#datacentersvolumesrestoresnapshotpost) | **Post** /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot | Restore volume snapshots
## Documentation For Models All URIs are relative to *https://api.ionos.com/cloudapi/v6*
API models list - [ApplicationLoadBalancer](docs/models/ApplicationLoadBalancer) - [ApplicationLoadBalancerEntities](docs/models/ApplicationLoadBalancerEntities) - [ApplicationLoadBalancerForwardingRule](docs/models/ApplicationLoadBalancerForwardingRule) - [ApplicationLoadBalancerForwardingRuleProperties](docs/models/ApplicationLoadBalancerForwardingRuleProperties) - [ApplicationLoadBalancerForwardingRulePut](docs/models/ApplicationLoadBalancerForwardingRulePut) - [ApplicationLoadBalancerForwardingRules](docs/models/ApplicationLoadBalancerForwardingRules) - [ApplicationLoadBalancerHttpRule](docs/models/ApplicationLoadBalancerHttpRule) - [ApplicationLoadBalancerHttpRuleCondition](docs/models/ApplicationLoadBalancerHttpRuleCondition) - [ApplicationLoadBalancerProperties](docs/models/ApplicationLoadBalancerProperties) - [ApplicationLoadBalancerPut](docs/models/ApplicationLoadBalancerPut) - [ApplicationLoadBalancers](docs/models/ApplicationLoadBalancers) - [AttachedVolumes](docs/models/AttachedVolumes) - [BackupUnit](docs/models/BackupUnit) - [BackupUnitProperties](docs/models/BackupUnitProperties) - [BackupUnitSSO](docs/models/BackupUnitSSO) - [BackupUnits](docs/models/BackupUnits) - [BalancedNics](docs/models/BalancedNics) - [Cdroms](docs/models/Cdroms) - [ConnectableDatacenter](docs/models/ConnectableDatacenter) - [Contract](docs/models/Contract) - [ContractProperties](docs/models/ContractProperties) - [Contracts](docs/models/Contracts) - [CpuArchitectureProperties](docs/models/CpuArchitectureProperties) - [DataCenterEntities](docs/models/DataCenterEntities) - [Datacenter](docs/models/Datacenter) - [DatacenterElementMetadata](docs/models/DatacenterElementMetadata) - [DatacenterProperties](docs/models/DatacenterProperties) - [Datacenters](docs/models/Datacenters) - [Error](docs/models/Error) - [ErrorMessage](docs/models/ErrorMessage) - [FirewallRule](docs/models/FirewallRule) - [FirewallRules](docs/models/FirewallRules) - [FirewallruleProperties](docs/models/FirewallruleProperties) - [FlowLog](docs/models/FlowLog) - [FlowLogProperties](docs/models/FlowLogProperties) - [FlowLogPut](docs/models/FlowLogPut) - [FlowLogs](docs/models/FlowLogs) - [Group](docs/models/Group) - [GroupEntities](docs/models/GroupEntities) - [GroupMembers](docs/models/GroupMembers) - [GroupProperties](docs/models/GroupProperties) - [GroupShare](docs/models/GroupShare) - [GroupShareProperties](docs/models/GroupShareProperties) - [GroupShares](docs/models/GroupShares) - [GroupUsers](docs/models/GroupUsers) - [Groups](docs/models/Groups) - [IPFailover](docs/models/IPFailover) - [Image](docs/models/Image) - [ImageProperties](docs/models/ImageProperties) - [Images](docs/models/Images) - [Info](docs/models/Info) - [IpBlock](docs/models/IpBlock) - [IpBlockProperties](docs/models/IpBlockProperties) - [IpBlocks](docs/models/IpBlocks) - [IpConsumer](docs/models/IpConsumer) - [KubernetesAutoScaling](docs/models/KubernetesAutoScaling) - [KubernetesCluster](docs/models/KubernetesCluster) - [KubernetesClusterEntities](docs/models/KubernetesClusterEntities) - [KubernetesClusterForPost](docs/models/KubernetesClusterForPost) - [KubernetesClusterForPut](docs/models/KubernetesClusterForPut) - [KubernetesClusterProperties](docs/models/KubernetesClusterProperties) - [KubernetesClusterPropertiesForPost](docs/models/KubernetesClusterPropertiesForPost) - [KubernetesClusterPropertiesForPut](docs/models/KubernetesClusterPropertiesForPut) - [KubernetesClusters](docs/models/KubernetesClusters) - [KubernetesMaintenanceWindow](docs/models/KubernetesMaintenanceWindow) - [KubernetesNode](docs/models/KubernetesNode) - [KubernetesNodeMetadata](docs/models/KubernetesNodeMetadata) - [KubernetesNodePool](docs/models/KubernetesNodePool) - [KubernetesNodePoolForPost](docs/models/KubernetesNodePoolForPost) - [KubernetesNodePoolForPut](docs/models/KubernetesNodePoolForPut) - [KubernetesNodePoolLan](docs/models/KubernetesNodePoolLan) - [KubernetesNodePoolLanRoutes](docs/models/KubernetesNodePoolLanRoutes) - [KubernetesNodePoolProperties](docs/models/KubernetesNodePoolProperties) - [KubernetesNodePoolPropertiesForPost](docs/models/KubernetesNodePoolPropertiesForPost) - [KubernetesNodePoolPropertiesForPut](docs/models/KubernetesNodePoolPropertiesForPut) - [KubernetesNodePools](docs/models/KubernetesNodePools) - [KubernetesNodeProperties](docs/models/KubernetesNodeProperties) - [KubernetesNodes](docs/models/KubernetesNodes) - [Label](docs/models/Label) - [LabelProperties](docs/models/LabelProperties) - [LabelResource](docs/models/LabelResource) - [LabelResourceProperties](docs/models/LabelResourceProperties) - [LabelResources](docs/models/LabelResources) - [Labels](docs/models/Labels) - [Lan](docs/models/Lan) - [LanEntities](docs/models/LanEntities) - [LanNics](docs/models/LanNics) - [LanProperties](docs/models/LanProperties) - [Lans](docs/models/Lans) - [Loadbalancer](docs/models/Loadbalancer) - [LoadbalancerEntities](docs/models/LoadbalancerEntities) - [LoadbalancerProperties](docs/models/LoadbalancerProperties) - [Loadbalancers](docs/models/Loadbalancers) - [Location](docs/models/Location) - [LocationProperties](docs/models/LocationProperties) - [Locations](docs/models/Locations) - [NatGateway](docs/models/NatGateway) - [NatGatewayEntities](docs/models/NatGatewayEntities) - [NatGatewayLanProperties](docs/models/NatGatewayLanProperties) - [NatGatewayProperties](docs/models/NatGatewayProperties) - [NatGatewayPut](docs/models/NatGatewayPut) - [NatGatewayRule](docs/models/NatGatewayRule) - [NatGatewayRuleProperties](docs/models/NatGatewayRuleProperties) - [NatGatewayRuleProtocol](docs/models/NatGatewayRuleProtocol) - [NatGatewayRulePut](docs/models/NatGatewayRulePut) - [NatGatewayRuleType](docs/models/NatGatewayRuleType) - [NatGatewayRules](docs/models/NatGatewayRules) - [NatGateways](docs/models/NatGateways) - [NetworkLoadBalancer](docs/models/NetworkLoadBalancer) - [NetworkLoadBalancerEntities](docs/models/NetworkLoadBalancerEntities) - [NetworkLoadBalancerForwardingRule](docs/models/NetworkLoadBalancerForwardingRule) - [NetworkLoadBalancerForwardingRuleHealthCheck](docs/models/NetworkLoadBalancerForwardingRuleHealthCheck) - [NetworkLoadBalancerForwardingRuleProperties](docs/models/NetworkLoadBalancerForwardingRuleProperties) - [NetworkLoadBalancerForwardingRulePut](docs/models/NetworkLoadBalancerForwardingRulePut) - [NetworkLoadBalancerForwardingRuleTarget](docs/models/NetworkLoadBalancerForwardingRuleTarget) - [NetworkLoadBalancerForwardingRuleTargetHealthCheck](docs/models/NetworkLoadBalancerForwardingRuleTargetHealthCheck) - [NetworkLoadBalancerForwardingRules](docs/models/NetworkLoadBalancerForwardingRules) - [NetworkLoadBalancerProperties](docs/models/NetworkLoadBalancerProperties) - [NetworkLoadBalancerPut](docs/models/NetworkLoadBalancerPut) - [NetworkLoadBalancers](docs/models/NetworkLoadBalancers) - [Nic](docs/models/Nic) - [NicEntities](docs/models/NicEntities) - [NicProperties](docs/models/NicProperties) - [NicPut](docs/models/NicPut) - [Nics](docs/models/Nics) - [NoStateMetaData](docs/models/NoStateMetaData) - [PaginationLinks](docs/models/PaginationLinks) - [Peer](docs/models/Peer) - [PrivateCrossConnect](docs/models/PrivateCrossConnect) - [PrivateCrossConnectProperties](docs/models/PrivateCrossConnectProperties) - [PrivateCrossConnects](docs/models/PrivateCrossConnects) - [RemoteConsoleUrl](docs/models/RemoteConsoleUrl) - [Request](docs/models/Request) - [RequestMetadata](docs/models/RequestMetadata) - [RequestProperties](docs/models/RequestProperties) - [RequestStatus](docs/models/RequestStatus) - [RequestStatusMetadata](docs/models/RequestStatusMetadata) - [RequestTarget](docs/models/RequestTarget) - [Requests](docs/models/Requests) - [Resource](docs/models/Resource) - [ResourceEntities](docs/models/ResourceEntities) - [ResourceGroups](docs/models/ResourceGroups) - [ResourceLimits](docs/models/ResourceLimits) - [ResourceProperties](docs/models/ResourceProperties) - [ResourceReference](docs/models/ResourceReference) - [Resources](docs/models/Resources) - [ResourcesUsers](docs/models/ResourcesUsers) - [S3Bucket](docs/models/S3Bucket) - [S3Key](docs/models/S3Key) - [S3KeyMetadata](docs/models/S3KeyMetadata) - [S3KeyProperties](docs/models/S3KeyProperties) - [S3Keys](docs/models/S3Keys) - [S3ObjectStorageSSO](docs/models/S3ObjectStorageSSO) - [Server](docs/models/Server) - [ServerEntities](docs/models/ServerEntities) - [ServerProperties](docs/models/ServerProperties) - [Servers](docs/models/Servers) - [Snapshot](docs/models/Snapshot) - [SnapshotProperties](docs/models/SnapshotProperties) - [Snapshots](docs/models/Snapshots) - [TargetGroup](docs/models/TargetGroup) - [TargetGroupHealthCheck](docs/models/TargetGroupHealthCheck) - [TargetGroupHttpHealthCheck](docs/models/TargetGroupHttpHealthCheck) - [TargetGroupProperties](docs/models/TargetGroupProperties) - [TargetGroupPut](docs/models/TargetGroupPut) - [TargetGroupTarget](docs/models/TargetGroupTarget) - [TargetGroups](docs/models/TargetGroups) - [TargetPortRange](docs/models/TargetPortRange) - [Template](docs/models/Template) - [TemplateProperties](docs/models/TemplateProperties) - [Templates](docs/models/Templates) - [Token](docs/models/Token) - [Type](docs/models/Type) - [User](docs/models/User) - [UserMetadata](docs/models/UserMetadata) - [UserPost](docs/models/UserPost) - [UserProperties](docs/models/UserProperties) - [UserPropertiesPost](docs/models/UserPropertiesPost) - [UserPropertiesPut](docs/models/UserPropertiesPut) - [UserPut](docs/models/UserPut) - [Users](docs/models/Users) - [UsersEntities](docs/models/UsersEntities) - [Volume](docs/models/Volume) - [VolumeProperties](docs/models/VolumeProperties) - [Volumes](docs/models/Volumes) [[Back to API list]](#documentation-for-api-endpoints) [[Back to Model list]](#documentation-for-models)
## Documentation for Utility Methods Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it: Deprecated in favor of ToPtr that uses generics * `PtrBool` * `PtrInt` * `PtrInt32` * `PtrInt64` * `PtrFloat` * `PtrFloat32` * `PtrFloat64` * `PtrString` * `PtrTime`golang-github-ionos-cloud-sdk-go-6.2.0/api_.go000066400000000000000000000153321465267054300211400ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" ) // Linger please var ( _ _context.Context ) // DefaultApiService DefaultApi service type DefaultApiService service type ApiApiInfoGetRequest struct { ctx _context.Context ApiService *DefaultApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiApiInfoGetRequest) Pretty(pretty bool) ApiApiInfoGetRequest { r.pretty = &pretty return r } func (r ApiApiInfoGetRequest) Depth(depth int32) ApiApiInfoGetRequest { r.depth = &depth return r } func (r ApiApiInfoGetRequest) XContractNumber(xContractNumber int32) ApiApiInfoGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiApiInfoGetRequest) Filter(key string, value string) ApiApiInfoGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiApiInfoGetRequest) OrderBy(orderBy string) ApiApiInfoGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiApiInfoGetRequest) MaxResults(maxResults int32) ApiApiInfoGetRequest { r.maxResults = &maxResults return r } func (r ApiApiInfoGetRequest) Execute() (Info, *APIResponse, error) { return r.ApiService.ApiInfoGetExecute(r) } /* * ApiInfoGet Get API information * Retrieves the API information such as API version. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiApiInfoGetRequest */ func (a *DefaultApiService) ApiInfoGet(ctx _context.Context) ApiApiInfoGetRequest { return ApiApiInfoGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Info */ func (a *DefaultApiService) ApiInfoGetExecute(r ApiApiInfoGetRequest) (Info, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Info ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ApiInfoGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ApiInfoGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_application_load_balancers.go000066400000000000000000004156601465267054300264050ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // ApplicationLoadBalancersApiService ApplicationLoadBalancersApi service type ApplicationLoadBalancersApiService service type ApiDatacentersApplicationloadbalancersDeleteRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersDeleteRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersDeleteRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersDeleteExecute(r) } /* * DatacentersApplicationloadbalancersDelete Delete an Application Load Balancer by ID * Removes the specified Application Load Balancer from the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @return ApiDatacentersApplicationloadbalancersDeleteRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersDelete(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersDeleteRequest { return ApiDatacentersApplicationloadbalancersDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, } } /* * Execute executes the request */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersDeleteExecute(r ApiDatacentersApplicationloadbalancersDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest) Execute() (ApplicationLoadBalancer, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdExecute(r) } /* * DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId Get an Application Load Balancer by ID * Retrieves the properties of the specified Application Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @return ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest { return ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, } } /* * Execute executes the request * @return ApplicationLoadBalancer */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdExecute(r ApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest) (ApplicationLoadBalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ApplicationLoadBalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string flowLogId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersFlowlogsDeleteExecute(r) } /* * DatacentersApplicationloadbalancersFlowlogsDelete Delete an ALB Flow Log by ID * Deletes the Application Load Balancer flow log specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @param flowLogId The unique ID of the flow log. * @return ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsDelete(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, flowLogId string) ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest { return ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, flowLogId: flowLogId, } } /* * Execute executes the request */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsDeleteExecute(r ApiDatacentersApplicationloadbalancersFlowlogsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersFlowlogsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string flowLogId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdExecute(r) } /* * DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId Get an ALB Flow Log by ID * Retrieves the Application Load Balancer flow log specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @param flowLogId The unique ID of the flow log. * @return ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, flowLogId string) ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest { return ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, flowLogId: flowLogId, } } /* * Execute executes the request * @return FlowLog */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdExecute(r ApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersFlowlogsGetRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string applicationLoadBalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) Filter(key string, value string) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) OrderBy(orderBy string) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) MaxResults(maxResults int32) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) Execute() (FlowLogs, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersFlowlogsGetExecute(r) } /* * DatacentersApplicationloadbalancersFlowlogsGet Get ALB Flow Logs * Retrieves the flow logs for the specified Application Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @return ApiDatacentersApplicationloadbalancersFlowlogsGetRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsGet(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersFlowlogsGetRequest { return ApiDatacentersApplicationloadbalancersFlowlogsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return FlowLogs */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsGetExecute(r ApiDatacentersApplicationloadbalancersFlowlogsGetRequest) (FlowLogs, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLogs ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersFlowlogsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string flowLogId string applicationLoadBalancerFlowLogProperties *FlowLogProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) ApplicationLoadBalancerFlowLogProperties(applicationLoadBalancerFlowLogProperties FlowLogProperties) ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest { r.applicationLoadBalancerFlowLogProperties = &applicationLoadBalancerFlowLogProperties return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersFlowlogsPatchExecute(r) } /* * DatacentersApplicationloadbalancersFlowlogsPatch Partially Modify an ALB Flow Log by ID * Updates the properties of the Application Load Balancer flow log specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @param flowLogId The unique ID of the flow log. * @return ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPatch(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, flowLogId string) ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest { return ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, flowLogId: flowLogId, } } /* * Execute executes the request * @return FlowLog */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPatchExecute(r ApiDatacentersApplicationloadbalancersFlowlogsPatchRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.applicationLoadBalancerFlowLogProperties == nil { return localVarReturnValue, nil, reportError("applicationLoadBalancerFlowLogProperties is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.applicationLoadBalancerFlowLogProperties if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersFlowlogsPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersFlowlogsPostRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string applicationLoadBalancerFlowLog *FlowLog pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog FlowLog) ApiDatacentersApplicationloadbalancersFlowlogsPostRequest { r.applicationLoadBalancerFlowLog = &applicationLoadBalancerFlowLog return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsPostRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersFlowlogsPostExecute(r) } /* * DatacentersApplicationloadbalancersFlowlogsPost Create an ALB Flow Log * Creates a flow log for the Application Load Balancer specified by ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @return ApiDatacentersApplicationloadbalancersFlowlogsPostRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPost(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersFlowlogsPostRequest { return ApiDatacentersApplicationloadbalancersFlowlogsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, } } /* * Execute executes the request * @return FlowLog */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPostExecute(r ApiDatacentersApplicationloadbalancersFlowlogsPostRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.applicationLoadBalancerFlowLog == nil { return localVarReturnValue, nil, reportError("applicationLoadBalancerFlowLog is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.applicationLoadBalancerFlowLog if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersFlowlogsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersFlowlogsPutRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string flowLogId string applicationLoadBalancerFlowLog *FlowLogPut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog FlowLogPut) ApiDatacentersApplicationloadbalancersFlowlogsPutRequest { r.applicationLoadBalancerFlowLog = &applicationLoadBalancerFlowLog return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersFlowlogsPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersFlowlogsPutRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersFlowlogsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersFlowlogsPutExecute(r) } /* * DatacentersApplicationloadbalancersFlowlogsPut Modify an ALB Flow Log by ID * Modifies the Application Load Balancer flow log specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @param flowLogId The unique ID of the flow log. * @return ApiDatacentersApplicationloadbalancersFlowlogsPutRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPut(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, flowLogId string) ApiDatacentersApplicationloadbalancersFlowlogsPutRequest { return ApiDatacentersApplicationloadbalancersFlowlogsPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, flowLogId: flowLogId, } } /* * Execute executes the request * @return FlowLog */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersFlowlogsPutExecute(r ApiDatacentersApplicationloadbalancersFlowlogsPutRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersFlowlogsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.applicationLoadBalancerFlowLog == nil { return localVarReturnValue, nil, reportError("applicationLoadBalancerFlowLog is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.applicationLoadBalancerFlowLog if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersFlowlogsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string forwardingRuleId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesDeleteExecute(r) } /* * DatacentersApplicationloadbalancersForwardingrulesDelete Delete an ALB Forwarding Rule by ID * Deletes the Application Load Balancer forwarding rule specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @param forwardingRuleId The unique ID of the forwarding rule. * @return ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesDelete(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, forwardingRuleId string) ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest { return ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, forwardingRuleId: forwardingRuleId, } } /* * Execute executes the request */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesDeleteExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersForwardingrulesDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string forwardingRuleId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest) Execute() (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdExecute(r) } /* * DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId Get an ALB Forwarding Rule by ID * Retrieves the Application Load Balancer forwarding rule specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @param forwardingRuleId The unique ID of the forwarding rule. * @return ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, forwardingRuleId string) ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest { return ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, forwardingRuleId: forwardingRuleId, } } /* * Execute executes the request * @return ApplicationLoadBalancerForwardingRule */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest) (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ApplicationLoadBalancerForwardingRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string applicationLoadBalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) Filter(key string, value string) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) OrderBy(orderBy string) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) MaxResults(maxResults int32) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) Execute() (ApplicationLoadBalancerForwardingRules, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesGetExecute(r) } /* * DatacentersApplicationloadbalancersForwardingrulesGet Get ALB Forwarding Rules * Lists the forwarding rules of the specified Application Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @return ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesGet(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest { return ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return ApplicationLoadBalancerForwardingRules */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesGetExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesGetRequest) (ApplicationLoadBalancerForwardingRules, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ApplicationLoadBalancerForwardingRules ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersForwardingrulesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string forwardingRuleId string applicationLoadBalancerForwardingRuleProperties *ApplicationLoadBalancerForwardingRuleProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) ApplicationLoadBalancerForwardingRuleProperties(applicationLoadBalancerForwardingRuleProperties ApplicationLoadBalancerForwardingRuleProperties) ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest { r.applicationLoadBalancerForwardingRuleProperties = &applicationLoadBalancerForwardingRuleProperties return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) Execute() (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesPatchExecute(r) } /* * DatacentersApplicationloadbalancersForwardingrulesPatch Partially modify an ALB Forwarding Rule by ID * Updates the properties of the Application Load Balancer forwarding rule specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @param forwardingRuleId The unique ID of the forwarding rule. * @return ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPatch(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, forwardingRuleId string) ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest { return ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, forwardingRuleId: forwardingRuleId, } } /* * Execute executes the request * @return ApplicationLoadBalancerForwardingRule */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPatchExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesPatchRequest) (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ApplicationLoadBalancerForwardingRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.applicationLoadBalancerForwardingRuleProperties == nil { return localVarReturnValue, nil, reportError("applicationLoadBalancerForwardingRuleProperties is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.applicationLoadBalancerForwardingRuleProperties if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersForwardingrulesPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string applicationLoadBalancerForwardingRule *ApplicationLoadBalancerForwardingRule pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule ApplicationLoadBalancerForwardingRule) ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest { r.applicationLoadBalancerForwardingRule = &applicationLoadBalancerForwardingRule return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) Execute() (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesPostExecute(r) } /* * DatacentersApplicationloadbalancersForwardingrulesPost Create an ALB Forwarding Rule * Creates a forwarding rule for the specified Application Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @return ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPost(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest { return ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, } } /* * Execute executes the request * @return ApplicationLoadBalancerForwardingRule */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPostExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesPostRequest) (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ApplicationLoadBalancerForwardingRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.applicationLoadBalancerForwardingRule == nil { return localVarReturnValue, nil, reportError("applicationLoadBalancerForwardingRule is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.applicationLoadBalancerForwardingRule if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersForwardingrulesPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string forwardingRuleId string applicationLoadBalancerForwardingRule *ApplicationLoadBalancerForwardingRulePut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule ApplicationLoadBalancerForwardingRulePut) ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest { r.applicationLoadBalancerForwardingRule = &applicationLoadBalancerForwardingRule return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) Execute() (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersForwardingrulesPutExecute(r) } /* * DatacentersApplicationloadbalancersForwardingrulesPut Modify an ALB Forwarding Rule by ID * Modifies the Application Load Balancer forwarding rule specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @param forwardingRuleId The unique ID of the forwarding rule. * @return ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPut(ctx _context.Context, datacenterId string, applicationLoadBalancerId string, forwardingRuleId string) ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest { return ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, forwardingRuleId: forwardingRuleId, } } /* * Execute executes the request * @return ApplicationLoadBalancerForwardingRule */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersForwardingrulesPutExecute(r ApiDatacentersApplicationloadbalancersForwardingrulesPutRequest) (ApplicationLoadBalancerForwardingRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ApplicationLoadBalancerForwardingRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersForwardingrulesPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.applicationLoadBalancerForwardingRule == nil { return localVarReturnValue, nil, reportError("applicationLoadBalancerForwardingRule is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.applicationLoadBalancerForwardingRule if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersForwardingrulesPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersGetRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersApplicationloadbalancersGetRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersGetRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersGetRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersGetRequest) Offset(offset int32) ApiDatacentersApplicationloadbalancersGetRequest { r.offset = &offset return r } func (r ApiDatacentersApplicationloadbalancersGetRequest) Limit(limit int32) ApiDatacentersApplicationloadbalancersGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersApplicationloadbalancersGetRequest) Filter(key string, value string) ApiDatacentersApplicationloadbalancersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersApplicationloadbalancersGetRequest) OrderBy(orderBy string) ApiDatacentersApplicationloadbalancersGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersApplicationloadbalancersGetRequest) MaxResults(maxResults int32) ApiDatacentersApplicationloadbalancersGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersApplicationloadbalancersGetRequest) Execute() (ApplicationLoadBalancers, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersGetExecute(r) } /* * DatacentersApplicationloadbalancersGet Get Application Load Balancers * Lists all Application Load Balancers within a data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersApplicationloadbalancersGetRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersGet(ctx _context.Context, datacenterId string) ApiDatacentersApplicationloadbalancersGetRequest { return ApiDatacentersApplicationloadbalancersGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return ApplicationLoadBalancers */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersGetExecute(r ApiDatacentersApplicationloadbalancersGetRequest) (ApplicationLoadBalancers, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ApplicationLoadBalancers ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersPatchRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string applicationLoadBalancerProperties *ApplicationLoadBalancerProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersPatchRequest) ApplicationLoadBalancerProperties(applicationLoadBalancerProperties ApplicationLoadBalancerProperties) ApiDatacentersApplicationloadbalancersPatchRequest { r.applicationLoadBalancerProperties = &applicationLoadBalancerProperties return r } func (r ApiDatacentersApplicationloadbalancersPatchRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersPatchRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersPatchRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersPatchRequest) Execute() (ApplicationLoadBalancer, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersPatchExecute(r) } /* * DatacentersApplicationloadbalancersPatch Partially Modify an Application Load Balancer by ID * Updates the properties of the specified Application Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @return ApiDatacentersApplicationloadbalancersPatchRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPatch(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersPatchRequest { return ApiDatacentersApplicationloadbalancersPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, } } /* * Execute executes the request * @return ApplicationLoadBalancer */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPatchExecute(r ApiDatacentersApplicationloadbalancersPatchRequest) (ApplicationLoadBalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ApplicationLoadBalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.applicationLoadBalancerProperties == nil { return localVarReturnValue, nil, reportError("applicationLoadBalancerProperties is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.applicationLoadBalancerProperties if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersPostRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancer *ApplicationLoadBalancer pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersPostRequest) ApplicationLoadBalancer(applicationLoadBalancer ApplicationLoadBalancer) ApiDatacentersApplicationloadbalancersPostRequest { r.applicationLoadBalancer = &applicationLoadBalancer return r } func (r ApiDatacentersApplicationloadbalancersPostRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersPostRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersPostRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersPostRequest) Execute() (ApplicationLoadBalancer, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersPostExecute(r) } /* * DatacentersApplicationloadbalancersPost Create an Application Load Balancer * Creates an Application Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersApplicationloadbalancersPostRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPost(ctx _context.Context, datacenterId string) ApiDatacentersApplicationloadbalancersPostRequest { return ApiDatacentersApplicationloadbalancersPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return ApplicationLoadBalancer */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPostExecute(r ApiDatacentersApplicationloadbalancersPostRequest) (ApplicationLoadBalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ApplicationLoadBalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.applicationLoadBalancer == nil { return localVarReturnValue, nil, reportError("applicationLoadBalancer is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.applicationLoadBalancer if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersApplicationloadbalancersPutRequest struct { ctx _context.Context ApiService *ApplicationLoadBalancersApiService datacenterId string applicationLoadBalancerId string applicationLoadBalancer *ApplicationLoadBalancerPut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersApplicationloadbalancersPutRequest) ApplicationLoadBalancer(applicationLoadBalancer ApplicationLoadBalancerPut) ApiDatacentersApplicationloadbalancersPutRequest { r.applicationLoadBalancer = &applicationLoadBalancer return r } func (r ApiDatacentersApplicationloadbalancersPutRequest) Pretty(pretty bool) ApiDatacentersApplicationloadbalancersPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersApplicationloadbalancersPutRequest) Depth(depth int32) ApiDatacentersApplicationloadbalancersPutRequest { r.depth = &depth return r } func (r ApiDatacentersApplicationloadbalancersPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersApplicationloadbalancersPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersApplicationloadbalancersPutRequest) Execute() (ApplicationLoadBalancer, *APIResponse, error) { return r.ApiService.DatacentersApplicationloadbalancersPutExecute(r) } /* * DatacentersApplicationloadbalancersPut Modify an Application Load Balancer by ID * Modifies the properties of the specified Application Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param applicationLoadBalancerId The unique ID of the Application Load Balancer. * @return ApiDatacentersApplicationloadbalancersPutRequest */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPut(ctx _context.Context, datacenterId string, applicationLoadBalancerId string) ApiDatacentersApplicationloadbalancersPutRequest { return ApiDatacentersApplicationloadbalancersPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, applicationLoadBalancerId: applicationLoadBalancerId, } } /* * Execute executes the request * @return ApplicationLoadBalancer */ func (a *ApplicationLoadBalancersApiService) DatacentersApplicationloadbalancersPutExecute(r ApiDatacentersApplicationloadbalancersPutRequest) (ApplicationLoadBalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ApplicationLoadBalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationLoadBalancersApiService.DatacentersApplicationloadbalancersPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"applicationLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.applicationLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.applicationLoadBalancer == nil { return localVarReturnValue, nil, reportError("applicationLoadBalancer is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.applicationLoadBalancer if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersApplicationloadbalancersPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_backup_units.go000066400000000000000000001243551465267054300235560ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // BackupUnitsApiService BackupUnitsApi service type BackupUnitsApiService service type ApiBackupunitsDeleteRequest struct { ctx _context.Context ApiService *BackupUnitsApiService backupunitId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiBackupunitsDeleteRequest) Pretty(pretty bool) ApiBackupunitsDeleteRequest { r.pretty = &pretty return r } func (r ApiBackupunitsDeleteRequest) Depth(depth int32) ApiBackupunitsDeleteRequest { r.depth = &depth return r } func (r ApiBackupunitsDeleteRequest) XContractNumber(xContractNumber int32) ApiBackupunitsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiBackupunitsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.BackupunitsDeleteExecute(r) } /* - BackupunitsDelete Delete backup units - Remove the specified backup unit. This process will delete: 1) The backup plans inside the backup unit 2) All backups, associated with this backup unit 3) The backup user 4) The backup unit itself - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param backupunitId The unique ID of the backup unit. - @return ApiBackupunitsDeleteRequest */ func (a *BackupUnitsApiService) BackupunitsDelete(ctx _context.Context, backupunitId string) ApiBackupunitsDeleteRequest { return ApiBackupunitsDeleteRequest{ ApiService: a, ctx: ctx, backupunitId: backupunitId, } } /* * Execute executes the request */ func (a *BackupUnitsApiService) BackupunitsDeleteExecute(r ApiBackupunitsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BackupUnitsApiService.BackupunitsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/backupunits/{backupunitId}" localVarPath = strings.Replace(localVarPath, "{"+"backupunitId"+"}", _neturl.PathEscape(parameterToString(r.backupunitId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "BackupunitsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiBackupunitsFindByIdRequest struct { ctx _context.Context ApiService *BackupUnitsApiService backupunitId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiBackupunitsFindByIdRequest) Pretty(pretty bool) ApiBackupunitsFindByIdRequest { r.pretty = &pretty return r } func (r ApiBackupunitsFindByIdRequest) Depth(depth int32) ApiBackupunitsFindByIdRequest { r.depth = &depth return r } func (r ApiBackupunitsFindByIdRequest) XContractNumber(xContractNumber int32) ApiBackupunitsFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiBackupunitsFindByIdRequest) Execute() (BackupUnit, *APIResponse, error) { return r.ApiService.BackupunitsFindByIdExecute(r) } /* * BackupunitsFindById Retrieve backup units * Retrieve the properties of the specified backup unit. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param backupunitId The unique ID of the backup unit. * @return ApiBackupunitsFindByIdRequest */ func (a *BackupUnitsApiService) BackupunitsFindById(ctx _context.Context, backupunitId string) ApiBackupunitsFindByIdRequest { return ApiBackupunitsFindByIdRequest{ ApiService: a, ctx: ctx, backupunitId: backupunitId, } } /* * Execute executes the request * @return BackupUnit */ func (a *BackupUnitsApiService) BackupunitsFindByIdExecute(r ApiBackupunitsFindByIdRequest) (BackupUnit, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue BackupUnit ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BackupUnitsApiService.BackupunitsFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/backupunits/{backupunitId}" localVarPath = strings.Replace(localVarPath, "{"+"backupunitId"+"}", _neturl.PathEscape(parameterToString(r.backupunitId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "BackupunitsFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiBackupunitsGetRequest struct { ctx _context.Context ApiService *BackupUnitsApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiBackupunitsGetRequest) Pretty(pretty bool) ApiBackupunitsGetRequest { r.pretty = &pretty return r } func (r ApiBackupunitsGetRequest) Depth(depth int32) ApiBackupunitsGetRequest { r.depth = &depth return r } func (r ApiBackupunitsGetRequest) XContractNumber(xContractNumber int32) ApiBackupunitsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiBackupunitsGetRequest) Filter(key string, value string) ApiBackupunitsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiBackupunitsGetRequest) OrderBy(orderBy string) ApiBackupunitsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiBackupunitsGetRequest) MaxResults(maxResults int32) ApiBackupunitsGetRequest { r.maxResults = &maxResults return r } func (r ApiBackupunitsGetRequest) Execute() (BackupUnits, *APIResponse, error) { return r.ApiService.BackupunitsGetExecute(r) } /* * BackupunitsGet List backup units * List all available backup units. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiBackupunitsGetRequest */ func (a *BackupUnitsApiService) BackupunitsGet(ctx _context.Context) ApiBackupunitsGetRequest { return ApiBackupunitsGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return BackupUnits */ func (a *BackupUnitsApiService) BackupunitsGetExecute(r ApiBackupunitsGetRequest) (BackupUnits, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue BackupUnits ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BackupUnitsApiService.BackupunitsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/backupunits" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "BackupunitsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiBackupunitsPatchRequest struct { ctx _context.Context ApiService *BackupUnitsApiService backupunitId string backupUnit *BackupUnitProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiBackupunitsPatchRequest) BackupUnit(backupUnit BackupUnitProperties) ApiBackupunitsPatchRequest { r.backupUnit = &backupUnit return r } func (r ApiBackupunitsPatchRequest) Pretty(pretty bool) ApiBackupunitsPatchRequest { r.pretty = &pretty return r } func (r ApiBackupunitsPatchRequest) Depth(depth int32) ApiBackupunitsPatchRequest { r.depth = &depth return r } func (r ApiBackupunitsPatchRequest) XContractNumber(xContractNumber int32) ApiBackupunitsPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiBackupunitsPatchRequest) Execute() (BackupUnit, *APIResponse, error) { return r.ApiService.BackupunitsPatchExecute(r) } /* * BackupunitsPatch Partially modify backup units * Update the properties of the specified backup unit. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param backupunitId The unique ID of the backup unit. * @return ApiBackupunitsPatchRequest */ func (a *BackupUnitsApiService) BackupunitsPatch(ctx _context.Context, backupunitId string) ApiBackupunitsPatchRequest { return ApiBackupunitsPatchRequest{ ApiService: a, ctx: ctx, backupunitId: backupunitId, } } /* * Execute executes the request * @return BackupUnit */ func (a *BackupUnitsApiService) BackupunitsPatchExecute(r ApiBackupunitsPatchRequest) (BackupUnit, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue BackupUnit ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BackupUnitsApiService.BackupunitsPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/backupunits/{backupunitId}" localVarPath = strings.Replace(localVarPath, "{"+"backupunitId"+"}", _neturl.PathEscape(parameterToString(r.backupunitId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.backupUnit == nil { return localVarReturnValue, nil, reportError("backupUnit is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.backupUnit if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "BackupunitsPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiBackupunitsPostRequest struct { ctx _context.Context ApiService *BackupUnitsApiService backupUnit *BackupUnit pretty *bool depth *int32 xContractNumber *int32 } func (r ApiBackupunitsPostRequest) BackupUnit(backupUnit BackupUnit) ApiBackupunitsPostRequest { r.backupUnit = &backupUnit return r } func (r ApiBackupunitsPostRequest) Pretty(pretty bool) ApiBackupunitsPostRequest { r.pretty = &pretty return r } func (r ApiBackupunitsPostRequest) Depth(depth int32) ApiBackupunitsPostRequest { r.depth = &depth return r } func (r ApiBackupunitsPostRequest) XContractNumber(xContractNumber int32) ApiBackupunitsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiBackupunitsPostRequest) Execute() (BackupUnit, *APIResponse, error) { return r.ApiService.BackupunitsPostExecute(r) } /* * BackupunitsPost Create backup units * Create a backup unit. Backup units are resources, same as storage volumes or snapshots; they can be shared through groups in User management. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiBackupunitsPostRequest */ func (a *BackupUnitsApiService) BackupunitsPost(ctx _context.Context) ApiBackupunitsPostRequest { return ApiBackupunitsPostRequest{ ApiService: a, ctx: ctx, } } /* * Execute executes the request * @return BackupUnit */ func (a *BackupUnitsApiService) BackupunitsPostExecute(r ApiBackupunitsPostRequest) (BackupUnit, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue BackupUnit ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BackupUnitsApiService.BackupunitsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/backupunits" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.backupUnit == nil { return localVarReturnValue, nil, reportError("backupUnit is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.backupUnit if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "BackupunitsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiBackupunitsPutRequest struct { ctx _context.Context ApiService *BackupUnitsApiService backupunitId string backupUnit *BackupUnit pretty *bool depth *int32 xContractNumber *int32 } func (r ApiBackupunitsPutRequest) BackupUnit(backupUnit BackupUnit) ApiBackupunitsPutRequest { r.backupUnit = &backupUnit return r } func (r ApiBackupunitsPutRequest) Pretty(pretty bool) ApiBackupunitsPutRequest { r.pretty = &pretty return r } func (r ApiBackupunitsPutRequest) Depth(depth int32) ApiBackupunitsPutRequest { r.depth = &depth return r } func (r ApiBackupunitsPutRequest) XContractNumber(xContractNumber int32) ApiBackupunitsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiBackupunitsPutRequest) Execute() (BackupUnit, *APIResponse, error) { return r.ApiService.BackupunitsPutExecute(r) } /* * BackupunitsPut Modify backup units * Modify the properties of the specified backup unit. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param backupunitId The unique ID of the backup unit. * @return ApiBackupunitsPutRequest */ func (a *BackupUnitsApiService) BackupunitsPut(ctx _context.Context, backupunitId string) ApiBackupunitsPutRequest { return ApiBackupunitsPutRequest{ ApiService: a, ctx: ctx, backupunitId: backupunitId, } } /* * Execute executes the request * @return BackupUnit */ func (a *BackupUnitsApiService) BackupunitsPutExecute(r ApiBackupunitsPutRequest) (BackupUnit, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue BackupUnit ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BackupUnitsApiService.BackupunitsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/backupunits/{backupunitId}" localVarPath = strings.Replace(localVarPath, "{"+"backupunitId"+"}", _neturl.PathEscape(parameterToString(r.backupunitId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.backupUnit == nil { return localVarReturnValue, nil, reportError("backupUnit is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.backupUnit if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "BackupunitsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiBackupunitsSsourlGetRequest struct { ctx _context.Context ApiService *BackupUnitsApiService filters _neturl.Values orderBy *string maxResults *int32 backupunitId string pretty *bool xContractNumber *int32 } func (r ApiBackupunitsSsourlGetRequest) Pretty(pretty bool) ApiBackupunitsSsourlGetRequest { r.pretty = &pretty return r } func (r ApiBackupunitsSsourlGetRequest) XContractNumber(xContractNumber int32) ApiBackupunitsSsourlGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiBackupunitsSsourlGetRequest) Filter(key string, value string) ApiBackupunitsSsourlGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiBackupunitsSsourlGetRequest) OrderBy(orderBy string) ApiBackupunitsSsourlGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiBackupunitsSsourlGetRequest) MaxResults(maxResults int32) ApiBackupunitsSsourlGetRequest { r.maxResults = &maxResults return r } func (r ApiBackupunitsSsourlGetRequest) Execute() (BackupUnitSSO, *APIResponse, error) { return r.ApiService.BackupunitsSsourlGetExecute(r) } /* * BackupunitsSsourlGet Retrieve BU single sign-on URLs * Retrieve a single sign-on URL for the specified backup unit. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param backupunitId The unique ID of the backup unit. * @return ApiBackupunitsSsourlGetRequest */ func (a *BackupUnitsApiService) BackupunitsSsourlGet(ctx _context.Context, backupunitId string) ApiBackupunitsSsourlGetRequest { return ApiBackupunitsSsourlGetRequest{ ApiService: a, ctx: ctx, backupunitId: backupunitId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return BackupUnitSSO */ func (a *BackupUnitsApiService) BackupunitsSsourlGetExecute(r ApiBackupunitsSsourlGetRequest) (BackupUnitSSO, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue BackupUnitSSO ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BackupUnitsApiService.BackupunitsSsourlGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/backupunits/{backupunitId}/ssourl" localVarPath = strings.Replace(localVarPath, "{"+"backupunitId"+"}", _neturl.PathEscape(parameterToString(r.backupunitId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "BackupunitsSsourlGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_contract_resources.go000066400000000000000000000164731465267054300247770ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" ) // Linger please var ( _ _context.Context ) // ContractResourcesApiService ContractResourcesApi service type ContractResourcesApiService service type ApiContractsGetRequest struct { ctx _context.Context ApiService *ContractResourcesApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiContractsGetRequest) Pretty(pretty bool) ApiContractsGetRequest { r.pretty = &pretty return r } func (r ApiContractsGetRequest) Depth(depth int32) ApiContractsGetRequest { r.depth = &depth return r } func (r ApiContractsGetRequest) XContractNumber(xContractNumber int32) ApiContractsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiContractsGetRequest) Filter(key string, value string) ApiContractsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiContractsGetRequest) OrderBy(orderBy string) ApiContractsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiContractsGetRequest) MaxResults(maxResults int32) ApiContractsGetRequest { r.maxResults = &maxResults return r } func (r ApiContractsGetRequest) Execute() (Contracts, *APIResponse, error) { return r.ApiService.ContractsGetExecute(r) } /* * ContractsGet Get Contract Information * Retrieves the properties of the user's contract. This operation allows you to obtain the resource limits and the general contract information. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiContractsGetRequest */ func (a *ContractResourcesApiService) ContractsGet(ctx _context.Context) ApiContractsGetRequest { return ApiContractsGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Contracts */ func (a *ContractResourcesApiService) ContractsGetExecute(r ApiContractsGetRequest) (Contracts, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Contracts ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContractResourcesApiService.ContractsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/contracts" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ContractsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_data_centers.go000066400000000000000000001120341465267054300235120ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // DataCentersApiService DataCentersApi service type DataCentersApiService service type ApiDatacentersDeleteRequest struct { ctx _context.Context ApiService *DataCentersApiService datacenterId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersDeleteRequest) Pretty(pretty bool) ApiDatacentersDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersDeleteRequest) Depth(depth int32) ApiDatacentersDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersDeleteExecute(r) } /* * DatacentersDelete Delete data centers * Delete the specified data center and all the elements it contains. This method is destructive and should be used carefully. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersDeleteRequest */ func (a *DataCentersApiService) DatacentersDelete(ctx _context.Context, datacenterId string) ApiDatacentersDeleteRequest { return ApiDatacentersDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request */ func (a *DataCentersApiService) DatacentersDeleteExecute(r ApiDatacentersDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataCentersApiService.DatacentersDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersFindByIdRequest struct { ctx _context.Context ApiService *DataCentersApiService datacenterId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersFindByIdRequest) Pretty(pretty bool) ApiDatacentersFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersFindByIdRequest) Depth(depth int32) ApiDatacentersFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersFindByIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersFindByIdRequest) Execute() (Datacenter, *APIResponse, error) { return r.ApiService.DatacentersFindByIdExecute(r) } /* * DatacentersFindById Retrieve data centers * Retrieve data centers by resource ID. This value is in the response body when the data center is created, and in the list of the data centers, returned by GET. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersFindByIdRequest */ func (a *DataCentersApiService) DatacentersFindById(ctx _context.Context, datacenterId string) ApiDatacentersFindByIdRequest { return ApiDatacentersFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return Datacenter */ func (a *DataCentersApiService) DatacentersFindByIdExecute(r ApiDatacentersFindByIdRequest) (Datacenter, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Datacenter ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataCentersApiService.DatacentersFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersGetRequest struct { ctx _context.Context ApiService *DataCentersApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersGetRequest) Pretty(pretty bool) ApiDatacentersGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersGetRequest) Depth(depth int32) ApiDatacentersGetRequest { r.depth = &depth return r } func (r ApiDatacentersGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersGetRequest) Offset(offset int32) ApiDatacentersGetRequest { r.offset = &offset return r } func (r ApiDatacentersGetRequest) Limit(limit int32) ApiDatacentersGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersGetRequest) Filter(key string, value string) ApiDatacentersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersGetRequest) OrderBy(orderBy string) ApiDatacentersGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersGetRequest) MaxResults(maxResults int32) ApiDatacentersGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersGetRequest) Execute() (Datacenters, *APIResponse, error) { return r.ApiService.DatacentersGetExecute(r) } /* * DatacentersGet List your data centers * List the data centers for your account. Default limit is the first 100 items; use pagination query parameters for listing more items. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiDatacentersGetRequest */ func (a *DataCentersApiService) DatacentersGet(ctx _context.Context) ApiDatacentersGetRequest { return ApiDatacentersGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Datacenters */ func (a *DataCentersApiService) DatacentersGetExecute(r ApiDatacentersGetRequest) (Datacenters, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Datacenters ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataCentersApiService.DatacentersGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersPatchRequest struct { ctx _context.Context ApiService *DataCentersApiService datacenterId string datacenter *DatacenterProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersPatchRequest) Datacenter(datacenter DatacenterProperties) ApiDatacentersPatchRequest { r.datacenter = &datacenter return r } func (r ApiDatacentersPatchRequest) Pretty(pretty bool) ApiDatacentersPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersPatchRequest) Depth(depth int32) ApiDatacentersPatchRequest { r.depth = &depth return r } func (r ApiDatacentersPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersPatchRequest) Execute() (Datacenter, *APIResponse, error) { return r.ApiService.DatacentersPatchExecute(r) } /* * DatacentersPatch Partially modify a Data Center by ID * Updates the properties of the specified data center, rename it, or change the description. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersPatchRequest */ func (a *DataCentersApiService) DatacentersPatch(ctx _context.Context, datacenterId string) ApiDatacentersPatchRequest { return ApiDatacentersPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return Datacenter */ func (a *DataCentersApiService) DatacentersPatchExecute(r ApiDatacentersPatchRequest) (Datacenter, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Datacenter ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataCentersApiService.DatacentersPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.datacenter == nil { return localVarReturnValue, nil, reportError("datacenter is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.datacenter if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersPostRequest struct { ctx _context.Context ApiService *DataCentersApiService datacenter *Datacenter pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersPostRequest) Datacenter(datacenter Datacenter) ApiDatacentersPostRequest { r.datacenter = &datacenter return r } func (r ApiDatacentersPostRequest) Pretty(pretty bool) ApiDatacentersPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersPostRequest) Depth(depth int32) ApiDatacentersPostRequest { r.depth = &depth return r } func (r ApiDatacentersPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersPostRequest) Execute() (Datacenter, *APIResponse, error) { return r.ApiService.DatacentersPostExecute(r) } /* - DatacentersPost Create a Data Center - Creates new data centers, and data centers that already contain elements, such as servers and storage volumes. Virtual data centers are the foundation of the platform; they act as logical containers for all other objects you create, such as servers and storage volumes. You can provision as many data centers as needed. Data centers have their own private networks and are logically segmented from each other to create isolation. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDatacentersPostRequest */ func (a *DataCentersApiService) DatacentersPost(ctx _context.Context) ApiDatacentersPostRequest { return ApiDatacentersPostRequest{ ApiService: a, ctx: ctx, } } /* * Execute executes the request * @return Datacenter */ func (a *DataCentersApiService) DatacentersPostExecute(r ApiDatacentersPostRequest) (Datacenter, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Datacenter ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataCentersApiService.DatacentersPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.datacenter == nil { return localVarReturnValue, nil, reportError("datacenter is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.datacenter if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersPutRequest struct { ctx _context.Context ApiService *DataCentersApiService datacenterId string datacenter *Datacenter pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersPutRequest) Datacenter(datacenter Datacenter) ApiDatacentersPutRequest { r.datacenter = &datacenter return r } func (r ApiDatacentersPutRequest) Pretty(pretty bool) ApiDatacentersPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersPutRequest) Depth(depth int32) ApiDatacentersPutRequest { r.depth = &depth return r } func (r ApiDatacentersPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersPutRequest) Execute() (Datacenter, *APIResponse, error) { return r.ApiService.DatacentersPutExecute(r) } /* * DatacentersPut Modify a Data Center by ID * Modifies the properties of the specified data center, rename it, or change the description. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersPutRequest */ func (a *DataCentersApiService) DatacentersPut(ctx _context.Context, datacenterId string) ApiDatacentersPutRequest { return ApiDatacentersPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return Datacenter */ func (a *DataCentersApiService) DatacentersPutExecute(r ApiDatacentersPutRequest) (Datacenter, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Datacenter ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataCentersApiService.DatacentersPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.datacenter == nil { return localVarReturnValue, nil, reportError("datacenter is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.datacenter if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_firewall_rules.go000066400000000000000000001301211465267054300240720ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // FirewallRulesApiService FirewallRulesApi service type FirewallRulesApiService service type ApiDatacentersServersNicsFirewallrulesDeleteRequest struct { ctx _context.Context ApiService *FirewallRulesApiService datacenterId string serverId string nicId string firewallruleId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersNicsFirewallrulesDeleteRequest) Pretty(pretty bool) ApiDatacentersServersNicsFirewallrulesDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFirewallrulesDeleteRequest) Depth(depth int32) ApiDatacentersServersNicsFirewallrulesDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFirewallrulesDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsFirewallrulesDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsFirewallrulesDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersNicsFirewallrulesDeleteExecute(r) } /* * DatacentersServersNicsFirewallrulesDelete Delete firewall rules * Delete the specified firewall rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @param firewallruleId The unique ID of the firewall rule. * @return ApiDatacentersServersNicsFirewallrulesDeleteRequest */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesDelete(ctx _context.Context, datacenterId string, serverId string, nicId string, firewallruleId string) ApiDatacentersServersNicsFirewallrulesDeleteRequest { return ApiDatacentersServersNicsFirewallrulesDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, firewallruleId: firewallruleId, } } /* * Execute executes the request */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesDeleteExecute(r ApiDatacentersServersNicsFirewallrulesDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallRulesApiService.DatacentersServersNicsFirewallrulesDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"firewallruleId"+"}", _neturl.PathEscape(parameterToString(r.firewallruleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFirewallrulesDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersNicsFirewallrulesFindByIdRequest struct { ctx _context.Context ApiService *FirewallRulesApiService datacenterId string serverId string nicId string firewallruleId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersNicsFirewallrulesFindByIdRequest) Pretty(pretty bool) ApiDatacentersServersNicsFirewallrulesFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFirewallrulesFindByIdRequest) Depth(depth int32) ApiDatacentersServersNicsFirewallrulesFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFirewallrulesFindByIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsFirewallrulesFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsFirewallrulesFindByIdRequest) Execute() (FirewallRule, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFirewallrulesFindByIdExecute(r) } /* * DatacentersServersNicsFirewallrulesFindById Retrieve firewall rules * Retrieve the properties of the specified firewall rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @param firewallruleId The unique ID of the firewall rule. * @return ApiDatacentersServersNicsFirewallrulesFindByIdRequest */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesFindById(ctx _context.Context, datacenterId string, serverId string, nicId string, firewallruleId string) ApiDatacentersServersNicsFirewallrulesFindByIdRequest { return ApiDatacentersServersNicsFirewallrulesFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, firewallruleId: firewallruleId, } } /* * Execute executes the request * @return FirewallRule */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesFindByIdExecute(r ApiDatacentersServersNicsFirewallrulesFindByIdRequest) (FirewallRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FirewallRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallRulesApiService.DatacentersServersNicsFirewallrulesFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"firewallruleId"+"}", _neturl.PathEscape(parameterToString(r.firewallruleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFirewallrulesFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsFirewallrulesGetRequest struct { ctx _context.Context ApiService *FirewallRulesApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string serverId string nicId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersServersNicsFirewallrulesGetRequest) Pretty(pretty bool) ApiDatacentersServersNicsFirewallrulesGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFirewallrulesGetRequest) Depth(depth int32) ApiDatacentersServersNicsFirewallrulesGetRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFirewallrulesGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsFirewallrulesGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsFirewallrulesGetRequest) Offset(offset int32) ApiDatacentersServersNicsFirewallrulesGetRequest { r.offset = &offset return r } func (r ApiDatacentersServersNicsFirewallrulesGetRequest) Limit(limit int32) ApiDatacentersServersNicsFirewallrulesGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersNicsFirewallrulesGetRequest) Filter(key string, value string) ApiDatacentersServersNicsFirewallrulesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersServersNicsFirewallrulesGetRequest) OrderBy(orderBy string) ApiDatacentersServersNicsFirewallrulesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersServersNicsFirewallrulesGetRequest) MaxResults(maxResults int32) ApiDatacentersServersNicsFirewallrulesGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersServersNicsFirewallrulesGetRequest) Execute() (FirewallRules, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFirewallrulesGetExecute(r) } /* * DatacentersServersNicsFirewallrulesGet List firewall rules * List all firewall rules for the specified NIC. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @return ApiDatacentersServersNicsFirewallrulesGetRequest */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesGet(ctx _context.Context, datacenterId string, serverId string, nicId string) ApiDatacentersServersNicsFirewallrulesGetRequest { return ApiDatacentersServersNicsFirewallrulesGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return FirewallRules */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesGetExecute(r ApiDatacentersServersNicsFirewallrulesGetRequest) (FirewallRules, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FirewallRules ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallRulesApiService.DatacentersServersNicsFirewallrulesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFirewallrulesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsFirewallrulesPatchRequest struct { ctx _context.Context ApiService *FirewallRulesApiService datacenterId string serverId string nicId string firewallruleId string firewallrule *FirewallruleProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersNicsFirewallrulesPatchRequest) Firewallrule(firewallrule FirewallruleProperties) ApiDatacentersServersNicsFirewallrulesPatchRequest { r.firewallrule = &firewallrule return r } func (r ApiDatacentersServersNicsFirewallrulesPatchRequest) Pretty(pretty bool) ApiDatacentersServersNicsFirewallrulesPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFirewallrulesPatchRequest) Depth(depth int32) ApiDatacentersServersNicsFirewallrulesPatchRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFirewallrulesPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsFirewallrulesPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsFirewallrulesPatchRequest) Execute() (FirewallRule, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFirewallrulesPatchExecute(r) } /* * DatacentersServersNicsFirewallrulesPatch Partially modify firewall rules * Update the properties of the specified firewall rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @param firewallruleId The unique ID of the firewall rule. * @return ApiDatacentersServersNicsFirewallrulesPatchRequest */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesPatch(ctx _context.Context, datacenterId string, serverId string, nicId string, firewallruleId string) ApiDatacentersServersNicsFirewallrulesPatchRequest { return ApiDatacentersServersNicsFirewallrulesPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, firewallruleId: firewallruleId, } } /* * Execute executes the request * @return FirewallRule */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesPatchExecute(r ApiDatacentersServersNicsFirewallrulesPatchRequest) (FirewallRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FirewallRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallRulesApiService.DatacentersServersNicsFirewallrulesPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"firewallruleId"+"}", _neturl.PathEscape(parameterToString(r.firewallruleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.firewallrule == nil { return localVarReturnValue, nil, reportError("firewallrule is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.firewallrule if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFirewallrulesPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsFirewallrulesPostRequest struct { ctx _context.Context ApiService *FirewallRulesApiService datacenterId string serverId string nicId string firewallrule *FirewallRule pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersNicsFirewallrulesPostRequest) Firewallrule(firewallrule FirewallRule) ApiDatacentersServersNicsFirewallrulesPostRequest { r.firewallrule = &firewallrule return r } func (r ApiDatacentersServersNicsFirewallrulesPostRequest) Pretty(pretty bool) ApiDatacentersServersNicsFirewallrulesPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFirewallrulesPostRequest) Depth(depth int32) ApiDatacentersServersNicsFirewallrulesPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFirewallrulesPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsFirewallrulesPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsFirewallrulesPostRequest) Execute() (FirewallRule, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFirewallrulesPostExecute(r) } /* * DatacentersServersNicsFirewallrulesPost Create a Firewall Rule * Creates a firewall rule for the specified NIC. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @return ApiDatacentersServersNicsFirewallrulesPostRequest */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesPost(ctx _context.Context, datacenterId string, serverId string, nicId string) ApiDatacentersServersNicsFirewallrulesPostRequest { return ApiDatacentersServersNicsFirewallrulesPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, } } /* * Execute executes the request * @return FirewallRule */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesPostExecute(r ApiDatacentersServersNicsFirewallrulesPostRequest) (FirewallRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FirewallRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallRulesApiService.DatacentersServersNicsFirewallrulesPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.firewallrule == nil { return localVarReturnValue, nil, reportError("firewallrule is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.firewallrule if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFirewallrulesPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsFirewallrulesPutRequest struct { ctx _context.Context ApiService *FirewallRulesApiService datacenterId string serverId string nicId string firewallruleId string firewallrule *FirewallRule pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersNicsFirewallrulesPutRequest) Firewallrule(firewallrule FirewallRule) ApiDatacentersServersNicsFirewallrulesPutRequest { r.firewallrule = &firewallrule return r } func (r ApiDatacentersServersNicsFirewallrulesPutRequest) Pretty(pretty bool) ApiDatacentersServersNicsFirewallrulesPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFirewallrulesPutRequest) Depth(depth int32) ApiDatacentersServersNicsFirewallrulesPutRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFirewallrulesPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsFirewallrulesPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsFirewallrulesPutRequest) Execute() (FirewallRule, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFirewallrulesPutExecute(r) } /* * DatacentersServersNicsFirewallrulesPut Modify a Firewall Rule * Modifies the properties of the specified firewall rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @param firewallruleId The unique ID of the firewall rule. * @return ApiDatacentersServersNicsFirewallrulesPutRequest */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesPut(ctx _context.Context, datacenterId string, serverId string, nicId string, firewallruleId string) ApiDatacentersServersNicsFirewallrulesPutRequest { return ApiDatacentersServersNicsFirewallrulesPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, firewallruleId: firewallruleId, } } /* * Execute executes the request * @return FirewallRule */ func (a *FirewallRulesApiService) DatacentersServersNicsFirewallrulesPutExecute(r ApiDatacentersServersNicsFirewallrulesPutRequest) (FirewallRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FirewallRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallRulesApiService.DatacentersServersNicsFirewallrulesPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"firewallruleId"+"}", _neturl.PathEscape(parameterToString(r.firewallruleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.firewallrule == nil { return localVarReturnValue, nil, reportError("firewallrule is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.firewallrule if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFirewallrulesPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_flow_logs.go000066400000000000000000001213031465267054300230500ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // FlowLogsApiService FlowLogsApi service type FlowLogsApiService service type ApiDatacentersServersNicsFlowlogsDeleteRequest struct { ctx _context.Context ApiService *FlowLogsApiService datacenterId string serverId string nicId string flowlogId string pretty *bool depth *int32 } func (r ApiDatacentersServersNicsFlowlogsDeleteRequest) Pretty(pretty bool) ApiDatacentersServersNicsFlowlogsDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFlowlogsDeleteRequest) Depth(depth int32) ApiDatacentersServersNicsFlowlogsDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFlowlogsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersNicsFlowlogsDeleteExecute(r) } /* * DatacentersServersNicsFlowlogsDelete Delete Flow Logs * Delete the specified Flow Log. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @param flowlogId The unique ID of the Flow Log. * @return ApiDatacentersServersNicsFlowlogsDeleteRequest */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsDelete(ctx _context.Context, datacenterId string, serverId string, nicId string, flowlogId string) ApiDatacentersServersNicsFlowlogsDeleteRequest { return ApiDatacentersServersNicsFlowlogsDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, flowlogId: flowlogId, } } /* * Execute executes the request */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsDeleteExecute(r ApiDatacentersServersNicsFlowlogsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FlowLogsApiService.DatacentersServersNicsFlowlogsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowlogId"+"}", _neturl.PathEscape(parameterToString(r.flowlogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFlowlogsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersNicsFlowlogsFindByIdRequest struct { ctx _context.Context ApiService *FlowLogsApiService datacenterId string serverId string nicId string flowlogId string pretty *bool depth *int32 } func (r ApiDatacentersServersNicsFlowlogsFindByIdRequest) Pretty(pretty bool) ApiDatacentersServersNicsFlowlogsFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFlowlogsFindByIdRequest) Depth(depth int32) ApiDatacentersServersNicsFlowlogsFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFlowlogsFindByIdRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFlowlogsFindByIdExecute(r) } /* * DatacentersServersNicsFlowlogsFindById Retrieve Flow Logs * Retrieve the properties of the specified Flow Log. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @param flowlogId The unique ID of the Flow Log. * @return ApiDatacentersServersNicsFlowlogsFindByIdRequest */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsFindById(ctx _context.Context, datacenterId string, serverId string, nicId string, flowlogId string) ApiDatacentersServersNicsFlowlogsFindByIdRequest { return ApiDatacentersServersNicsFlowlogsFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, flowlogId: flowlogId, } } /* * Execute executes the request * @return FlowLog */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsFindByIdExecute(r ApiDatacentersServersNicsFlowlogsFindByIdRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FlowLogsApiService.DatacentersServersNicsFlowlogsFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowlogId"+"}", _neturl.PathEscape(parameterToString(r.flowlogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFlowlogsFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsFlowlogsGetRequest struct { ctx _context.Context ApiService *FlowLogsApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string serverId string nicId string pretty *bool depth *int32 offset *int32 limit *int32 } func (r ApiDatacentersServersNicsFlowlogsGetRequest) Pretty(pretty bool) ApiDatacentersServersNicsFlowlogsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFlowlogsGetRequest) Depth(depth int32) ApiDatacentersServersNicsFlowlogsGetRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFlowlogsGetRequest) Offset(offset int32) ApiDatacentersServersNicsFlowlogsGetRequest { r.offset = &offset return r } func (r ApiDatacentersServersNicsFlowlogsGetRequest) Limit(limit int32) ApiDatacentersServersNicsFlowlogsGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersNicsFlowlogsGetRequest) Filter(key string, value string) ApiDatacentersServersNicsFlowlogsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersServersNicsFlowlogsGetRequest) OrderBy(orderBy string) ApiDatacentersServersNicsFlowlogsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersServersNicsFlowlogsGetRequest) MaxResults(maxResults int32) ApiDatacentersServersNicsFlowlogsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersServersNicsFlowlogsGetRequest) Execute() (FlowLogs, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFlowlogsGetExecute(r) } /* * DatacentersServersNicsFlowlogsGet List Flow Logs * List all the Flow Logs for the specified NIC. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @return ApiDatacentersServersNicsFlowlogsGetRequest */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsGet(ctx _context.Context, datacenterId string, serverId string, nicId string) ApiDatacentersServersNicsFlowlogsGetRequest { return ApiDatacentersServersNicsFlowlogsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return FlowLogs */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsGetExecute(r ApiDatacentersServersNicsFlowlogsGetRequest) (FlowLogs, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLogs ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FlowLogsApiService.DatacentersServersNicsFlowlogsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFlowlogsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsFlowlogsPatchRequest struct { ctx _context.Context ApiService *FlowLogsApiService datacenterId string serverId string nicId string flowlogId string flowlog *FlowLogProperties pretty *bool depth *int32 } func (r ApiDatacentersServersNicsFlowlogsPatchRequest) Flowlog(flowlog FlowLogProperties) ApiDatacentersServersNicsFlowlogsPatchRequest { r.flowlog = &flowlog return r } func (r ApiDatacentersServersNicsFlowlogsPatchRequest) Pretty(pretty bool) ApiDatacentersServersNicsFlowlogsPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFlowlogsPatchRequest) Depth(depth int32) ApiDatacentersServersNicsFlowlogsPatchRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFlowlogsPatchRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFlowlogsPatchExecute(r) } /* * DatacentersServersNicsFlowlogsPatch Partially modify Flow Logs * Update the specified Flow Log record. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @param flowlogId The unique ID of the Flow Log. * @return ApiDatacentersServersNicsFlowlogsPatchRequest */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsPatch(ctx _context.Context, datacenterId string, serverId string, nicId string, flowlogId string) ApiDatacentersServersNicsFlowlogsPatchRequest { return ApiDatacentersServersNicsFlowlogsPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, flowlogId: flowlogId, } } /* * Execute executes the request * @return FlowLog */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsPatchExecute(r ApiDatacentersServersNicsFlowlogsPatchRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FlowLogsApiService.DatacentersServersNicsFlowlogsPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowlogId"+"}", _neturl.PathEscape(parameterToString(r.flowlogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.flowlog == nil { return localVarReturnValue, nil, reportError("flowlog is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.flowlog if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFlowlogsPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsFlowlogsPostRequest struct { ctx _context.Context ApiService *FlowLogsApiService datacenterId string serverId string nicId string flowlog *FlowLog pretty *bool depth *int32 } func (r ApiDatacentersServersNicsFlowlogsPostRequest) Flowlog(flowlog FlowLog) ApiDatacentersServersNicsFlowlogsPostRequest { r.flowlog = &flowlog return r } func (r ApiDatacentersServersNicsFlowlogsPostRequest) Pretty(pretty bool) ApiDatacentersServersNicsFlowlogsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFlowlogsPostRequest) Depth(depth int32) ApiDatacentersServersNicsFlowlogsPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFlowlogsPostRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFlowlogsPostExecute(r) } /* * DatacentersServersNicsFlowlogsPost Create a Flow Log * Adds a new Flow Log for the specified NIC. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @return ApiDatacentersServersNicsFlowlogsPostRequest */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsPost(ctx _context.Context, datacenterId string, serverId string, nicId string) ApiDatacentersServersNicsFlowlogsPostRequest { return ApiDatacentersServersNicsFlowlogsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, } } /* * Execute executes the request * @return FlowLog */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsPostExecute(r ApiDatacentersServersNicsFlowlogsPostRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FlowLogsApiService.DatacentersServersNicsFlowlogsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.flowlog == nil { return localVarReturnValue, nil, reportError("flowlog is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.flowlog if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFlowlogsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsFlowlogsPutRequest struct { ctx _context.Context ApiService *FlowLogsApiService datacenterId string serverId string nicId string flowlogId string flowlog *FlowLogPut pretty *bool depth *int32 } func (r ApiDatacentersServersNicsFlowlogsPutRequest) Flowlog(flowlog FlowLogPut) ApiDatacentersServersNicsFlowlogsPutRequest { r.flowlog = &flowlog return r } func (r ApiDatacentersServersNicsFlowlogsPutRequest) Pretty(pretty bool) ApiDatacentersServersNicsFlowlogsPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFlowlogsPutRequest) Depth(depth int32) ApiDatacentersServersNicsFlowlogsPutRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFlowlogsPutRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFlowlogsPutExecute(r) } /* * DatacentersServersNicsFlowlogsPut Modify Flow Logs * Modify the specified Flow Log record. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @param flowlogId The unique ID of the Flow Log. * @return ApiDatacentersServersNicsFlowlogsPutRequest */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsPut(ctx _context.Context, datacenterId string, serverId string, nicId string, flowlogId string) ApiDatacentersServersNicsFlowlogsPutRequest { return ApiDatacentersServersNicsFlowlogsPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, flowlogId: flowlogId, } } /* * Execute executes the request * @return FlowLog */ func (a *FlowLogsApiService) DatacentersServersNicsFlowlogsPutExecute(r ApiDatacentersServersNicsFlowlogsPutRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FlowLogsApiService.DatacentersServersNicsFlowlogsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowlogId"+"}", _neturl.PathEscape(parameterToString(r.flowlogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.flowlog == nil { return localVarReturnValue, nil, reportError("flowlog is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.flowlog if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFlowlogsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_images.go000066400000000000000000000716121465267054300223310ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // ImagesApiService ImagesApi service type ImagesApiService service type ApiImagesDeleteRequest struct { ctx _context.Context ApiService *ImagesApiService imageId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiImagesDeleteRequest) Pretty(pretty bool) ApiImagesDeleteRequest { r.pretty = &pretty return r } func (r ApiImagesDeleteRequest) Depth(depth int32) ApiImagesDeleteRequest { r.depth = &depth return r } func (r ApiImagesDeleteRequest) XContractNumber(xContractNumber int32) ApiImagesDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiImagesDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.ImagesDeleteExecute(r) } /* * ImagesDelete Delete images * Delete the specified image; this operation is only supported for private images. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param imageId The unique ID of the image. * @return ApiImagesDeleteRequest */ func (a *ImagesApiService) ImagesDelete(ctx _context.Context, imageId string) ApiImagesDeleteRequest { return ApiImagesDeleteRequest{ ApiService: a, ctx: ctx, imageId: imageId, } } /* * Execute executes the request */ func (a *ImagesApiService) ImagesDeleteExecute(r ApiImagesDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImagesApiService.ImagesDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/{imageId}" localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ImagesDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiImagesFindByIdRequest struct { ctx _context.Context ApiService *ImagesApiService imageId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiImagesFindByIdRequest) Pretty(pretty bool) ApiImagesFindByIdRequest { r.pretty = &pretty return r } func (r ApiImagesFindByIdRequest) Depth(depth int32) ApiImagesFindByIdRequest { r.depth = &depth return r } func (r ApiImagesFindByIdRequest) XContractNumber(xContractNumber int32) ApiImagesFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiImagesFindByIdRequest) Execute() (Image, *APIResponse, error) { return r.ApiService.ImagesFindByIdExecute(r) } /* * ImagesFindById Retrieve images * Retrieve the properties of the specified image. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param imageId The unique ID of the image. * @return ApiImagesFindByIdRequest */ func (a *ImagesApiService) ImagesFindById(ctx _context.Context, imageId string) ApiImagesFindByIdRequest { return ApiImagesFindByIdRequest{ ApiService: a, ctx: ctx, imageId: imageId, } } /* * Execute executes the request * @return Image */ func (a *ImagesApiService) ImagesFindByIdExecute(r ApiImagesFindByIdRequest) (Image, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Image ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImagesApiService.ImagesFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/{imageId}" localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ImagesFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiImagesGetRequest struct { ctx _context.Context ApiService *ImagesApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiImagesGetRequest) Pretty(pretty bool) ApiImagesGetRequest { r.pretty = &pretty return r } func (r ApiImagesGetRequest) Depth(depth int32) ApiImagesGetRequest { r.depth = &depth return r } func (r ApiImagesGetRequest) XContractNumber(xContractNumber int32) ApiImagesGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiImagesGetRequest) Filter(key string, value string) ApiImagesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiImagesGetRequest) OrderBy(orderBy string) ApiImagesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiImagesGetRequest) MaxResults(maxResults int32) ApiImagesGetRequest { r.maxResults = &maxResults return r } func (r ApiImagesGetRequest) Execute() (Images, *APIResponse, error) { return r.ApiService.ImagesGetExecute(r) } /* * ImagesGet List images * List all the images within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiImagesGetRequest */ func (a *ImagesApiService) ImagesGet(ctx _context.Context) ApiImagesGetRequest { return ApiImagesGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Images */ func (a *ImagesApiService) ImagesGetExecute(r ApiImagesGetRequest) (Images, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Images ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImagesApiService.ImagesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ImagesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiImagesPatchRequest struct { ctx _context.Context ApiService *ImagesApiService imageId string image *ImageProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiImagesPatchRequest) Image(image ImageProperties) ApiImagesPatchRequest { r.image = &image return r } func (r ApiImagesPatchRequest) Pretty(pretty bool) ApiImagesPatchRequest { r.pretty = &pretty return r } func (r ApiImagesPatchRequest) Depth(depth int32) ApiImagesPatchRequest { r.depth = &depth return r } func (r ApiImagesPatchRequest) XContractNumber(xContractNumber int32) ApiImagesPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiImagesPatchRequest) Execute() (Image, *APIResponse, error) { return r.ApiService.ImagesPatchExecute(r) } /* * ImagesPatch Partially modify images * Update the properties of the specified image. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param imageId The unique ID of the image. * @return ApiImagesPatchRequest */ func (a *ImagesApiService) ImagesPatch(ctx _context.Context, imageId string) ApiImagesPatchRequest { return ApiImagesPatchRequest{ ApiService: a, ctx: ctx, imageId: imageId, } } /* * Execute executes the request * @return Image */ func (a *ImagesApiService) ImagesPatchExecute(r ApiImagesPatchRequest) (Image, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Image ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImagesApiService.ImagesPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/{imageId}" localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.image == nil { return localVarReturnValue, nil, reportError("image is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.image if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ImagesPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiImagesPutRequest struct { ctx _context.Context ApiService *ImagesApiService imageId string image *Image pretty *bool depth *int32 xContractNumber *int32 } func (r ApiImagesPutRequest) Image(image Image) ApiImagesPutRequest { r.image = &image return r } func (r ApiImagesPutRequest) Pretty(pretty bool) ApiImagesPutRequest { r.pretty = &pretty return r } func (r ApiImagesPutRequest) Depth(depth int32) ApiImagesPutRequest { r.depth = &depth return r } func (r ApiImagesPutRequest) XContractNumber(xContractNumber int32) ApiImagesPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiImagesPutRequest) Execute() (Image, *APIResponse, error) { return r.ApiService.ImagesPutExecute(r) } /* * ImagesPut Modify an Image by ID * Modifies the properties of the specified image. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param imageId The unique ID of the image. * @return ApiImagesPutRequest */ func (a *ImagesApiService) ImagesPut(ctx _context.Context, imageId string) ApiImagesPutRequest { return ApiImagesPutRequest{ ApiService: a, ctx: ctx, imageId: imageId, } } /* * Execute executes the request * @return Image */ func (a *ImagesApiService) ImagesPutExecute(r ApiImagesPutRequest) (Image, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Image ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImagesApiService.ImagesPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/{imageId}" localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.image == nil { return localVarReturnValue, nil, reportError("image is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.image if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ImagesPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_ip_blocks.go000066400000000000000000001070171465267054300230300ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // IPBlocksApiService IPBlocksApi service type IPBlocksApiService service type ApiIpblocksDeleteRequest struct { ctx _context.Context ApiService *IPBlocksApiService ipblockId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiIpblocksDeleteRequest) Pretty(pretty bool) ApiIpblocksDeleteRequest { r.pretty = &pretty return r } func (r ApiIpblocksDeleteRequest) Depth(depth int32) ApiIpblocksDeleteRequest { r.depth = &depth return r } func (r ApiIpblocksDeleteRequest) XContractNumber(xContractNumber int32) ApiIpblocksDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiIpblocksDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.IpblocksDeleteExecute(r) } /* * IpblocksDelete Delete IP blocks * Remove the specified IP block. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @return ApiIpblocksDeleteRequest */ func (a *IPBlocksApiService) IpblocksDelete(ctx _context.Context, ipblockId string) ApiIpblocksDeleteRequest { return ApiIpblocksDeleteRequest{ ApiService: a, ctx: ctx, ipblockId: ipblockId, } } /* * Execute executes the request */ func (a *IPBlocksApiService) IpblocksDeleteExecute(r ApiIpblocksDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IPBlocksApiService.IpblocksDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks/{ipblockId}" localVarPath = strings.Replace(localVarPath, "{"+"ipblockId"+"}", _neturl.PathEscape(parameterToString(r.ipblockId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiIpblocksFindByIdRequest struct { ctx _context.Context ApiService *IPBlocksApiService ipblockId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiIpblocksFindByIdRequest) Pretty(pretty bool) ApiIpblocksFindByIdRequest { r.pretty = &pretty return r } func (r ApiIpblocksFindByIdRequest) Depth(depth int32) ApiIpblocksFindByIdRequest { r.depth = &depth return r } func (r ApiIpblocksFindByIdRequest) XContractNumber(xContractNumber int32) ApiIpblocksFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiIpblocksFindByIdRequest) Execute() (IpBlock, *APIResponse, error) { return r.ApiService.IpblocksFindByIdExecute(r) } /* * IpblocksFindById Retrieve IP blocks * Retrieve the properties of the specified IP block. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @return ApiIpblocksFindByIdRequest */ func (a *IPBlocksApiService) IpblocksFindById(ctx _context.Context, ipblockId string) ApiIpblocksFindByIdRequest { return ApiIpblocksFindByIdRequest{ ApiService: a, ctx: ctx, ipblockId: ipblockId, } } /* * Execute executes the request * @return IpBlock */ func (a *IPBlocksApiService) IpblocksFindByIdExecute(r ApiIpblocksFindByIdRequest) (IpBlock, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue IpBlock ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IPBlocksApiService.IpblocksFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks/{ipblockId}" localVarPath = strings.Replace(localVarPath, "{"+"ipblockId"+"}", _neturl.PathEscape(parameterToString(r.ipblockId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiIpblocksGetRequest struct { ctx _context.Context ApiService *IPBlocksApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiIpblocksGetRequest) Pretty(pretty bool) ApiIpblocksGetRequest { r.pretty = &pretty return r } func (r ApiIpblocksGetRequest) Depth(depth int32) ApiIpblocksGetRequest { r.depth = &depth return r } func (r ApiIpblocksGetRequest) XContractNumber(xContractNumber int32) ApiIpblocksGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiIpblocksGetRequest) Offset(offset int32) ApiIpblocksGetRequest { r.offset = &offset return r } func (r ApiIpblocksGetRequest) Limit(limit int32) ApiIpblocksGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiIpblocksGetRequest) Filter(key string, value string) ApiIpblocksGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiIpblocksGetRequest) OrderBy(orderBy string) ApiIpblocksGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiIpblocksGetRequest) MaxResults(maxResults int32) ApiIpblocksGetRequest { r.maxResults = &maxResults return r } func (r ApiIpblocksGetRequest) Execute() (IpBlocks, *APIResponse, error) { return r.ApiService.IpblocksGetExecute(r) } /* * IpblocksGet List IP blocks * List all reserved IP blocks. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiIpblocksGetRequest */ func (a *IPBlocksApiService) IpblocksGet(ctx _context.Context) ApiIpblocksGetRequest { return ApiIpblocksGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return IpBlocks */ func (a *IPBlocksApiService) IpblocksGetExecute(r ApiIpblocksGetRequest) (IpBlocks, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue IpBlocks ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IPBlocksApiService.IpblocksGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(100, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiIpblocksPatchRequest struct { ctx _context.Context ApiService *IPBlocksApiService ipblockId string ipblock *IpBlockProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiIpblocksPatchRequest) Ipblock(ipblock IpBlockProperties) ApiIpblocksPatchRequest { r.ipblock = &ipblock return r } func (r ApiIpblocksPatchRequest) Pretty(pretty bool) ApiIpblocksPatchRequest { r.pretty = &pretty return r } func (r ApiIpblocksPatchRequest) Depth(depth int32) ApiIpblocksPatchRequest { r.depth = &depth return r } func (r ApiIpblocksPatchRequest) XContractNumber(xContractNumber int32) ApiIpblocksPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiIpblocksPatchRequest) Execute() (IpBlock, *APIResponse, error) { return r.ApiService.IpblocksPatchExecute(r) } /* * IpblocksPatch Partially modify IP blocks * Update the properties of the specified IP block. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @return ApiIpblocksPatchRequest */ func (a *IPBlocksApiService) IpblocksPatch(ctx _context.Context, ipblockId string) ApiIpblocksPatchRequest { return ApiIpblocksPatchRequest{ ApiService: a, ctx: ctx, ipblockId: ipblockId, } } /* * Execute executes the request * @return IpBlock */ func (a *IPBlocksApiService) IpblocksPatchExecute(r ApiIpblocksPatchRequest) (IpBlock, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue IpBlock ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IPBlocksApiService.IpblocksPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks/{ipblockId}" localVarPath = strings.Replace(localVarPath, "{"+"ipblockId"+"}", _neturl.PathEscape(parameterToString(r.ipblockId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.ipblock == nil { return localVarReturnValue, nil, reportError("ipblock is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.ipblock if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiIpblocksPostRequest struct { ctx _context.Context ApiService *IPBlocksApiService ipblock *IpBlock pretty *bool depth *int32 xContractNumber *int32 } func (r ApiIpblocksPostRequest) Ipblock(ipblock IpBlock) ApiIpblocksPostRequest { r.ipblock = &ipblock return r } func (r ApiIpblocksPostRequest) Pretty(pretty bool) ApiIpblocksPostRequest { r.pretty = &pretty return r } func (r ApiIpblocksPostRequest) Depth(depth int32) ApiIpblocksPostRequest { r.depth = &depth return r } func (r ApiIpblocksPostRequest) XContractNumber(xContractNumber int32) ApiIpblocksPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiIpblocksPostRequest) Execute() (IpBlock, *APIResponse, error) { return r.ApiService.IpblocksPostExecute(r) } /* * IpblocksPost Reserve a IP Block * Reserves a new IP block. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiIpblocksPostRequest */ func (a *IPBlocksApiService) IpblocksPost(ctx _context.Context) ApiIpblocksPostRequest { return ApiIpblocksPostRequest{ ApiService: a, ctx: ctx, } } /* * Execute executes the request * @return IpBlock */ func (a *IPBlocksApiService) IpblocksPostExecute(r ApiIpblocksPostRequest) (IpBlock, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue IpBlock ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IPBlocksApiService.IpblocksPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.ipblock == nil { return localVarReturnValue, nil, reportError("ipblock is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.ipblock if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiIpblocksPutRequest struct { ctx _context.Context ApiService *IPBlocksApiService ipblockId string ipblock *IpBlock pretty *bool depth *int32 xContractNumber *int32 } func (r ApiIpblocksPutRequest) Ipblock(ipblock IpBlock) ApiIpblocksPutRequest { r.ipblock = &ipblock return r } func (r ApiIpblocksPutRequest) Pretty(pretty bool) ApiIpblocksPutRequest { r.pretty = &pretty return r } func (r ApiIpblocksPutRequest) Depth(depth int32) ApiIpblocksPutRequest { r.depth = &depth return r } func (r ApiIpblocksPutRequest) XContractNumber(xContractNumber int32) ApiIpblocksPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiIpblocksPutRequest) Execute() (IpBlock, *APIResponse, error) { return r.ApiService.IpblocksPutExecute(r) } /* * IpblocksPut Modify a IP Block by ID * Modifies the properties of the specified IP block. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @return ApiIpblocksPutRequest */ func (a *IPBlocksApiService) IpblocksPut(ctx _context.Context, ipblockId string) ApiIpblocksPutRequest { return ApiIpblocksPutRequest{ ApiService: a, ctx: ctx, ipblockId: ipblockId, } } /* * Execute executes the request * @return IpBlock */ func (a *IPBlocksApiService) IpblocksPutExecute(r ApiIpblocksPutRequest) (IpBlock, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue IpBlock ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IPBlocksApiService.IpblocksPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks/{ipblockId}" localVarPath = strings.Replace(localVarPath, "{"+"ipblockId"+"}", _neturl.PathEscape(parameterToString(r.ipblockId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.ipblock == nil { return localVarReturnValue, nil, reportError("ipblock is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.ipblock if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_kubernetes.go000066400000000000000000003155661465267054300232440ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // KubernetesApiService KubernetesApi service type KubernetesApiService service type ApiK8sDeleteRequest struct { ctx _context.Context ApiService *KubernetesApiService k8sClusterId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sDeleteRequest) Pretty(pretty bool) ApiK8sDeleteRequest { r.pretty = &pretty return r } func (r ApiK8sDeleteRequest) Depth(depth int32) ApiK8sDeleteRequest { r.depth = &depth return r } func (r ApiK8sDeleteRequest) XContractNumber(xContractNumber int32) ApiK8sDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.K8sDeleteExecute(r) } /* * K8sDelete Delete a Kubernetes Cluster by ID * Deletes the K8s cluster specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @return ApiK8sDeleteRequest */ func (a *KubernetesApiService) K8sDelete(ctx _context.Context, k8sClusterId string) ApiK8sDeleteRequest { return ApiK8sDeleteRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, } } /* * Execute executes the request */ func (a *KubernetesApiService) K8sDeleteExecute(r ApiK8sDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiK8sFindByClusterIdRequest struct { ctx _context.Context ApiService *KubernetesApiService k8sClusterId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sFindByClusterIdRequest) Pretty(pretty bool) ApiK8sFindByClusterIdRequest { r.pretty = &pretty return r } func (r ApiK8sFindByClusterIdRequest) Depth(depth int32) ApiK8sFindByClusterIdRequest { r.depth = &depth return r } func (r ApiK8sFindByClusterIdRequest) XContractNumber(xContractNumber int32) ApiK8sFindByClusterIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sFindByClusterIdRequest) Execute() (KubernetesCluster, *APIResponse, error) { return r.ApiService.K8sFindByClusterIdExecute(r) } /* * K8sFindByClusterId Get a Kubernetes Cluster by ID * Retrieves the K8s cluster specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the K8s cluster to be retrieved. * @return ApiK8sFindByClusterIdRequest */ func (a *KubernetesApiService) K8sFindByClusterId(ctx _context.Context, k8sClusterId string) ApiK8sFindByClusterIdRequest { return ApiK8sFindByClusterIdRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, } } /* * Execute executes the request * @return KubernetesCluster */ func (a *KubernetesApiService) K8sFindByClusterIdExecute(r ApiK8sFindByClusterIdRequest) (KubernetesCluster, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue KubernetesCluster ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sFindByClusterId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sFindByClusterId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sGetRequest struct { ctx _context.Context ApiService *KubernetesApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sGetRequest) Pretty(pretty bool) ApiK8sGetRequest { r.pretty = &pretty return r } func (r ApiK8sGetRequest) Depth(depth int32) ApiK8sGetRequest { r.depth = &depth return r } func (r ApiK8sGetRequest) XContractNumber(xContractNumber int32) ApiK8sGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sGetRequest) Filter(key string, value string) ApiK8sGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiK8sGetRequest) OrderBy(orderBy string) ApiK8sGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiK8sGetRequest) MaxResults(maxResults int32) ApiK8sGetRequest { r.maxResults = &maxResults return r } func (r ApiK8sGetRequest) Execute() (KubernetesClusters, *APIResponse, error) { return r.ApiService.K8sGetExecute(r) } /* * K8sGet Get Kubernetes Clusters * Retrieves a list of all K8s clusters provisioned under your account. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiK8sGetRequest */ func (a *KubernetesApiService) K8sGet(ctx _context.Context) ApiK8sGetRequest { return ApiK8sGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return KubernetesClusters */ func (a *KubernetesApiService) K8sGetExecute(r ApiK8sGetRequest) (KubernetesClusters, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue KubernetesClusters ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sKubeconfigGetRequest struct { ctx _context.Context ApiService *KubernetesApiService filters _neturl.Values orderBy *string maxResults *int32 k8sClusterId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sKubeconfigGetRequest) Pretty(pretty bool) ApiK8sKubeconfigGetRequest { r.pretty = &pretty return r } func (r ApiK8sKubeconfigGetRequest) Depth(depth int32) ApiK8sKubeconfigGetRequest { r.depth = &depth return r } func (r ApiK8sKubeconfigGetRequest) XContractNumber(xContractNumber int32) ApiK8sKubeconfigGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sKubeconfigGetRequest) Filter(key string, value string) ApiK8sKubeconfigGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiK8sKubeconfigGetRequest) OrderBy(orderBy string) ApiK8sKubeconfigGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiK8sKubeconfigGetRequest) MaxResults(maxResults int32) ApiK8sKubeconfigGetRequest { r.maxResults = &maxResults return r } func (r ApiK8sKubeconfigGetRequest) Execute() (string, *APIResponse, error) { return r.ApiService.K8sKubeconfigGetExecute(r) } /* * K8sKubeconfigGet Get Kubernetes Configuration File * Retrieves the configuration file for the specified K8s cluster. You can define the format (YAML or JSON) of the returned file in the Accept header. By default, 'application/yaml' is specified. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @return ApiK8sKubeconfigGetRequest */ func (a *KubernetesApiService) K8sKubeconfigGet(ctx _context.Context, k8sClusterId string) ApiK8sKubeconfigGetRequest { return ApiK8sKubeconfigGetRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return string */ func (a *KubernetesApiService) K8sKubeconfigGetExecute(r ApiK8sKubeconfigGetRequest) (string, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue string ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sKubeconfigGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}/kubeconfig" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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/yaml", "application/x-yaml", "application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sKubeconfigGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sNodepoolsDeleteRequest struct { ctx _context.Context ApiService *KubernetesApiService k8sClusterId string nodepoolId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sNodepoolsDeleteRequest) Pretty(pretty bool) ApiK8sNodepoolsDeleteRequest { r.pretty = &pretty return r } func (r ApiK8sNodepoolsDeleteRequest) Depth(depth int32) ApiK8sNodepoolsDeleteRequest { r.depth = &depth return r } func (r ApiK8sNodepoolsDeleteRequest) XContractNumber(xContractNumber int32) ApiK8sNodepoolsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sNodepoolsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.K8sNodepoolsDeleteExecute(r) } /* * K8sNodepoolsDelete Delete a Kubernetes Node Pool by ID * Deletes the K8s node pool specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. * @return ApiK8sNodepoolsDeleteRequest */ func (a *KubernetesApiService) K8sNodepoolsDelete(ctx _context.Context, k8sClusterId string, nodepoolId string) ApiK8sNodepoolsDeleteRequest { return ApiK8sNodepoolsDeleteRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, nodepoolId: nodepoolId, } } /* * Execute executes the request */ func (a *KubernetesApiService) K8sNodepoolsDeleteExecute(r ApiK8sNodepoolsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sNodepoolsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}/nodepools/{nodepoolId}" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nodepoolId"+"}", _neturl.PathEscape(parameterToString(r.nodepoolId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sNodepoolsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiK8sNodepoolsFindByIdRequest struct { ctx _context.Context ApiService *KubernetesApiService k8sClusterId string nodepoolId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sNodepoolsFindByIdRequest) Pretty(pretty bool) ApiK8sNodepoolsFindByIdRequest { r.pretty = &pretty return r } func (r ApiK8sNodepoolsFindByIdRequest) Depth(depth int32) ApiK8sNodepoolsFindByIdRequest { r.depth = &depth return r } func (r ApiK8sNodepoolsFindByIdRequest) XContractNumber(xContractNumber int32) ApiK8sNodepoolsFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sNodepoolsFindByIdRequest) Execute() (KubernetesNodePool, *APIResponse, error) { return r.ApiService.K8sNodepoolsFindByIdExecute(r) } /* * K8sNodepoolsFindById Get a Kubernetes Node Pool by ID * Retrieves the K8s node pool specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. * @return ApiK8sNodepoolsFindByIdRequest */ func (a *KubernetesApiService) K8sNodepoolsFindById(ctx _context.Context, k8sClusterId string, nodepoolId string) ApiK8sNodepoolsFindByIdRequest { return ApiK8sNodepoolsFindByIdRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, nodepoolId: nodepoolId, } } /* * Execute executes the request * @return KubernetesNodePool */ func (a *KubernetesApiService) K8sNodepoolsFindByIdExecute(r ApiK8sNodepoolsFindByIdRequest) (KubernetesNodePool, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue KubernetesNodePool ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sNodepoolsFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}/nodepools/{nodepoolId}" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nodepoolId"+"}", _neturl.PathEscape(parameterToString(r.nodepoolId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sNodepoolsFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sNodepoolsGetRequest struct { ctx _context.Context ApiService *KubernetesApiService filters _neturl.Values orderBy *string maxResults *int32 k8sClusterId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sNodepoolsGetRequest) Pretty(pretty bool) ApiK8sNodepoolsGetRequest { r.pretty = &pretty return r } func (r ApiK8sNodepoolsGetRequest) Depth(depth int32) ApiK8sNodepoolsGetRequest { r.depth = &depth return r } func (r ApiK8sNodepoolsGetRequest) XContractNumber(xContractNumber int32) ApiK8sNodepoolsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sNodepoolsGetRequest) Filter(key string, value string) ApiK8sNodepoolsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiK8sNodepoolsGetRequest) OrderBy(orderBy string) ApiK8sNodepoolsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiK8sNodepoolsGetRequest) MaxResults(maxResults int32) ApiK8sNodepoolsGetRequest { r.maxResults = &maxResults return r } func (r ApiK8sNodepoolsGetRequest) Execute() (KubernetesNodePools, *APIResponse, error) { return r.ApiService.K8sNodepoolsGetExecute(r) } /* * K8sNodepoolsGet Get Kubernetes Node Pools * Retrieves a list of K8s node pools of a cluster specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @return ApiK8sNodepoolsGetRequest */ func (a *KubernetesApiService) K8sNodepoolsGet(ctx _context.Context, k8sClusterId string) ApiK8sNodepoolsGetRequest { return ApiK8sNodepoolsGetRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return KubernetesNodePools */ func (a *KubernetesApiService) K8sNodepoolsGetExecute(r ApiK8sNodepoolsGetRequest) (KubernetesNodePools, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue KubernetesNodePools ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sNodepoolsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}/nodepools" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sNodepoolsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sNodepoolsNodesDeleteRequest struct { ctx _context.Context ApiService *KubernetesApiService k8sClusterId string nodepoolId string nodeId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sNodepoolsNodesDeleteRequest) Pretty(pretty bool) ApiK8sNodepoolsNodesDeleteRequest { r.pretty = &pretty return r } func (r ApiK8sNodepoolsNodesDeleteRequest) Depth(depth int32) ApiK8sNodepoolsNodesDeleteRequest { r.depth = &depth return r } func (r ApiK8sNodepoolsNodesDeleteRequest) XContractNumber(xContractNumber int32) ApiK8sNodepoolsNodesDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sNodepoolsNodesDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.K8sNodepoolsNodesDeleteExecute(r) } /* * K8sNodepoolsNodesDelete Delete a Kubernetes Node by ID * Deletes the K8s node specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. * @param nodeId The unique ID of the Kubernetes node. * @return ApiK8sNodepoolsNodesDeleteRequest */ func (a *KubernetesApiService) K8sNodepoolsNodesDelete(ctx _context.Context, k8sClusterId string, nodepoolId string, nodeId string) ApiK8sNodepoolsNodesDeleteRequest { return ApiK8sNodepoolsNodesDeleteRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, nodepoolId: nodepoolId, nodeId: nodeId, } } /* * Execute executes the request */ func (a *KubernetesApiService) K8sNodepoolsNodesDeleteExecute(r ApiK8sNodepoolsNodesDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sNodepoolsNodesDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nodepoolId"+"}", _neturl.PathEscape(parameterToString(r.nodepoolId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nodeId"+"}", _neturl.PathEscape(parameterToString(r.nodeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sNodepoolsNodesDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiK8sNodepoolsNodesFindByIdRequest struct { ctx _context.Context ApiService *KubernetesApiService k8sClusterId string nodepoolId string nodeId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sNodepoolsNodesFindByIdRequest) Pretty(pretty bool) ApiK8sNodepoolsNodesFindByIdRequest { r.pretty = &pretty return r } func (r ApiK8sNodepoolsNodesFindByIdRequest) Depth(depth int32) ApiK8sNodepoolsNodesFindByIdRequest { r.depth = &depth return r } func (r ApiK8sNodepoolsNodesFindByIdRequest) XContractNumber(xContractNumber int32) ApiK8sNodepoolsNodesFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sNodepoolsNodesFindByIdRequest) Execute() (KubernetesNode, *APIResponse, error) { return r.ApiService.K8sNodepoolsNodesFindByIdExecute(r) } /* * K8sNodepoolsNodesFindById Get Kubernetes Node by ID * Retrieves the K8s node specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. * @param nodeId The unique ID of the Kubernetes node. * @return ApiK8sNodepoolsNodesFindByIdRequest */ func (a *KubernetesApiService) K8sNodepoolsNodesFindById(ctx _context.Context, k8sClusterId string, nodepoolId string, nodeId string) ApiK8sNodepoolsNodesFindByIdRequest { return ApiK8sNodepoolsNodesFindByIdRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, nodepoolId: nodepoolId, nodeId: nodeId, } } /* * Execute executes the request * @return KubernetesNode */ func (a *KubernetesApiService) K8sNodepoolsNodesFindByIdExecute(r ApiK8sNodepoolsNodesFindByIdRequest) (KubernetesNode, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue KubernetesNode ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sNodepoolsNodesFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nodepoolId"+"}", _neturl.PathEscape(parameterToString(r.nodepoolId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nodeId"+"}", _neturl.PathEscape(parameterToString(r.nodeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sNodepoolsNodesFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sNodepoolsNodesGetRequest struct { ctx _context.Context ApiService *KubernetesApiService filters _neturl.Values orderBy *string maxResults *int32 k8sClusterId string nodepoolId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sNodepoolsNodesGetRequest) Pretty(pretty bool) ApiK8sNodepoolsNodesGetRequest { r.pretty = &pretty return r } func (r ApiK8sNodepoolsNodesGetRequest) Depth(depth int32) ApiK8sNodepoolsNodesGetRequest { r.depth = &depth return r } func (r ApiK8sNodepoolsNodesGetRequest) XContractNumber(xContractNumber int32) ApiK8sNodepoolsNodesGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sNodepoolsNodesGetRequest) Filter(key string, value string) ApiK8sNodepoolsNodesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiK8sNodepoolsNodesGetRequest) OrderBy(orderBy string) ApiK8sNodepoolsNodesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiK8sNodepoolsNodesGetRequest) MaxResults(maxResults int32) ApiK8sNodepoolsNodesGetRequest { r.maxResults = &maxResults return r } func (r ApiK8sNodepoolsNodesGetRequest) Execute() (KubernetesNodes, *APIResponse, error) { return r.ApiService.K8sNodepoolsNodesGetExecute(r) } /* * K8sNodepoolsNodesGet Get Kubernetes Nodes * Retrieves the list of all K8s nodes of the specified node pool. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. * @return ApiK8sNodepoolsNodesGetRequest */ func (a *KubernetesApiService) K8sNodepoolsNodesGet(ctx _context.Context, k8sClusterId string, nodepoolId string) ApiK8sNodepoolsNodesGetRequest { return ApiK8sNodepoolsNodesGetRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, nodepoolId: nodepoolId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return KubernetesNodes */ func (a *KubernetesApiService) K8sNodepoolsNodesGetExecute(r ApiK8sNodepoolsNodesGetRequest) (KubernetesNodes, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue KubernetesNodes ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sNodepoolsNodesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nodepoolId"+"}", _neturl.PathEscape(parameterToString(r.nodepoolId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sNodepoolsNodesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sNodepoolsNodesReplacePostRequest struct { ctx _context.Context ApiService *KubernetesApiService k8sClusterId string nodepoolId string nodeId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sNodepoolsNodesReplacePostRequest) Pretty(pretty bool) ApiK8sNodepoolsNodesReplacePostRequest { r.pretty = &pretty return r } func (r ApiK8sNodepoolsNodesReplacePostRequest) Depth(depth int32) ApiK8sNodepoolsNodesReplacePostRequest { r.depth = &depth return r } func (r ApiK8sNodepoolsNodesReplacePostRequest) XContractNumber(xContractNumber int32) ApiK8sNodepoolsNodesReplacePostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sNodepoolsNodesReplacePostRequest) Execute() (*APIResponse, error) { return r.ApiService.K8sNodepoolsNodesReplacePostExecute(r) } /* - K8sNodepoolsNodesReplacePost Recreate a Kubernetes Node by ID - Recreates the K8s node specified by its ID. If a node becomes unusable, Managed Kubernetes allows you to recreate it with a configuration based on the node pool template. Once the status is 'Active,' all the pods from the failed node will be migrated to the new node. The node pool has an additional billable 'active' node during this process. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param k8sClusterId The unique ID of the Kubernetes cluster. - @param nodepoolId The unique ID of the Kubernetes node pool. - @param nodeId The unique ID of the Kubernetes node. - @return ApiK8sNodepoolsNodesReplacePostRequest */ func (a *KubernetesApiService) K8sNodepoolsNodesReplacePost(ctx _context.Context, k8sClusterId string, nodepoolId string, nodeId string) ApiK8sNodepoolsNodesReplacePostRequest { return ApiK8sNodepoolsNodesReplacePostRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, nodepoolId: nodepoolId, nodeId: nodeId, } } /* * Execute executes the request */ func (a *KubernetesApiService) K8sNodepoolsNodesReplacePostExecute(r ApiK8sNodepoolsNodesReplacePostRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sNodepoolsNodesReplacePost") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nodepoolId"+"}", _neturl.PathEscape(parameterToString(r.nodepoolId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nodeId"+"}", _neturl.PathEscape(parameterToString(r.nodeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sNodepoolsNodesReplacePost", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiK8sNodepoolsPostRequest struct { ctx _context.Context ApiService *KubernetesApiService k8sClusterId string kubernetesNodePool *KubernetesNodePoolForPost pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sNodepoolsPostRequest) KubernetesNodePool(kubernetesNodePool KubernetesNodePoolForPost) ApiK8sNodepoolsPostRequest { r.kubernetesNodePool = &kubernetesNodePool return r } func (r ApiK8sNodepoolsPostRequest) Pretty(pretty bool) ApiK8sNodepoolsPostRequest { r.pretty = &pretty return r } func (r ApiK8sNodepoolsPostRequest) Depth(depth int32) ApiK8sNodepoolsPostRequest { r.depth = &depth return r } func (r ApiK8sNodepoolsPostRequest) XContractNumber(xContractNumber int32) ApiK8sNodepoolsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sNodepoolsPostRequest) Execute() (KubernetesNodePool, *APIResponse, error) { return r.ApiService.K8sNodepoolsPostExecute(r) } /* * K8sNodepoolsPost Create a Kubernetes Node Pool * Creates a node pool inside the specified K8s cluster. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @return ApiK8sNodepoolsPostRequest */ func (a *KubernetesApiService) K8sNodepoolsPost(ctx _context.Context, k8sClusterId string) ApiK8sNodepoolsPostRequest { return ApiK8sNodepoolsPostRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, } } /* * Execute executes the request * @return KubernetesNodePool */ func (a *KubernetesApiService) K8sNodepoolsPostExecute(r ApiK8sNodepoolsPostRequest) (KubernetesNodePool, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue KubernetesNodePool ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sNodepoolsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}/nodepools" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.kubernetesNodePool == nil { return localVarReturnValue, nil, reportError("kubernetesNodePool is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.kubernetesNodePool if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sNodepoolsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sNodepoolsPutRequest struct { ctx _context.Context ApiService *KubernetesApiService k8sClusterId string nodepoolId string kubernetesNodePool *KubernetesNodePoolForPut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sNodepoolsPutRequest) KubernetesNodePool(kubernetesNodePool KubernetesNodePoolForPut) ApiK8sNodepoolsPutRequest { r.kubernetesNodePool = &kubernetesNodePool return r } func (r ApiK8sNodepoolsPutRequest) Pretty(pretty bool) ApiK8sNodepoolsPutRequest { r.pretty = &pretty return r } func (r ApiK8sNodepoolsPutRequest) Depth(depth int32) ApiK8sNodepoolsPutRequest { r.depth = &depth return r } func (r ApiK8sNodepoolsPutRequest) XContractNumber(xContractNumber int32) ApiK8sNodepoolsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sNodepoolsPutRequest) Execute() (KubernetesNodePool, *APIResponse, error) { return r.ApiService.K8sNodepoolsPutExecute(r) } /* * K8sNodepoolsPut Modify a Kubernetes Node Pool by ID * Modifies the K8s node pool specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @param nodepoolId The unique ID of the Kubernetes node pool. * @return ApiK8sNodepoolsPutRequest */ func (a *KubernetesApiService) K8sNodepoolsPut(ctx _context.Context, k8sClusterId string, nodepoolId string) ApiK8sNodepoolsPutRequest { return ApiK8sNodepoolsPutRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, nodepoolId: nodepoolId, } } /* * Execute executes the request * @return KubernetesNodePool */ func (a *KubernetesApiService) K8sNodepoolsPutExecute(r ApiK8sNodepoolsPutRequest) (KubernetesNodePool, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue KubernetesNodePool ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sNodepoolsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}/nodepools/{nodepoolId}" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nodepoolId"+"}", _neturl.PathEscape(parameterToString(r.nodepoolId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.kubernetesNodePool == nil { return localVarReturnValue, nil, reportError("kubernetesNodePool is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.kubernetesNodePool if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sNodepoolsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sPostRequest struct { ctx _context.Context ApiService *KubernetesApiService kubernetesCluster *KubernetesClusterForPost pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sPostRequest) KubernetesCluster(kubernetesCluster KubernetesClusterForPost) ApiK8sPostRequest { r.kubernetesCluster = &kubernetesCluster return r } func (r ApiK8sPostRequest) Pretty(pretty bool) ApiK8sPostRequest { r.pretty = &pretty return r } func (r ApiK8sPostRequest) Depth(depth int32) ApiK8sPostRequest { r.depth = &depth return r } func (r ApiK8sPostRequest) XContractNumber(xContractNumber int32) ApiK8sPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sPostRequest) Execute() (KubernetesCluster, *APIResponse, error) { return r.ApiService.K8sPostExecute(r) } /* * K8sPost Create a Kubernetes Cluster * Creates a K8s cluster provisioned under your account. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiK8sPostRequest */ func (a *KubernetesApiService) K8sPost(ctx _context.Context) ApiK8sPostRequest { return ApiK8sPostRequest{ ApiService: a, ctx: ctx, } } /* * Execute executes the request * @return KubernetesCluster */ func (a *KubernetesApiService) K8sPostExecute(r ApiK8sPostRequest) (KubernetesCluster, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue KubernetesCluster ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.kubernetesCluster == nil { return localVarReturnValue, nil, reportError("kubernetesCluster is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.kubernetesCluster if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sPutRequest struct { ctx _context.Context ApiService *KubernetesApiService k8sClusterId string kubernetesCluster *KubernetesClusterForPut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiK8sPutRequest) KubernetesCluster(kubernetesCluster KubernetesClusterForPut) ApiK8sPutRequest { r.kubernetesCluster = &kubernetesCluster return r } func (r ApiK8sPutRequest) Pretty(pretty bool) ApiK8sPutRequest { r.pretty = &pretty return r } func (r ApiK8sPutRequest) Depth(depth int32) ApiK8sPutRequest { r.depth = &depth return r } func (r ApiK8sPutRequest) XContractNumber(xContractNumber int32) ApiK8sPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiK8sPutRequest) Execute() (KubernetesCluster, *APIResponse, error) { return r.ApiService.K8sPutExecute(r) } /* * K8sPut Modify a Kubernetes Cluster by ID * Modifies the K8s cluster specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param k8sClusterId The unique ID of the Kubernetes cluster. * @return ApiK8sPutRequest */ func (a *KubernetesApiService) K8sPut(ctx _context.Context, k8sClusterId string) ApiK8sPutRequest { return ApiK8sPutRequest{ ApiService: a, ctx: ctx, k8sClusterId: k8sClusterId, } } /* * Execute executes the request * @return KubernetesCluster */ func (a *KubernetesApiService) K8sPutExecute(r ApiK8sPutRequest) (KubernetesCluster, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue KubernetesCluster ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/{k8sClusterId}" localVarPath = strings.Replace(localVarPath, "{"+"k8sClusterId"+"}", _neturl.PathEscape(parameterToString(r.k8sClusterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.kubernetesCluster == nil { return localVarReturnValue, nil, reportError("kubernetesCluster is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.kubernetesCluster if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sVersionsDefaultGetRequest struct { ctx _context.Context ApiService *KubernetesApiService filters _neturl.Values orderBy *string maxResults *int32 } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sVersionsDefaultGetRequest) Filter(key string, value string) ApiK8sVersionsDefaultGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiK8sVersionsDefaultGetRequest) OrderBy(orderBy string) ApiK8sVersionsDefaultGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiK8sVersionsDefaultGetRequest) MaxResults(maxResults int32) ApiK8sVersionsDefaultGetRequest { r.maxResults = &maxResults return r } func (r ApiK8sVersionsDefaultGetRequest) Execute() (string, *APIResponse, error) { return r.ApiService.K8sVersionsDefaultGetExecute(r) } /* * K8sVersionsDefaultGet Get Default Kubernetes Version * Retrieves the current default K8s version to be used by the clusters and node pools. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiK8sVersionsDefaultGetRequest */ func (a *KubernetesApiService) K8sVersionsDefaultGet(ctx _context.Context) ApiK8sVersionsDefaultGetRequest { return ApiK8sVersionsDefaultGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return string */ func (a *KubernetesApiService) K8sVersionsDefaultGetExecute(r ApiK8sVersionsDefaultGetRequest) (string, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue string ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sVersionsDefaultGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/versions/default" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sVersionsDefaultGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiK8sVersionsGetRequest struct { ctx _context.Context ApiService *KubernetesApiService filters _neturl.Values orderBy *string maxResults *int32 } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiK8sVersionsGetRequest) Filter(key string, value string) ApiK8sVersionsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiK8sVersionsGetRequest) OrderBy(orderBy string) ApiK8sVersionsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiK8sVersionsGetRequest) MaxResults(maxResults int32) ApiK8sVersionsGetRequest { r.maxResults = &maxResults return r } func (r ApiK8sVersionsGetRequest) Execute() ([]string, *APIResponse, error) { return r.ApiService.K8sVersionsGetExecute(r) } /* * K8sVersionsGet Get Kubernetes Versions * Lists available K8s versions. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiK8sVersionsGetRequest */ func (a *KubernetesApiService) K8sVersionsGet(ctx _context.Context) ApiK8sVersionsGetRequest { return ApiK8sVersionsGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return []string */ func (a *KubernetesApiService) K8sVersionsGetExecute(r ApiK8sVersionsGetRequest) ([]string, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue []string ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KubernetesApiService.K8sVersionsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/k8s/versions" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "K8sVersionsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_labels.go000066400000000000000000006131671465267054300223350ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // LabelsApiService LabelsApi service type LabelsApiService service type ApiDatacentersLabelsDeleteRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLabelsDeleteRequest) Pretty(pretty bool) ApiDatacentersLabelsDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersLabelsDeleteRequest) Depth(depth int32) ApiDatacentersLabelsDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersLabelsDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersLabelsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLabelsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersLabelsDeleteExecute(r) } /* * DatacentersLabelsDelete Delete data center labels * Delete the specified data center label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param key The label key * @return ApiDatacentersLabelsDeleteRequest */ func (a *LabelsApiService) DatacentersLabelsDelete(ctx _context.Context, datacenterId string, key string) ApiDatacentersLabelsDeleteRequest { return ApiDatacentersLabelsDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, key: key, } } /* * Execute executes the request */ func (a *LabelsApiService) DatacentersLabelsDeleteExecute(r ApiDatacentersLabelsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersLabelsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLabelsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersLabelsFindByKeyRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLabelsFindByKeyRequest) Pretty(pretty bool) ApiDatacentersLabelsFindByKeyRequest { r.pretty = &pretty return r } func (r ApiDatacentersLabelsFindByKeyRequest) Depth(depth int32) ApiDatacentersLabelsFindByKeyRequest { r.depth = &depth return r } func (r ApiDatacentersLabelsFindByKeyRequest) XContractNumber(xContractNumber int32) ApiDatacentersLabelsFindByKeyRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLabelsFindByKeyRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.DatacentersLabelsFindByKeyExecute(r) } /* * DatacentersLabelsFindByKey Retrieve data center labels * Retrieve the properties of the specified data center label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param key The label key * @return ApiDatacentersLabelsFindByKeyRequest */ func (a *LabelsApiService) DatacentersLabelsFindByKey(ctx _context.Context, datacenterId string, key string) ApiDatacentersLabelsFindByKeyRequest { return ApiDatacentersLabelsFindByKeyRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) DatacentersLabelsFindByKeyExecute(r ApiDatacentersLabelsFindByKeyRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersLabelsFindByKey") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLabelsFindByKey", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLabelsGetRequest struct { ctx _context.Context ApiService *LabelsApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLabelsGetRequest) Pretty(pretty bool) ApiDatacentersLabelsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersLabelsGetRequest) Depth(depth int32) ApiDatacentersLabelsGetRequest { r.depth = &depth return r } func (r ApiDatacentersLabelsGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersLabelsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersLabelsGetRequest) Filter(key string, value string) ApiDatacentersLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersLabelsGetRequest) OrderBy(orderBy string) ApiDatacentersLabelsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersLabelsGetRequest) MaxResults(maxResults int32) ApiDatacentersLabelsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersLabelsGetRequest) Execute() (LabelResources, *APIResponse, error) { return r.ApiService.DatacentersLabelsGetExecute(r) } /* * DatacentersLabelsGet List data center labels * List all the the labels for the specified data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersLabelsGetRequest */ func (a *LabelsApiService) DatacentersLabelsGet(ctx _context.Context, datacenterId string) ApiDatacentersLabelsGetRequest { return ApiDatacentersLabelsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return LabelResources */ func (a *LabelsApiService) DatacentersLabelsGetExecute(r ApiDatacentersLabelsGetRequest) (LabelResources, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResources ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersLabelsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLabelsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLabelsPostRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLabelsPostRequest) Label(label LabelResource) ApiDatacentersLabelsPostRequest { r.label = &label return r } func (r ApiDatacentersLabelsPostRequest) Pretty(pretty bool) ApiDatacentersLabelsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersLabelsPostRequest) Depth(depth int32) ApiDatacentersLabelsPostRequest { r.depth = &depth return r } func (r ApiDatacentersLabelsPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersLabelsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLabelsPostRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.DatacentersLabelsPostExecute(r) } /* * DatacentersLabelsPost Create a Data Center Label * Adds a new label to the specified data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersLabelsPostRequest */ func (a *LabelsApiService) DatacentersLabelsPost(ctx _context.Context, datacenterId string) ApiDatacentersLabelsPostRequest { return ApiDatacentersLabelsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) DatacentersLabelsPostExecute(r ApiDatacentersLabelsPostRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersLabelsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLabelsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLabelsPutRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string key string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLabelsPutRequest) Label(label LabelResource) ApiDatacentersLabelsPutRequest { r.label = &label return r } func (r ApiDatacentersLabelsPutRequest) Pretty(pretty bool) ApiDatacentersLabelsPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersLabelsPutRequest) Depth(depth int32) ApiDatacentersLabelsPutRequest { r.depth = &depth return r } func (r ApiDatacentersLabelsPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersLabelsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLabelsPutRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.DatacentersLabelsPutExecute(r) } /* * DatacentersLabelsPut Modify a Data Center Label by Key * Modifies the specified data center label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param key The label key * @return ApiDatacentersLabelsPutRequest */ func (a *LabelsApiService) DatacentersLabelsPut(ctx _context.Context, datacenterId string, key string) ApiDatacentersLabelsPutRequest { return ApiDatacentersLabelsPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) DatacentersLabelsPutExecute(r ApiDatacentersLabelsPutRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersLabelsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLabelsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersLabelsDeleteRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string serverId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersLabelsDeleteRequest) Pretty(pretty bool) ApiDatacentersServersLabelsDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersLabelsDeleteRequest) Depth(depth int32) ApiDatacentersServersLabelsDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersServersLabelsDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersLabelsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersLabelsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersLabelsDeleteExecute(r) } /* * DatacentersServersLabelsDelete Delete server labels * Delete the specified server label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param key The label key * @return ApiDatacentersServersLabelsDeleteRequest */ func (a *LabelsApiService) DatacentersServersLabelsDelete(ctx _context.Context, datacenterId string, serverId string, key string) ApiDatacentersServersLabelsDeleteRequest { return ApiDatacentersServersLabelsDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, key: key, } } /* * Execute executes the request */ func (a *LabelsApiService) DatacentersServersLabelsDeleteExecute(r ApiDatacentersServersLabelsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersServersLabelsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersLabelsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersLabelsFindByKeyRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string serverId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersLabelsFindByKeyRequest) Pretty(pretty bool) ApiDatacentersServersLabelsFindByKeyRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersLabelsFindByKeyRequest) Depth(depth int32) ApiDatacentersServersLabelsFindByKeyRequest { r.depth = &depth return r } func (r ApiDatacentersServersLabelsFindByKeyRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersLabelsFindByKeyRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersLabelsFindByKeyRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.DatacentersServersLabelsFindByKeyExecute(r) } /* * DatacentersServersLabelsFindByKey Retrieve server labels * Retrieve the properties of the specified server label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param key The label key * @return ApiDatacentersServersLabelsFindByKeyRequest */ func (a *LabelsApiService) DatacentersServersLabelsFindByKey(ctx _context.Context, datacenterId string, serverId string, key string) ApiDatacentersServersLabelsFindByKeyRequest { return ApiDatacentersServersLabelsFindByKeyRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) DatacentersServersLabelsFindByKeyExecute(r ApiDatacentersServersLabelsFindByKeyRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersServersLabelsFindByKey") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersLabelsFindByKey", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersLabelsGetRequest struct { ctx _context.Context ApiService *LabelsApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersLabelsGetRequest) Pretty(pretty bool) ApiDatacentersServersLabelsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersLabelsGetRequest) Depth(depth int32) ApiDatacentersServersLabelsGetRequest { r.depth = &depth return r } func (r ApiDatacentersServersLabelsGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersLabelsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersLabelsGetRequest) Filter(key string, value string) ApiDatacentersServersLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersServersLabelsGetRequest) OrderBy(orderBy string) ApiDatacentersServersLabelsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersServersLabelsGetRequest) MaxResults(maxResults int32) ApiDatacentersServersLabelsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersServersLabelsGetRequest) Execute() (LabelResources, *APIResponse, error) { return r.ApiService.DatacentersServersLabelsGetExecute(r) } /* * DatacentersServersLabelsGet List server labels * List all the the labels for the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersLabelsGetRequest */ func (a *LabelsApiService) DatacentersServersLabelsGet(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersLabelsGetRequest { return ApiDatacentersServersLabelsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return LabelResources */ func (a *LabelsApiService) DatacentersServersLabelsGetExecute(r ApiDatacentersServersLabelsGetRequest) (LabelResources, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResources ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersServersLabelsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersLabelsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersLabelsPostRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string serverId string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersLabelsPostRequest) Label(label LabelResource) ApiDatacentersServersLabelsPostRequest { r.label = &label return r } func (r ApiDatacentersServersLabelsPostRequest) Pretty(pretty bool) ApiDatacentersServersLabelsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersLabelsPostRequest) Depth(depth int32) ApiDatacentersServersLabelsPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersLabelsPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersLabelsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersLabelsPostRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.DatacentersServersLabelsPostExecute(r) } /* * DatacentersServersLabelsPost Create a Server Label * Adds a new label to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersLabelsPostRequest */ func (a *LabelsApiService) DatacentersServersLabelsPost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersLabelsPostRequest { return ApiDatacentersServersLabelsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) DatacentersServersLabelsPostExecute(r ApiDatacentersServersLabelsPostRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersServersLabelsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersLabelsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersLabelsPutRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string serverId string key string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersLabelsPutRequest) Label(label LabelResource) ApiDatacentersServersLabelsPutRequest { r.label = &label return r } func (r ApiDatacentersServersLabelsPutRequest) Pretty(pretty bool) ApiDatacentersServersLabelsPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersLabelsPutRequest) Depth(depth int32) ApiDatacentersServersLabelsPutRequest { r.depth = &depth return r } func (r ApiDatacentersServersLabelsPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersLabelsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersLabelsPutRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.DatacentersServersLabelsPutExecute(r) } /* * DatacentersServersLabelsPut Modify a Server Label * Modifies the specified server label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param key The label key * @return ApiDatacentersServersLabelsPutRequest */ func (a *LabelsApiService) DatacentersServersLabelsPut(ctx _context.Context, datacenterId string, serverId string, key string) ApiDatacentersServersLabelsPutRequest { return ApiDatacentersServersLabelsPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) DatacentersServersLabelsPutExecute(r ApiDatacentersServersLabelsPutRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersServersLabelsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersLabelsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersVolumesLabelsDeleteRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string volumeId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersVolumesLabelsDeleteRequest) Pretty(pretty bool) ApiDatacentersVolumesLabelsDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesLabelsDeleteRequest) Depth(depth int32) ApiDatacentersVolumesLabelsDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesLabelsDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesLabelsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesLabelsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersVolumesLabelsDeleteExecute(r) } /* * DatacentersVolumesLabelsDelete Delete volume labels * Delete the specified volume label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @param key The label key * @return ApiDatacentersVolumesLabelsDeleteRequest */ func (a *LabelsApiService) DatacentersVolumesLabelsDelete(ctx _context.Context, datacenterId string, volumeId string, key string) ApiDatacentersVolumesLabelsDeleteRequest { return ApiDatacentersVolumesLabelsDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, key: key, } } /* * Execute executes the request */ func (a *LabelsApiService) DatacentersVolumesLabelsDeleteExecute(r ApiDatacentersVolumesLabelsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersVolumesLabelsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesLabelsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersVolumesLabelsFindByKeyRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string volumeId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersVolumesLabelsFindByKeyRequest) Pretty(pretty bool) ApiDatacentersVolumesLabelsFindByKeyRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesLabelsFindByKeyRequest) Depth(depth int32) ApiDatacentersVolumesLabelsFindByKeyRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesLabelsFindByKeyRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesLabelsFindByKeyRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesLabelsFindByKeyRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.DatacentersVolumesLabelsFindByKeyExecute(r) } /* * DatacentersVolumesLabelsFindByKey Retrieve volume labels * Retrieve the properties of the specified volume label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @param key The label key * @return ApiDatacentersVolumesLabelsFindByKeyRequest */ func (a *LabelsApiService) DatacentersVolumesLabelsFindByKey(ctx _context.Context, datacenterId string, volumeId string, key string) ApiDatacentersVolumesLabelsFindByKeyRequest { return ApiDatacentersVolumesLabelsFindByKeyRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) DatacentersVolumesLabelsFindByKeyExecute(r ApiDatacentersVolumesLabelsFindByKeyRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersVolumesLabelsFindByKey") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesLabelsFindByKey", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersVolumesLabelsGetRequest struct { ctx _context.Context ApiService *LabelsApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string volumeId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersVolumesLabelsGetRequest) Pretty(pretty bool) ApiDatacentersVolumesLabelsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesLabelsGetRequest) Depth(depth int32) ApiDatacentersVolumesLabelsGetRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesLabelsGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesLabelsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersVolumesLabelsGetRequest) Filter(key string, value string) ApiDatacentersVolumesLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersVolumesLabelsGetRequest) OrderBy(orderBy string) ApiDatacentersVolumesLabelsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersVolumesLabelsGetRequest) MaxResults(maxResults int32) ApiDatacentersVolumesLabelsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersVolumesLabelsGetRequest) Execute() (LabelResources, *APIResponse, error) { return r.ApiService.DatacentersVolumesLabelsGetExecute(r) } /* * DatacentersVolumesLabelsGet List volume labels * List all the the labels for the specified volume. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @return ApiDatacentersVolumesLabelsGetRequest */ func (a *LabelsApiService) DatacentersVolumesLabelsGet(ctx _context.Context, datacenterId string, volumeId string) ApiDatacentersVolumesLabelsGetRequest { return ApiDatacentersVolumesLabelsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return LabelResources */ func (a *LabelsApiService) DatacentersVolumesLabelsGetExecute(r ApiDatacentersVolumesLabelsGetRequest) (LabelResources, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResources ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersVolumesLabelsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesLabelsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersVolumesLabelsPostRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string volumeId string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersVolumesLabelsPostRequest) Label(label LabelResource) ApiDatacentersVolumesLabelsPostRequest { r.label = &label return r } func (r ApiDatacentersVolumesLabelsPostRequest) Pretty(pretty bool) ApiDatacentersVolumesLabelsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesLabelsPostRequest) Depth(depth int32) ApiDatacentersVolumesLabelsPostRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesLabelsPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesLabelsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesLabelsPostRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.DatacentersVolumesLabelsPostExecute(r) } /* * DatacentersVolumesLabelsPost Create a Volume Label * Adds a new label to the specified volume. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @return ApiDatacentersVolumesLabelsPostRequest */ func (a *LabelsApiService) DatacentersVolumesLabelsPost(ctx _context.Context, datacenterId string, volumeId string) ApiDatacentersVolumesLabelsPostRequest { return ApiDatacentersVolumesLabelsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) DatacentersVolumesLabelsPostExecute(r ApiDatacentersVolumesLabelsPostRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersVolumesLabelsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesLabelsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersVolumesLabelsPutRequest struct { ctx _context.Context ApiService *LabelsApiService datacenterId string volumeId string key string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersVolumesLabelsPutRequest) Label(label LabelResource) ApiDatacentersVolumesLabelsPutRequest { r.label = &label return r } func (r ApiDatacentersVolumesLabelsPutRequest) Pretty(pretty bool) ApiDatacentersVolumesLabelsPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesLabelsPutRequest) Depth(depth int32) ApiDatacentersVolumesLabelsPutRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesLabelsPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesLabelsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesLabelsPutRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.DatacentersVolumesLabelsPutExecute(r) } /* * DatacentersVolumesLabelsPut Modify a Volume Label * Modifies the specified volume label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @param key The label key * @return ApiDatacentersVolumesLabelsPutRequest */ func (a *LabelsApiService) DatacentersVolumesLabelsPut(ctx _context.Context, datacenterId string, volumeId string, key string) ApiDatacentersVolumesLabelsPutRequest { return ApiDatacentersVolumesLabelsPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) DatacentersVolumesLabelsPutExecute(r ApiDatacentersVolumesLabelsPutRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.DatacentersVolumesLabelsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesLabelsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiImagesLabelsDeleteRequest struct { ctx _context.Context ApiService *LabelsApiService imageId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiImagesLabelsDeleteRequest) Pretty(pretty bool) ApiImagesLabelsDeleteRequest { r.pretty = &pretty return r } func (r ApiImagesLabelsDeleteRequest) Depth(depth int32) ApiImagesLabelsDeleteRequest { r.depth = &depth return r } func (r ApiImagesLabelsDeleteRequest) XContractNumber(xContractNumber int32) ApiImagesLabelsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiImagesLabelsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.ImagesLabelsDeleteExecute(r) } /* * ImagesLabelsDelete Delete image label * Delete the specified image label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param imageId The unique ID of the image. * @param key The label key * @return ApiImagesLabelsDeleteRequest */ func (a *LabelsApiService) ImagesLabelsDelete(ctx _context.Context, imageId string, key string) ApiImagesLabelsDeleteRequest { return ApiImagesLabelsDeleteRequest{ ApiService: a, ctx: ctx, imageId: imageId, key: key, } } /* * Execute executes the request */ func (a *LabelsApiService) ImagesLabelsDeleteExecute(r ApiImagesLabelsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.ImagesLabelsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/{imageId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ImagesLabelsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiImagesLabelsFindByKeyRequest struct { ctx _context.Context ApiService *LabelsApiService imageId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiImagesLabelsFindByKeyRequest) Pretty(pretty bool) ApiImagesLabelsFindByKeyRequest { r.pretty = &pretty return r } func (r ApiImagesLabelsFindByKeyRequest) Depth(depth int32) ApiImagesLabelsFindByKeyRequest { r.depth = &depth return r } func (r ApiImagesLabelsFindByKeyRequest) XContractNumber(xContractNumber int32) ApiImagesLabelsFindByKeyRequest { r.xContractNumber = &xContractNumber return r } func (r ApiImagesLabelsFindByKeyRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.ImagesLabelsFindByKeyExecute(r) } /* * ImagesLabelsFindByKey Retrieve image labels * Retrieve the properties of the specified image label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param imageId The unique ID of the image. * @param key The label key * @return ApiImagesLabelsFindByKeyRequest */ func (a *LabelsApiService) ImagesLabelsFindByKey(ctx _context.Context, imageId string, key string) ApiImagesLabelsFindByKeyRequest { return ApiImagesLabelsFindByKeyRequest{ ApiService: a, ctx: ctx, imageId: imageId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) ImagesLabelsFindByKeyExecute(r ApiImagesLabelsFindByKeyRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.ImagesLabelsFindByKey") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/{imageId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ImagesLabelsFindByKey", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiImagesLabelsGetRequest struct { ctx _context.Context ApiService *LabelsApiService filters _neturl.Values orderBy *string maxResults *int32 imageId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiImagesLabelsGetRequest) Pretty(pretty bool) ApiImagesLabelsGetRequest { r.pretty = &pretty return r } func (r ApiImagesLabelsGetRequest) Depth(depth int32) ApiImagesLabelsGetRequest { r.depth = &depth return r } func (r ApiImagesLabelsGetRequest) XContractNumber(xContractNumber int32) ApiImagesLabelsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiImagesLabelsGetRequest) Filter(key string, value string) ApiImagesLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiImagesLabelsGetRequest) OrderBy(orderBy string) ApiImagesLabelsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiImagesLabelsGetRequest) MaxResults(maxResults int32) ApiImagesLabelsGetRequest { r.maxResults = &maxResults return r } func (r ApiImagesLabelsGetRequest) Execute() (LabelResources, *APIResponse, error) { return r.ApiService.ImagesLabelsGetExecute(r) } /* * ImagesLabelsGet List image labels * List all the the labels for the specified image. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param imageId The unique ID of the image. * @return ApiImagesLabelsGetRequest */ func (a *LabelsApiService) ImagesLabelsGet(ctx _context.Context, imageId string) ApiImagesLabelsGetRequest { return ApiImagesLabelsGetRequest{ ApiService: a, ctx: ctx, imageId: imageId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return LabelResources */ func (a *LabelsApiService) ImagesLabelsGetExecute(r ApiImagesLabelsGetRequest) (LabelResources, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResources ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.ImagesLabelsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/{imageId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ImagesLabelsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiImagesLabelsPostRequest struct { ctx _context.Context ApiService *LabelsApiService imageId string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiImagesLabelsPostRequest) Label(label LabelResource) ApiImagesLabelsPostRequest { r.label = &label return r } func (r ApiImagesLabelsPostRequest) Pretty(pretty bool) ApiImagesLabelsPostRequest { r.pretty = &pretty return r } func (r ApiImagesLabelsPostRequest) Depth(depth int32) ApiImagesLabelsPostRequest { r.depth = &depth return r } func (r ApiImagesLabelsPostRequest) XContractNumber(xContractNumber int32) ApiImagesLabelsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiImagesLabelsPostRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.ImagesLabelsPostExecute(r) } /* * ImagesLabelsPost Create an Image Label * Adds a new label to the specified image. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param imageId The unique ID of the image * @return ApiImagesLabelsPostRequest */ func (a *LabelsApiService) ImagesLabelsPost(ctx _context.Context, imageId string) ApiImagesLabelsPostRequest { return ApiImagesLabelsPostRequest{ ApiService: a, ctx: ctx, imageId: imageId, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) ImagesLabelsPostExecute(r ApiImagesLabelsPostRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.ImagesLabelsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/{imageId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ImagesLabelsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiImagesLabelsPutRequest struct { ctx _context.Context ApiService *LabelsApiService imageId string key string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiImagesLabelsPutRequest) Label(label LabelResource) ApiImagesLabelsPutRequest { r.label = &label return r } func (r ApiImagesLabelsPutRequest) Pretty(pretty bool) ApiImagesLabelsPutRequest { r.pretty = &pretty return r } func (r ApiImagesLabelsPutRequest) Depth(depth int32) ApiImagesLabelsPutRequest { r.depth = &depth return r } func (r ApiImagesLabelsPutRequest) XContractNumber(xContractNumber int32) ApiImagesLabelsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiImagesLabelsPutRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.ImagesLabelsPutExecute(r) } /* * ImagesLabelsPut Modify an Image Label by Key * Modifies the specified data center label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param imageId The unique ID of the image. * @param key The label key * @return ApiImagesLabelsPutRequest */ func (a *LabelsApiService) ImagesLabelsPut(ctx _context.Context, imageId string, key string) ApiImagesLabelsPutRequest { return ApiImagesLabelsPutRequest{ ApiService: a, ctx: ctx, imageId: imageId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) ImagesLabelsPutExecute(r ApiImagesLabelsPutRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.ImagesLabelsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/images/{imageId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"imageId"+"}", _neturl.PathEscape(parameterToString(r.imageId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "ImagesLabelsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiIpblocksLabelsDeleteRequest struct { ctx _context.Context ApiService *LabelsApiService ipblockId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiIpblocksLabelsDeleteRequest) Pretty(pretty bool) ApiIpblocksLabelsDeleteRequest { r.pretty = &pretty return r } func (r ApiIpblocksLabelsDeleteRequest) Depth(depth int32) ApiIpblocksLabelsDeleteRequest { r.depth = &depth return r } func (r ApiIpblocksLabelsDeleteRequest) XContractNumber(xContractNumber int32) ApiIpblocksLabelsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiIpblocksLabelsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.IpblocksLabelsDeleteExecute(r) } /* * IpblocksLabelsDelete Delete IP block labels * Delete the specified IP block label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @param key The label key * @return ApiIpblocksLabelsDeleteRequest */ func (a *LabelsApiService) IpblocksLabelsDelete(ctx _context.Context, ipblockId string, key string) ApiIpblocksLabelsDeleteRequest { return ApiIpblocksLabelsDeleteRequest{ ApiService: a, ctx: ctx, ipblockId: ipblockId, key: key, } } /* * Execute executes the request */ func (a *LabelsApiService) IpblocksLabelsDeleteExecute(r ApiIpblocksLabelsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.IpblocksLabelsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks/{ipblockId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"ipblockId"+"}", _neturl.PathEscape(parameterToString(r.ipblockId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksLabelsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiIpblocksLabelsFindByKeyRequest struct { ctx _context.Context ApiService *LabelsApiService ipblockId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiIpblocksLabelsFindByKeyRequest) Pretty(pretty bool) ApiIpblocksLabelsFindByKeyRequest { r.pretty = &pretty return r } func (r ApiIpblocksLabelsFindByKeyRequest) Depth(depth int32) ApiIpblocksLabelsFindByKeyRequest { r.depth = &depth return r } func (r ApiIpblocksLabelsFindByKeyRequest) XContractNumber(xContractNumber int32) ApiIpblocksLabelsFindByKeyRequest { r.xContractNumber = &xContractNumber return r } func (r ApiIpblocksLabelsFindByKeyRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.IpblocksLabelsFindByKeyExecute(r) } /* * IpblocksLabelsFindByKey Retrieve IP block labels * Retrieve the properties of the specified IP block label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @param key The label key * @return ApiIpblocksLabelsFindByKeyRequest */ func (a *LabelsApiService) IpblocksLabelsFindByKey(ctx _context.Context, ipblockId string, key string) ApiIpblocksLabelsFindByKeyRequest { return ApiIpblocksLabelsFindByKeyRequest{ ApiService: a, ctx: ctx, ipblockId: ipblockId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) IpblocksLabelsFindByKeyExecute(r ApiIpblocksLabelsFindByKeyRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.IpblocksLabelsFindByKey") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks/{ipblockId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"ipblockId"+"}", _neturl.PathEscape(parameterToString(r.ipblockId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksLabelsFindByKey", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiIpblocksLabelsGetRequest struct { ctx _context.Context ApiService *LabelsApiService filters _neturl.Values orderBy *string maxResults *int32 ipblockId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiIpblocksLabelsGetRequest) Pretty(pretty bool) ApiIpblocksLabelsGetRequest { r.pretty = &pretty return r } func (r ApiIpblocksLabelsGetRequest) Depth(depth int32) ApiIpblocksLabelsGetRequest { r.depth = &depth return r } func (r ApiIpblocksLabelsGetRequest) XContractNumber(xContractNumber int32) ApiIpblocksLabelsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiIpblocksLabelsGetRequest) Filter(key string, value string) ApiIpblocksLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiIpblocksLabelsGetRequest) OrderBy(orderBy string) ApiIpblocksLabelsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiIpblocksLabelsGetRequest) MaxResults(maxResults int32) ApiIpblocksLabelsGetRequest { r.maxResults = &maxResults return r } func (r ApiIpblocksLabelsGetRequest) Execute() (LabelResources, *APIResponse, error) { return r.ApiService.IpblocksLabelsGetExecute(r) } /* * IpblocksLabelsGet List IP block labels * List all the the labels for the specified IP block. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @return ApiIpblocksLabelsGetRequest */ func (a *LabelsApiService) IpblocksLabelsGet(ctx _context.Context, ipblockId string) ApiIpblocksLabelsGetRequest { return ApiIpblocksLabelsGetRequest{ ApiService: a, ctx: ctx, ipblockId: ipblockId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return LabelResources */ func (a *LabelsApiService) IpblocksLabelsGetExecute(r ApiIpblocksLabelsGetRequest) (LabelResources, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResources ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.IpblocksLabelsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks/{ipblockId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"ipblockId"+"}", _neturl.PathEscape(parameterToString(r.ipblockId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksLabelsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiIpblocksLabelsPostRequest struct { ctx _context.Context ApiService *LabelsApiService ipblockId string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiIpblocksLabelsPostRequest) Label(label LabelResource) ApiIpblocksLabelsPostRequest { r.label = &label return r } func (r ApiIpblocksLabelsPostRequest) Pretty(pretty bool) ApiIpblocksLabelsPostRequest { r.pretty = &pretty return r } func (r ApiIpblocksLabelsPostRequest) Depth(depth int32) ApiIpblocksLabelsPostRequest { r.depth = &depth return r } func (r ApiIpblocksLabelsPostRequest) XContractNumber(xContractNumber int32) ApiIpblocksLabelsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiIpblocksLabelsPostRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.IpblocksLabelsPostExecute(r) } /* * IpblocksLabelsPost Create IP block labels * Add a new label to the specified IP block. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @return ApiIpblocksLabelsPostRequest */ func (a *LabelsApiService) IpblocksLabelsPost(ctx _context.Context, ipblockId string) ApiIpblocksLabelsPostRequest { return ApiIpblocksLabelsPostRequest{ ApiService: a, ctx: ctx, ipblockId: ipblockId, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) IpblocksLabelsPostExecute(r ApiIpblocksLabelsPostRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.IpblocksLabelsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks/{ipblockId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"ipblockId"+"}", _neturl.PathEscape(parameterToString(r.ipblockId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksLabelsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiIpblocksLabelsPutRequest struct { ctx _context.Context ApiService *LabelsApiService ipblockId string key string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiIpblocksLabelsPutRequest) Label(label LabelResource) ApiIpblocksLabelsPutRequest { r.label = &label return r } func (r ApiIpblocksLabelsPutRequest) Pretty(pretty bool) ApiIpblocksLabelsPutRequest { r.pretty = &pretty return r } func (r ApiIpblocksLabelsPutRequest) Depth(depth int32) ApiIpblocksLabelsPutRequest { r.depth = &depth return r } func (r ApiIpblocksLabelsPutRequest) XContractNumber(xContractNumber int32) ApiIpblocksLabelsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiIpblocksLabelsPutRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.IpblocksLabelsPutExecute(r) } /* * IpblocksLabelsPut Modify a IP Block Label by ID * Modifies the specified IP block label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param ipblockId The unique ID of the IP block. * @param key The label key * @return ApiIpblocksLabelsPutRequest */ func (a *LabelsApiService) IpblocksLabelsPut(ctx _context.Context, ipblockId string, key string) ApiIpblocksLabelsPutRequest { return ApiIpblocksLabelsPutRequest{ ApiService: a, ctx: ctx, ipblockId: ipblockId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) IpblocksLabelsPutExecute(r ApiIpblocksLabelsPutRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.IpblocksLabelsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/ipblocks/{ipblockId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"ipblockId"+"}", _neturl.PathEscape(parameterToString(r.ipblockId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "IpblocksLabelsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiLabelsFindByUrnRequest struct { ctx _context.Context ApiService *LabelsApiService labelurn string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiLabelsFindByUrnRequest) Pretty(pretty bool) ApiLabelsFindByUrnRequest { r.pretty = &pretty return r } func (r ApiLabelsFindByUrnRequest) Depth(depth int32) ApiLabelsFindByUrnRequest { r.depth = &depth return r } func (r ApiLabelsFindByUrnRequest) XContractNumber(xContractNumber int32) ApiLabelsFindByUrnRequest { r.xContractNumber = &xContractNumber return r } func (r ApiLabelsFindByUrnRequest) Execute() (Label, *APIResponse, error) { return r.ApiService.LabelsFindByUrnExecute(r) } /* - LabelsFindByUrn Retrieve labels by URN - Retrieve a label by label URN. The URN is unique for each label, and consists of: urn:label::: - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param labelurn The label URN; URN is unique for each label, and consists of: urn:label::: - @return ApiLabelsFindByUrnRequest */ func (a *LabelsApiService) LabelsFindByUrn(ctx _context.Context, labelurn string) ApiLabelsFindByUrnRequest { return ApiLabelsFindByUrnRequest{ ApiService: a, ctx: ctx, labelurn: labelurn, } } /* * Execute executes the request * @return Label */ func (a *LabelsApiService) LabelsFindByUrnExecute(r ApiLabelsFindByUrnRequest) (Label, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Label ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.LabelsFindByUrn") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/labels/{labelurn}" localVarPath = strings.Replace(localVarPath, "{"+"labelurn"+"}", _neturl.PathEscape(parameterToString(r.labelurn, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "LabelsFindByUrn", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiLabelsGetRequest struct { ctx _context.Context ApiService *LabelsApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiLabelsGetRequest) Pretty(pretty bool) ApiLabelsGetRequest { r.pretty = &pretty return r } func (r ApiLabelsGetRequest) Depth(depth int32) ApiLabelsGetRequest { r.depth = &depth return r } func (r ApiLabelsGetRequest) XContractNumber(xContractNumber int32) ApiLabelsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiLabelsGetRequest) Filter(key string, value string) ApiLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiLabelsGetRequest) OrderBy(orderBy string) ApiLabelsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiLabelsGetRequest) MaxResults(maxResults int32) ApiLabelsGetRequest { r.maxResults = &maxResults return r } func (r ApiLabelsGetRequest) Execute() (Labels, *APIResponse, error) { return r.ApiService.LabelsGetExecute(r) } /* * LabelsGet List labels * List all available labels. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiLabelsGetRequest */ func (a *LabelsApiService) LabelsGet(ctx _context.Context) ApiLabelsGetRequest { return ApiLabelsGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Labels */ func (a *LabelsApiService) LabelsGetExecute(r ApiLabelsGetRequest) (Labels, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Labels ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.LabelsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/labels" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "LabelsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiSnapshotsLabelsDeleteRequest struct { ctx _context.Context ApiService *LabelsApiService snapshotId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiSnapshotsLabelsDeleteRequest) Pretty(pretty bool) ApiSnapshotsLabelsDeleteRequest { r.pretty = &pretty return r } func (r ApiSnapshotsLabelsDeleteRequest) Depth(depth int32) ApiSnapshotsLabelsDeleteRequest { r.depth = &depth return r } func (r ApiSnapshotsLabelsDeleteRequest) XContractNumber(xContractNumber int32) ApiSnapshotsLabelsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiSnapshotsLabelsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.SnapshotsLabelsDeleteExecute(r) } /* * SnapshotsLabelsDelete Delete snapshot labels * Delete the specified snapshot label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @param key The label key * @return ApiSnapshotsLabelsDeleteRequest */ func (a *LabelsApiService) SnapshotsLabelsDelete(ctx _context.Context, snapshotId string, key string) ApiSnapshotsLabelsDeleteRequest { return ApiSnapshotsLabelsDeleteRequest{ ApiService: a, ctx: ctx, snapshotId: snapshotId, key: key, } } /* * Execute executes the request */ func (a *LabelsApiService) SnapshotsLabelsDeleteExecute(r ApiSnapshotsLabelsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.SnapshotsLabelsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/snapshots/{snapshotId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "SnapshotsLabelsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiSnapshotsLabelsFindByKeyRequest struct { ctx _context.Context ApiService *LabelsApiService snapshotId string key string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiSnapshotsLabelsFindByKeyRequest) Pretty(pretty bool) ApiSnapshotsLabelsFindByKeyRequest { r.pretty = &pretty return r } func (r ApiSnapshotsLabelsFindByKeyRequest) Depth(depth int32) ApiSnapshotsLabelsFindByKeyRequest { r.depth = &depth return r } func (r ApiSnapshotsLabelsFindByKeyRequest) XContractNumber(xContractNumber int32) ApiSnapshotsLabelsFindByKeyRequest { r.xContractNumber = &xContractNumber return r } func (r ApiSnapshotsLabelsFindByKeyRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.SnapshotsLabelsFindByKeyExecute(r) } /* * SnapshotsLabelsFindByKey Retrieve snapshot labels * Retrieve the properties of the specified snapshot label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @param key The label key * @return ApiSnapshotsLabelsFindByKeyRequest */ func (a *LabelsApiService) SnapshotsLabelsFindByKey(ctx _context.Context, snapshotId string, key string) ApiSnapshotsLabelsFindByKeyRequest { return ApiSnapshotsLabelsFindByKeyRequest{ ApiService: a, ctx: ctx, snapshotId: snapshotId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) SnapshotsLabelsFindByKeyExecute(r ApiSnapshotsLabelsFindByKeyRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.SnapshotsLabelsFindByKey") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/snapshots/{snapshotId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "SnapshotsLabelsFindByKey", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiSnapshotsLabelsGetRequest struct { ctx _context.Context ApiService *LabelsApiService filters _neturl.Values orderBy *string maxResults *int32 snapshotId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiSnapshotsLabelsGetRequest) Pretty(pretty bool) ApiSnapshotsLabelsGetRequest { r.pretty = &pretty return r } func (r ApiSnapshotsLabelsGetRequest) Depth(depth int32) ApiSnapshotsLabelsGetRequest { r.depth = &depth return r } func (r ApiSnapshotsLabelsGetRequest) XContractNumber(xContractNumber int32) ApiSnapshotsLabelsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiSnapshotsLabelsGetRequest) Filter(key string, value string) ApiSnapshotsLabelsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiSnapshotsLabelsGetRequest) OrderBy(orderBy string) ApiSnapshotsLabelsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiSnapshotsLabelsGetRequest) MaxResults(maxResults int32) ApiSnapshotsLabelsGetRequest { r.maxResults = &maxResults return r } func (r ApiSnapshotsLabelsGetRequest) Execute() (LabelResources, *APIResponse, error) { return r.ApiService.SnapshotsLabelsGetExecute(r) } /* * SnapshotsLabelsGet List snapshot labels * List all the the labels for the specified snapshot. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @return ApiSnapshotsLabelsGetRequest */ func (a *LabelsApiService) SnapshotsLabelsGet(ctx _context.Context, snapshotId string) ApiSnapshotsLabelsGetRequest { return ApiSnapshotsLabelsGetRequest{ ApiService: a, ctx: ctx, snapshotId: snapshotId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return LabelResources */ func (a *LabelsApiService) SnapshotsLabelsGetExecute(r ApiSnapshotsLabelsGetRequest) (LabelResources, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResources ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.SnapshotsLabelsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/snapshots/{snapshotId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "SnapshotsLabelsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiSnapshotsLabelsPostRequest struct { ctx _context.Context ApiService *LabelsApiService snapshotId string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiSnapshotsLabelsPostRequest) Label(label LabelResource) ApiSnapshotsLabelsPostRequest { r.label = &label return r } func (r ApiSnapshotsLabelsPostRequest) Pretty(pretty bool) ApiSnapshotsLabelsPostRequest { r.pretty = &pretty return r } func (r ApiSnapshotsLabelsPostRequest) Depth(depth int32) ApiSnapshotsLabelsPostRequest { r.depth = &depth return r } func (r ApiSnapshotsLabelsPostRequest) XContractNumber(xContractNumber int32) ApiSnapshotsLabelsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiSnapshotsLabelsPostRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.SnapshotsLabelsPostExecute(r) } /* * SnapshotsLabelsPost Create a Snapshot Label * Adds a new label to the specified snapshot. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @return ApiSnapshotsLabelsPostRequest */ func (a *LabelsApiService) SnapshotsLabelsPost(ctx _context.Context, snapshotId string) ApiSnapshotsLabelsPostRequest { return ApiSnapshotsLabelsPostRequest{ ApiService: a, ctx: ctx, snapshotId: snapshotId, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) SnapshotsLabelsPostExecute(r ApiSnapshotsLabelsPostRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.SnapshotsLabelsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/snapshots/{snapshotId}/labels" localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "SnapshotsLabelsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiSnapshotsLabelsPutRequest struct { ctx _context.Context ApiService *LabelsApiService snapshotId string key string label *LabelResource pretty *bool depth *int32 xContractNumber *int32 } func (r ApiSnapshotsLabelsPutRequest) Label(label LabelResource) ApiSnapshotsLabelsPutRequest { r.label = &label return r } func (r ApiSnapshotsLabelsPutRequest) Pretty(pretty bool) ApiSnapshotsLabelsPutRequest { r.pretty = &pretty return r } func (r ApiSnapshotsLabelsPutRequest) Depth(depth int32) ApiSnapshotsLabelsPutRequest { r.depth = &depth return r } func (r ApiSnapshotsLabelsPutRequest) XContractNumber(xContractNumber int32) ApiSnapshotsLabelsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiSnapshotsLabelsPutRequest) Execute() (LabelResource, *APIResponse, error) { return r.ApiService.SnapshotsLabelsPutExecute(r) } /* * SnapshotsLabelsPut Modify a Snapshot Label by ID * Modifies the specified snapshot label. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @param key The label key * @return ApiSnapshotsLabelsPutRequest */ func (a *LabelsApiService) SnapshotsLabelsPut(ctx _context.Context, snapshotId string, key string) ApiSnapshotsLabelsPutRequest { return ApiSnapshotsLabelsPutRequest{ ApiService: a, ctx: ctx, snapshotId: snapshotId, key: key, } } /* * Execute executes the request * @return LabelResource */ func (a *LabelsApiService) SnapshotsLabelsPutExecute(r ApiSnapshotsLabelsPutRequest) (LabelResource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LabelResource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LabelsApiService.SnapshotsLabelsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/snapshots/{snapshotId}/labels/{key}" localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"key"+"}", _neturl.PathEscape(parameterToString(r.key, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.label == nil { return localVarReturnValue, nil, reportError("label is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.label if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "SnapshotsLabelsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_lans.go000066400000000000000000001641041465267054300220200ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // LANsApiService LANsApi service type LANsApiService service type ApiDatacentersLansDeleteRequest struct { ctx _context.Context ApiService *LANsApiService datacenterId string lanId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLansDeleteRequest) Pretty(pretty bool) ApiDatacentersLansDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersLansDeleteRequest) Depth(depth int32) ApiDatacentersLansDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersLansDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersLansDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLansDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersLansDeleteExecute(r) } /* * DatacentersLansDelete Delete LANs * Delete the specified LAN within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param lanId The unique ID of the LAN. * @return ApiDatacentersLansDeleteRequest */ func (a *LANsApiService) DatacentersLansDelete(ctx _context.Context, datacenterId string, lanId string) ApiDatacentersLansDeleteRequest { return ApiDatacentersLansDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, lanId: lanId, } } /* * Execute executes the request */ func (a *LANsApiService) DatacentersLansDeleteExecute(r ApiDatacentersLansDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LANsApiService.DatacentersLansDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/lans/{lanId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"lanId"+"}", _neturl.PathEscape(parameterToString(r.lanId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLansDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersLansFindByIdRequest struct { ctx _context.Context ApiService *LANsApiService datacenterId string lanId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLansFindByIdRequest) Pretty(pretty bool) ApiDatacentersLansFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersLansFindByIdRequest) Depth(depth int32) ApiDatacentersLansFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersLansFindByIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersLansFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLansFindByIdRequest) Execute() (Lan, *APIResponse, error) { return r.ApiService.DatacentersLansFindByIdExecute(r) } /* * DatacentersLansFindById Retrieve LANs * Retrieve the properties of the specified LAN within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param lanId The unique ID of the LAN. * @return ApiDatacentersLansFindByIdRequest */ func (a *LANsApiService) DatacentersLansFindById(ctx _context.Context, datacenterId string, lanId string) ApiDatacentersLansFindByIdRequest { return ApiDatacentersLansFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, lanId: lanId, } } /* * Execute executes the request * @return Lan */ func (a *LANsApiService) DatacentersLansFindByIdExecute(r ApiDatacentersLansFindByIdRequest) (Lan, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Lan ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LANsApiService.DatacentersLansFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/lans/{lanId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"lanId"+"}", _neturl.PathEscape(parameterToString(r.lanId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLansFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLansGetRequest struct { ctx _context.Context ApiService *LANsApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersLansGetRequest) Pretty(pretty bool) ApiDatacentersLansGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersLansGetRequest) Depth(depth int32) ApiDatacentersLansGetRequest { r.depth = &depth return r } func (r ApiDatacentersLansGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersLansGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLansGetRequest) Offset(offset int32) ApiDatacentersLansGetRequest { r.offset = &offset return r } func (r ApiDatacentersLansGetRequest) Limit(limit int32) ApiDatacentersLansGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersLansGetRequest) Filter(key string, value string) ApiDatacentersLansGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersLansGetRequest) OrderBy(orderBy string) ApiDatacentersLansGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersLansGetRequest) MaxResults(maxResults int32) ApiDatacentersLansGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersLansGetRequest) Execute() (Lans, *APIResponse, error) { return r.ApiService.DatacentersLansGetExecute(r) } /* * DatacentersLansGet List LANs * List all LANs within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersLansGetRequest */ func (a *LANsApiService) DatacentersLansGet(ctx _context.Context, datacenterId string) ApiDatacentersLansGetRequest { return ApiDatacentersLansGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Lans */ func (a *LANsApiService) DatacentersLansGetExecute(r ApiDatacentersLansGetRequest) (Lans, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Lans ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LANsApiService.DatacentersLansGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/lans" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLansGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLansNicsFindByIdRequest struct { ctx _context.Context ApiService *LANsApiService datacenterId string lanId string nicId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLansNicsFindByIdRequest) Pretty(pretty bool) ApiDatacentersLansNicsFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersLansNicsFindByIdRequest) Depth(depth int32) ApiDatacentersLansNicsFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersLansNicsFindByIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersLansNicsFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLansNicsFindByIdRequest) Execute() (Nic, *APIResponse, error) { return r.ApiService.DatacentersLansNicsFindByIdExecute(r) } /* * DatacentersLansNicsFindById Retrieve attached NICs * Retrieve the properties of the NIC, attached to the specified LAN. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param lanId The unique ID of the LAN. * @param nicId The unique ID of the NIC. * @return ApiDatacentersLansNicsFindByIdRequest */ func (a *LANsApiService) DatacentersLansNicsFindById(ctx _context.Context, datacenterId string, lanId string, nicId string) ApiDatacentersLansNicsFindByIdRequest { return ApiDatacentersLansNicsFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, lanId: lanId, nicId: nicId, } } /* * Execute executes the request * @return Nic */ func (a *LANsApiService) DatacentersLansNicsFindByIdExecute(r ApiDatacentersLansNicsFindByIdRequest) (Nic, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Nic ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LANsApiService.DatacentersLansNicsFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/lans/{lanId}/nics/{nicId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"lanId"+"}", _neturl.PathEscape(parameterToString(r.lanId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLansNicsFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLansNicsGetRequest struct { ctx _context.Context ApiService *LANsApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string lanId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersLansNicsGetRequest) Pretty(pretty bool) ApiDatacentersLansNicsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersLansNicsGetRequest) Depth(depth int32) ApiDatacentersLansNicsGetRequest { r.depth = &depth return r } func (r ApiDatacentersLansNicsGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersLansNicsGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLansNicsGetRequest) Offset(offset int32) ApiDatacentersLansNicsGetRequest { r.offset = &offset return r } func (r ApiDatacentersLansNicsGetRequest) Limit(limit int32) ApiDatacentersLansNicsGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersLansNicsGetRequest) Filter(key string, value string) ApiDatacentersLansNicsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersLansNicsGetRequest) OrderBy(orderBy string) ApiDatacentersLansNicsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersLansNicsGetRequest) MaxResults(maxResults int32) ApiDatacentersLansNicsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersLansNicsGetRequest) Execute() (LanNics, *APIResponse, error) { return r.ApiService.DatacentersLansNicsGetExecute(r) } /* * DatacentersLansNicsGet List LAN members * List all NICs, attached to the specified LAN. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param lanId The unique ID of the LAN. * @return ApiDatacentersLansNicsGetRequest */ func (a *LANsApiService) DatacentersLansNicsGet(ctx _context.Context, datacenterId string, lanId string) ApiDatacentersLansNicsGetRequest { return ApiDatacentersLansNicsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, lanId: lanId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return LanNics */ func (a *LANsApiService) DatacentersLansNicsGetExecute(r ApiDatacentersLansNicsGetRequest) (LanNics, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue LanNics ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LANsApiService.DatacentersLansNicsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/lans/{lanId}/nics" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"lanId"+"}", _neturl.PathEscape(parameterToString(r.lanId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLansNicsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLansNicsPostRequest struct { ctx _context.Context ApiService *LANsApiService datacenterId string lanId string nic *Nic pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLansNicsPostRequest) Nic(nic Nic) ApiDatacentersLansNicsPostRequest { r.nic = &nic return r } func (r ApiDatacentersLansNicsPostRequest) Pretty(pretty bool) ApiDatacentersLansNicsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersLansNicsPostRequest) Depth(depth int32) ApiDatacentersLansNicsPostRequest { r.depth = &depth return r } func (r ApiDatacentersLansNicsPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersLansNicsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLansNicsPostRequest) Execute() (Nic, *APIResponse, error) { return r.ApiService.DatacentersLansNicsPostExecute(r) } /* * DatacentersLansNicsPost Attach NICs * Attach an existing NIC to the specified LAN. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param lanId The unique ID of the LAN. * @return ApiDatacentersLansNicsPostRequest */ func (a *LANsApiService) DatacentersLansNicsPost(ctx _context.Context, datacenterId string, lanId string) ApiDatacentersLansNicsPostRequest { return ApiDatacentersLansNicsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, lanId: lanId, } } /* * Execute executes the request * @return Nic */ func (a *LANsApiService) DatacentersLansNicsPostExecute(r ApiDatacentersLansNicsPostRequest) (Nic, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Nic ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LANsApiService.DatacentersLansNicsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/lans/{lanId}/nics" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"lanId"+"}", _neturl.PathEscape(parameterToString(r.lanId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.nic == nil { return localVarReturnValue, nil, reportError("nic is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.nic if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLansNicsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLansPatchRequest struct { ctx _context.Context ApiService *LANsApiService datacenterId string lanId string lan *LanProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLansPatchRequest) Lan(lan LanProperties) ApiDatacentersLansPatchRequest { r.lan = &lan return r } func (r ApiDatacentersLansPatchRequest) Pretty(pretty bool) ApiDatacentersLansPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersLansPatchRequest) Depth(depth int32) ApiDatacentersLansPatchRequest { r.depth = &depth return r } func (r ApiDatacentersLansPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersLansPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLansPatchRequest) Execute() (Lan, *APIResponse, error) { return r.ApiService.DatacentersLansPatchExecute(r) } /* * DatacentersLansPatch Partially modify LANs * Update the properties of the specified LAN within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param lanId The unique ID of the LAN. * @return ApiDatacentersLansPatchRequest */ func (a *LANsApiService) DatacentersLansPatch(ctx _context.Context, datacenterId string, lanId string) ApiDatacentersLansPatchRequest { return ApiDatacentersLansPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, lanId: lanId, } } /* * Execute executes the request * @return Lan */ func (a *LANsApiService) DatacentersLansPatchExecute(r ApiDatacentersLansPatchRequest) (Lan, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Lan ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LANsApiService.DatacentersLansPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/lans/{lanId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"lanId"+"}", _neturl.PathEscape(parameterToString(r.lanId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.lan == nil { return localVarReturnValue, nil, reportError("lan is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.lan if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLansPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLansPostRequest struct { ctx _context.Context ApiService *LANsApiService datacenterId string lan *Lan pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLansPostRequest) Lan(lan Lan) ApiDatacentersLansPostRequest { r.lan = &lan return r } func (r ApiDatacentersLansPostRequest) Pretty(pretty bool) ApiDatacentersLansPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersLansPostRequest) Depth(depth int32) ApiDatacentersLansPostRequest { r.depth = &depth return r } func (r ApiDatacentersLansPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersLansPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLansPostRequest) Execute() (Lan, *APIResponse, error) { return r.ApiService.DatacentersLansPostExecute(r) } /* * DatacentersLansPost Create LANs * Creates a LAN within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersLansPostRequest */ func (a *LANsApiService) DatacentersLansPost(ctx _context.Context, datacenterId string) ApiDatacentersLansPostRequest { return ApiDatacentersLansPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return Lan */ func (a *LANsApiService) DatacentersLansPostExecute(r ApiDatacentersLansPostRequest) (Lan, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Lan ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LANsApiService.DatacentersLansPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/lans" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.lan == nil { return localVarReturnValue, nil, reportError("lan is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.lan if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLansPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLansPutRequest struct { ctx _context.Context ApiService *LANsApiService datacenterId string lanId string lan *Lan pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLansPutRequest) Lan(lan Lan) ApiDatacentersLansPutRequest { r.lan = &lan return r } func (r ApiDatacentersLansPutRequest) Pretty(pretty bool) ApiDatacentersLansPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersLansPutRequest) Depth(depth int32) ApiDatacentersLansPutRequest { r.depth = &depth return r } func (r ApiDatacentersLansPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersLansPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLansPutRequest) Execute() (Lan, *APIResponse, error) { return r.ApiService.DatacentersLansPutExecute(r) } /* * DatacentersLansPut Modify LANs * Modify the properties of the specified LAN within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param lanId The unique ID of the LAN. * @return ApiDatacentersLansPutRequest */ func (a *LANsApiService) DatacentersLansPut(ctx _context.Context, datacenterId string, lanId string) ApiDatacentersLansPutRequest { return ApiDatacentersLansPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, lanId: lanId, } } /* * Execute executes the request * @return Lan */ func (a *LANsApiService) DatacentersLansPutExecute(r ApiDatacentersLansPutRequest) (Lan, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Lan ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LANsApiService.DatacentersLansPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/lans/{lanId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"lanId"+"}", _neturl.PathEscape(parameterToString(r.lanId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.lan == nil { return localVarReturnValue, nil, reportError("lan is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.lan if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLansPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_load_balancers.go000066400000000000000000002060311465267054300240100ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // LoadBalancersApiService LoadBalancersApi service type LoadBalancersApiService service type ApiDatacentersLoadbalancersBalancednicsDeleteRequest struct { ctx _context.Context ApiService *LoadBalancersApiService datacenterId string loadbalancerId string nicId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLoadbalancersBalancednicsDeleteRequest) Pretty(pretty bool) ApiDatacentersLoadbalancersBalancednicsDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersLoadbalancersBalancednicsDeleteRequest) Depth(depth int32) ApiDatacentersLoadbalancersBalancednicsDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersLoadbalancersBalancednicsDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersLoadbalancersBalancednicsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLoadbalancersBalancednicsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersLoadbalancersBalancednicsDeleteExecute(r) } /* * DatacentersLoadbalancersBalancednicsDelete Detach balanced NICs * Detach the specified NIC from the Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param loadbalancerId The unique ID of the Load Balancer. * @param nicId The unique ID of the NIC. * @return ApiDatacentersLoadbalancersBalancednicsDeleteRequest */ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsDelete(ctx _context.Context, datacenterId string, loadbalancerId string, nicId string) ApiDatacentersLoadbalancersBalancednicsDeleteRequest { return ApiDatacentersLoadbalancersBalancednicsDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, loadbalancerId: loadbalancerId, nicId: nicId, } } /* * Execute executes the request */ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsDeleteExecute(r ApiDatacentersLoadbalancersBalancednicsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancersApiService.DatacentersLoadbalancersBalancednicsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"loadbalancerId"+"}", _neturl.PathEscape(parameterToString(r.loadbalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLoadbalancersBalancednicsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest struct { ctx _context.Context ApiService *LoadBalancersApiService datacenterId string loadbalancerId string nicId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest) Pretty(pretty bool) ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest) Depth(depth int32) ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest { r.depth = &depth return r } func (r ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest) Execute() (Nic, *APIResponse, error) { return r.ApiService.DatacentersLoadbalancersBalancednicsFindByNicIdExecute(r) } /* * DatacentersLoadbalancersBalancednicsFindByNicId Retrieve balanced NICs * Retrieve the properties of the specified NIC, attached to the Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param loadbalancerId The unique ID of the Load Balancer. * @param nicId The unique ID of the NIC. * @return ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest */ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsFindByNicId(ctx _context.Context, datacenterId string, loadbalancerId string, nicId string) ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest { return ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, loadbalancerId: loadbalancerId, nicId: nicId, } } /* * Execute executes the request * @return Nic */ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsFindByNicIdExecute(r ApiDatacentersLoadbalancersBalancednicsFindByNicIdRequest) (Nic, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Nic ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancersApiService.DatacentersLoadbalancersBalancednicsFindByNicId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"loadbalancerId"+"}", _neturl.PathEscape(parameterToString(r.loadbalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLoadbalancersBalancednicsFindByNicId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLoadbalancersBalancednicsGetRequest struct { ctx _context.Context ApiService *LoadBalancersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string loadbalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLoadbalancersBalancednicsGetRequest) Pretty(pretty bool) ApiDatacentersLoadbalancersBalancednicsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersLoadbalancersBalancednicsGetRequest) Depth(depth int32) ApiDatacentersLoadbalancersBalancednicsGetRequest { r.depth = &depth return r } func (r ApiDatacentersLoadbalancersBalancednicsGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersLoadbalancersBalancednicsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersLoadbalancersBalancednicsGetRequest) Filter(key string, value string) ApiDatacentersLoadbalancersBalancednicsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersLoadbalancersBalancednicsGetRequest) OrderBy(orderBy string) ApiDatacentersLoadbalancersBalancednicsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersLoadbalancersBalancednicsGetRequest) MaxResults(maxResults int32) ApiDatacentersLoadbalancersBalancednicsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersLoadbalancersBalancednicsGetRequest) Execute() (BalancedNics, *APIResponse, error) { return r.ApiService.DatacentersLoadbalancersBalancednicsGetExecute(r) } /* * DatacentersLoadbalancersBalancednicsGet List balanced NICs * List all NICs, attached to the specified Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param loadbalancerId The unique ID of the Load Balancer. * @return ApiDatacentersLoadbalancersBalancednicsGetRequest */ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsGet(ctx _context.Context, datacenterId string, loadbalancerId string) ApiDatacentersLoadbalancersBalancednicsGetRequest { return ApiDatacentersLoadbalancersBalancednicsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, loadbalancerId: loadbalancerId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return BalancedNics */ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsGetExecute(r ApiDatacentersLoadbalancersBalancednicsGetRequest) (BalancedNics, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue BalancedNics ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancersApiService.DatacentersLoadbalancersBalancednicsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"loadbalancerId"+"}", _neturl.PathEscape(parameterToString(r.loadbalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLoadbalancersBalancednicsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLoadbalancersBalancednicsPostRequest struct { ctx _context.Context ApiService *LoadBalancersApiService datacenterId string loadbalancerId string nic *Nic pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLoadbalancersBalancednicsPostRequest) Nic(nic Nic) ApiDatacentersLoadbalancersBalancednicsPostRequest { r.nic = &nic return r } func (r ApiDatacentersLoadbalancersBalancednicsPostRequest) Pretty(pretty bool) ApiDatacentersLoadbalancersBalancednicsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersLoadbalancersBalancednicsPostRequest) Depth(depth int32) ApiDatacentersLoadbalancersBalancednicsPostRequest { r.depth = &depth return r } func (r ApiDatacentersLoadbalancersBalancednicsPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersLoadbalancersBalancednicsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLoadbalancersBalancednicsPostRequest) Execute() (Nic, *APIResponse, error) { return r.ApiService.DatacentersLoadbalancersBalancednicsPostExecute(r) } /* * DatacentersLoadbalancersBalancednicsPost Attach balanced NICs * Attachs an existing NIC to the specified Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param loadbalancerId The unique ID of the Load Balancer. * @return ApiDatacentersLoadbalancersBalancednicsPostRequest */ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsPost(ctx _context.Context, datacenterId string, loadbalancerId string) ApiDatacentersLoadbalancersBalancednicsPostRequest { return ApiDatacentersLoadbalancersBalancednicsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, loadbalancerId: loadbalancerId, } } /* * Execute executes the request * @return Nic */ func (a *LoadBalancersApiService) DatacentersLoadbalancersBalancednicsPostExecute(r ApiDatacentersLoadbalancersBalancednicsPostRequest) (Nic, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Nic ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancersApiService.DatacentersLoadbalancersBalancednicsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"loadbalancerId"+"}", _neturl.PathEscape(parameterToString(r.loadbalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.nic == nil { return localVarReturnValue, nil, reportError("nic is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.nic if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLoadbalancersBalancednicsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLoadbalancersDeleteRequest struct { ctx _context.Context ApiService *LoadBalancersApiService datacenterId string loadbalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLoadbalancersDeleteRequest) Pretty(pretty bool) ApiDatacentersLoadbalancersDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersLoadbalancersDeleteRequest) Depth(depth int32) ApiDatacentersLoadbalancersDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersLoadbalancersDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersLoadbalancersDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLoadbalancersDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersLoadbalancersDeleteExecute(r) } /* * DatacentersLoadbalancersDelete Delete Load Balancers * Remove the specified Load Balancer from the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param loadbalancerId The unique ID of the Load Balancer. * @return ApiDatacentersLoadbalancersDeleteRequest */ func (a *LoadBalancersApiService) DatacentersLoadbalancersDelete(ctx _context.Context, datacenterId string, loadbalancerId string) ApiDatacentersLoadbalancersDeleteRequest { return ApiDatacentersLoadbalancersDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, loadbalancerId: loadbalancerId, } } /* * Execute executes the request */ func (a *LoadBalancersApiService) DatacentersLoadbalancersDeleteExecute(r ApiDatacentersLoadbalancersDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancersApiService.DatacentersLoadbalancersDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"loadbalancerId"+"}", _neturl.PathEscape(parameterToString(r.loadbalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLoadbalancersDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersLoadbalancersFindByIdRequest struct { ctx _context.Context ApiService *LoadBalancersApiService datacenterId string loadbalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLoadbalancersFindByIdRequest) Pretty(pretty bool) ApiDatacentersLoadbalancersFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersLoadbalancersFindByIdRequest) Depth(depth int32) ApiDatacentersLoadbalancersFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersLoadbalancersFindByIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersLoadbalancersFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLoadbalancersFindByIdRequest) Execute() (Loadbalancer, *APIResponse, error) { return r.ApiService.DatacentersLoadbalancersFindByIdExecute(r) } /* * DatacentersLoadbalancersFindById Retrieve Load Balancers * Retrieve the properties of the specified Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param loadbalancerId The unique ID of the Load Balancer. * @return ApiDatacentersLoadbalancersFindByIdRequest */ func (a *LoadBalancersApiService) DatacentersLoadbalancersFindById(ctx _context.Context, datacenterId string, loadbalancerId string) ApiDatacentersLoadbalancersFindByIdRequest { return ApiDatacentersLoadbalancersFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, loadbalancerId: loadbalancerId, } } /* * Execute executes the request * @return Loadbalancer */ func (a *LoadBalancersApiService) DatacentersLoadbalancersFindByIdExecute(r ApiDatacentersLoadbalancersFindByIdRequest) (Loadbalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Loadbalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancersApiService.DatacentersLoadbalancersFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"loadbalancerId"+"}", _neturl.PathEscape(parameterToString(r.loadbalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLoadbalancersFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLoadbalancersGetRequest struct { ctx _context.Context ApiService *LoadBalancersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersLoadbalancersGetRequest) Pretty(pretty bool) ApiDatacentersLoadbalancersGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersLoadbalancersGetRequest) Depth(depth int32) ApiDatacentersLoadbalancersGetRequest { r.depth = &depth return r } func (r ApiDatacentersLoadbalancersGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersLoadbalancersGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLoadbalancersGetRequest) Offset(offset int32) ApiDatacentersLoadbalancersGetRequest { r.offset = &offset return r } func (r ApiDatacentersLoadbalancersGetRequest) Limit(limit int32) ApiDatacentersLoadbalancersGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersLoadbalancersGetRequest) Filter(key string, value string) ApiDatacentersLoadbalancersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersLoadbalancersGetRequest) OrderBy(orderBy string) ApiDatacentersLoadbalancersGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersLoadbalancersGetRequest) MaxResults(maxResults int32) ApiDatacentersLoadbalancersGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersLoadbalancersGetRequest) Execute() (Loadbalancers, *APIResponse, error) { return r.ApiService.DatacentersLoadbalancersGetExecute(r) } /* * DatacentersLoadbalancersGet List Load Balancers * List all the Load Balancers within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersLoadbalancersGetRequest */ func (a *LoadBalancersApiService) DatacentersLoadbalancersGet(ctx _context.Context, datacenterId string) ApiDatacentersLoadbalancersGetRequest { return ApiDatacentersLoadbalancersGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Loadbalancers */ func (a *LoadBalancersApiService) DatacentersLoadbalancersGetExecute(r ApiDatacentersLoadbalancersGetRequest) (Loadbalancers, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Loadbalancers ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancersApiService.DatacentersLoadbalancersGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/loadbalancers" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLoadbalancersGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLoadbalancersPatchRequest struct { ctx _context.Context ApiService *LoadBalancersApiService datacenterId string loadbalancerId string loadbalancer *LoadbalancerProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLoadbalancersPatchRequest) Loadbalancer(loadbalancer LoadbalancerProperties) ApiDatacentersLoadbalancersPatchRequest { r.loadbalancer = &loadbalancer return r } func (r ApiDatacentersLoadbalancersPatchRequest) Pretty(pretty bool) ApiDatacentersLoadbalancersPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersLoadbalancersPatchRequest) Depth(depth int32) ApiDatacentersLoadbalancersPatchRequest { r.depth = &depth return r } func (r ApiDatacentersLoadbalancersPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersLoadbalancersPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLoadbalancersPatchRequest) Execute() (Loadbalancer, *APIResponse, error) { return r.ApiService.DatacentersLoadbalancersPatchExecute(r) } /* * DatacentersLoadbalancersPatch Partially modify Load Balancers * Update the properties of the specified Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param loadbalancerId The unique ID of the Load Balancer. * @return ApiDatacentersLoadbalancersPatchRequest */ func (a *LoadBalancersApiService) DatacentersLoadbalancersPatch(ctx _context.Context, datacenterId string, loadbalancerId string) ApiDatacentersLoadbalancersPatchRequest { return ApiDatacentersLoadbalancersPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, loadbalancerId: loadbalancerId, } } /* * Execute executes the request * @return Loadbalancer */ func (a *LoadBalancersApiService) DatacentersLoadbalancersPatchExecute(r ApiDatacentersLoadbalancersPatchRequest) (Loadbalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Loadbalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancersApiService.DatacentersLoadbalancersPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"loadbalancerId"+"}", _neturl.PathEscape(parameterToString(r.loadbalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.loadbalancer == nil { return localVarReturnValue, nil, reportError("loadbalancer is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.loadbalancer if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLoadbalancersPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLoadbalancersPostRequest struct { ctx _context.Context ApiService *LoadBalancersApiService datacenterId string loadbalancer *Loadbalancer pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLoadbalancersPostRequest) Loadbalancer(loadbalancer Loadbalancer) ApiDatacentersLoadbalancersPostRequest { r.loadbalancer = &loadbalancer return r } func (r ApiDatacentersLoadbalancersPostRequest) Pretty(pretty bool) ApiDatacentersLoadbalancersPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersLoadbalancersPostRequest) Depth(depth int32) ApiDatacentersLoadbalancersPostRequest { r.depth = &depth return r } func (r ApiDatacentersLoadbalancersPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersLoadbalancersPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLoadbalancersPostRequest) Execute() (Loadbalancer, *APIResponse, error) { return r.ApiService.DatacentersLoadbalancersPostExecute(r) } /* * DatacentersLoadbalancersPost Create a Load Balancer * Creates a Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersLoadbalancersPostRequest */ func (a *LoadBalancersApiService) DatacentersLoadbalancersPost(ctx _context.Context, datacenterId string) ApiDatacentersLoadbalancersPostRequest { return ApiDatacentersLoadbalancersPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return Loadbalancer */ func (a *LoadBalancersApiService) DatacentersLoadbalancersPostExecute(r ApiDatacentersLoadbalancersPostRequest) (Loadbalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Loadbalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancersApiService.DatacentersLoadbalancersPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/loadbalancers" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.loadbalancer == nil { return localVarReturnValue, nil, reportError("loadbalancer is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.loadbalancer if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLoadbalancersPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersLoadbalancersPutRequest struct { ctx _context.Context ApiService *LoadBalancersApiService datacenterId string loadbalancerId string loadbalancer *Loadbalancer pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersLoadbalancersPutRequest) Loadbalancer(loadbalancer Loadbalancer) ApiDatacentersLoadbalancersPutRequest { r.loadbalancer = &loadbalancer return r } func (r ApiDatacentersLoadbalancersPutRequest) Pretty(pretty bool) ApiDatacentersLoadbalancersPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersLoadbalancersPutRequest) Depth(depth int32) ApiDatacentersLoadbalancersPutRequest { r.depth = &depth return r } func (r ApiDatacentersLoadbalancersPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersLoadbalancersPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersLoadbalancersPutRequest) Execute() (Loadbalancer, *APIResponse, error) { return r.ApiService.DatacentersLoadbalancersPutExecute(r) } /* * DatacentersLoadbalancersPut Modify a Load Balancer by ID * Modifies the properties of the specified Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param loadbalancerId The unique ID of the Load Balancer. * @return ApiDatacentersLoadbalancersPutRequest */ func (a *LoadBalancersApiService) DatacentersLoadbalancersPut(ctx _context.Context, datacenterId string, loadbalancerId string) ApiDatacentersLoadbalancersPutRequest { return ApiDatacentersLoadbalancersPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, loadbalancerId: loadbalancerId, } } /* * Execute executes the request * @return Loadbalancer */ func (a *LoadBalancersApiService) DatacentersLoadbalancersPutExecute(r ApiDatacentersLoadbalancersPutRequest) (Loadbalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Loadbalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancersApiService.DatacentersLoadbalancersPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/loadbalancers/{loadbalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"loadbalancerId"+"}", _neturl.PathEscape(parameterToString(r.loadbalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.loadbalancer == nil { return localVarReturnValue, nil, reportError("loadbalancer is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.loadbalancer if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersLoadbalancersPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_locations.go000066400000000000000000000467271465267054300230700ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // LocationsApiService LocationsApi service type LocationsApiService service type ApiLocationsFindByRegionIdRequest struct { ctx _context.Context ApiService *LocationsApiService regionId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiLocationsFindByRegionIdRequest) Pretty(pretty bool) ApiLocationsFindByRegionIdRequest { r.pretty = &pretty return r } func (r ApiLocationsFindByRegionIdRequest) Depth(depth int32) ApiLocationsFindByRegionIdRequest { r.depth = &depth return r } func (r ApiLocationsFindByRegionIdRequest) XContractNumber(xContractNumber int32) ApiLocationsFindByRegionIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiLocationsFindByRegionIdRequest) Execute() (Locations, *APIResponse, error) { return r.ApiService.LocationsFindByRegionIdExecute(r) } /* * LocationsFindByRegionId Get Locations within a Region * Retrieves the available locations in a region specified by its ID. The 'regionId' consists of the two character identifier of the region (country), e.g., 'de'. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param regionId The unique ID of the region. * @return ApiLocationsFindByRegionIdRequest */ func (a *LocationsApiService) LocationsFindByRegionId(ctx _context.Context, regionId string) ApiLocationsFindByRegionIdRequest { return ApiLocationsFindByRegionIdRequest{ ApiService: a, ctx: ctx, regionId: regionId, } } /* * Execute executes the request * @return Locations */ func (a *LocationsApiService) LocationsFindByRegionIdExecute(r ApiLocationsFindByRegionIdRequest) (Locations, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Locations ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LocationsApiService.LocationsFindByRegionId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/locations/{regionId}" localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", _neturl.PathEscape(parameterToString(r.regionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "LocationsFindByRegionId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiLocationsFindByRegionIdAndIdRequest struct { ctx _context.Context ApiService *LocationsApiService regionId string locationId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiLocationsFindByRegionIdAndIdRequest) Pretty(pretty bool) ApiLocationsFindByRegionIdAndIdRequest { r.pretty = &pretty return r } func (r ApiLocationsFindByRegionIdAndIdRequest) Depth(depth int32) ApiLocationsFindByRegionIdAndIdRequest { r.depth = &depth return r } func (r ApiLocationsFindByRegionIdAndIdRequest) XContractNumber(xContractNumber int32) ApiLocationsFindByRegionIdAndIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiLocationsFindByRegionIdAndIdRequest) Execute() (Location, *APIResponse, error) { return r.ApiService.LocationsFindByRegionIdAndIdExecute(r) } /* * LocationsFindByRegionIdAndId Get Location by ID * Retrieves the information about the location specified by its ID. The 'locationId' consists of the three-digit identifier of the city according to the IATA code. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param regionId The unique ID of the region. * @param locationId The unique ID of the location. * @return ApiLocationsFindByRegionIdAndIdRequest */ func (a *LocationsApiService) LocationsFindByRegionIdAndId(ctx _context.Context, regionId string, locationId string) ApiLocationsFindByRegionIdAndIdRequest { return ApiLocationsFindByRegionIdAndIdRequest{ ApiService: a, ctx: ctx, regionId: regionId, locationId: locationId, } } /* * Execute executes the request * @return Location */ func (a *LocationsApiService) LocationsFindByRegionIdAndIdExecute(r ApiLocationsFindByRegionIdAndIdRequest) (Location, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Location ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LocationsApiService.LocationsFindByRegionIdAndId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/locations/{regionId}/{locationId}" localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", _neturl.PathEscape(parameterToString(r.regionId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"locationId"+"}", _neturl.PathEscape(parameterToString(r.locationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "LocationsFindByRegionIdAndId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiLocationsGetRequest struct { ctx _context.Context ApiService *LocationsApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiLocationsGetRequest) Pretty(pretty bool) ApiLocationsGetRequest { r.pretty = &pretty return r } func (r ApiLocationsGetRequest) Depth(depth int32) ApiLocationsGetRequest { r.depth = &depth return r } func (r ApiLocationsGetRequest) XContractNumber(xContractNumber int32) ApiLocationsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiLocationsGetRequest) Filter(key string, value string) ApiLocationsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiLocationsGetRequest) OrderBy(orderBy string) ApiLocationsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiLocationsGetRequest) MaxResults(maxResults int32) ApiLocationsGetRequest { r.maxResults = &maxResults return r } func (r ApiLocationsGetRequest) Execute() (Locations, *APIResponse, error) { return r.ApiService.LocationsGetExecute(r) } /* * LocationsGet Get Locations * Retrieves the available physical locations where you can deploy cloud resources in a VDC. A location is identified by a combination of the following characters: * a two-character **regionId**, which represents a country (example: 'de') * a three-character **locationId**, which represents a city. The 'locationId' is typically based on the IATA code of the city's airport (example: 'txl'). >Note that 'locations' are read-only and cannot be changed. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiLocationsGetRequest */ func (a *LocationsApiService) LocationsGet(ctx _context.Context) ApiLocationsGetRequest { return ApiLocationsGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Locations */ func (a *LocationsApiService) LocationsGetExecute(r ApiLocationsGetRequest) (Locations, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Locations ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LocationsApiService.LocationsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/locations" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "LocationsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_nat_gateways.go000066400000000000000000003563711465267054300235620ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // NATGatewaysApiService NATGatewaysApi service type NATGatewaysApiService service type ApiDatacentersNatgatewaysDeleteRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysDeleteRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysDeleteRequest) Depth(depth int32) ApiDatacentersNatgatewaysDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNatgatewaysDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersNatgatewaysDeleteExecute(r) } /* * DatacentersNatgatewaysDelete Delete NAT Gateways * Remove the specified NAT Gateway from the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @return ApiDatacentersNatgatewaysDeleteRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysDelete(ctx _context.Context, datacenterId string, natGatewayId string) ApiDatacentersNatgatewaysDeleteRequest { return ApiDatacentersNatgatewaysDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, } } /* * Execute executes the request */ func (a *NATGatewaysApiService) DatacentersNatgatewaysDeleteExecute(r ApiDatacentersNatgatewaysDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersNatgatewaysFindByNatGatewayIdRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysFindByNatGatewayIdRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysFindByNatGatewayIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysFindByNatGatewayIdRequest) Depth(depth int32) ApiDatacentersNatgatewaysFindByNatGatewayIdRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysFindByNatGatewayIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysFindByNatGatewayIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNatgatewaysFindByNatGatewayIdRequest) Execute() (NatGateway, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysFindByNatGatewayIdExecute(r) } /* * DatacentersNatgatewaysFindByNatGatewayId Retrieve NAT Gateways * Retrieve the properties of the specified NAT Gateway within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @return ApiDatacentersNatgatewaysFindByNatGatewayIdRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFindByNatGatewayId(ctx _context.Context, datacenterId string, natGatewayId string) ApiDatacentersNatgatewaysFindByNatGatewayIdRequest { return ApiDatacentersNatgatewaysFindByNatGatewayIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, } } /* * Execute executes the request * @return NatGateway */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFindByNatGatewayIdExecute(r ApiDatacentersNatgatewaysFindByNatGatewayIdRequest) (NatGateway, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NatGateway ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysFindByNatGatewayId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysFindByNatGatewayId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysFlowlogsDeleteRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string flowLogId string pretty *bool depth *int32 } func (r ApiDatacentersNatgatewaysFlowlogsDeleteRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysFlowlogsDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysFlowlogsDeleteRequest) Depth(depth int32) ApiDatacentersNatgatewaysFlowlogsDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysFlowlogsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersNatgatewaysFlowlogsDeleteExecute(r) } /* * DatacentersNatgatewaysFlowlogsDelete Delete NAT Gateway Flow Logs * Delete the specified NAT Gateway Flow Log. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @param flowLogId The unique ID of the Flow Log. * @return ApiDatacentersNatgatewaysFlowlogsDeleteRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsDelete(ctx _context.Context, datacenterId string, natGatewayId string, flowLogId string) ApiDatacentersNatgatewaysFlowlogsDeleteRequest { return ApiDatacentersNatgatewaysFlowlogsDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, flowLogId: flowLogId, } } /* * Execute executes the request */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsDeleteExecute(r ApiDatacentersNatgatewaysFlowlogsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysFlowlogsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysFlowlogsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string flowLogId string pretty *bool depth *int32 } func (r ApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest) Depth(depth int32) ApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysFlowlogsFindByFlowLogIdExecute(r) } /* * DatacentersNatgatewaysFlowlogsFindByFlowLogId Retrieve NAT Gateway Flow Logs * Retrieve the specified NAT Gateway Flow Log. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @param flowLogId The unique ID of the Flow Log. * @return ApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsFindByFlowLogId(ctx _context.Context, datacenterId string, natGatewayId string, flowLogId string) ApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest { return ApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, flowLogId: flowLogId, } } /* * Execute executes the request * @return FlowLog */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsFindByFlowLogIdExecute(r ApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysFlowlogsFindByFlowLogId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysFlowlogsFindByFlowLogId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysFlowlogsGetRequest struct { ctx _context.Context ApiService *NATGatewaysApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string natGatewayId string pretty *bool depth *int32 offset *int32 limit *int32 } func (r ApiDatacentersNatgatewaysFlowlogsGetRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysFlowlogsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysFlowlogsGetRequest) Depth(depth int32) ApiDatacentersNatgatewaysFlowlogsGetRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysFlowlogsGetRequest) Offset(offset int32) ApiDatacentersNatgatewaysFlowlogsGetRequest { r.offset = &offset return r } func (r ApiDatacentersNatgatewaysFlowlogsGetRequest) Limit(limit int32) ApiDatacentersNatgatewaysFlowlogsGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNatgatewaysFlowlogsGetRequest) Filter(key string, value string) ApiDatacentersNatgatewaysFlowlogsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersNatgatewaysFlowlogsGetRequest) OrderBy(orderBy string) ApiDatacentersNatgatewaysFlowlogsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersNatgatewaysFlowlogsGetRequest) MaxResults(maxResults int32) ApiDatacentersNatgatewaysFlowlogsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersNatgatewaysFlowlogsGetRequest) Execute() (FlowLogs, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysFlowlogsGetExecute(r) } /* * DatacentersNatgatewaysFlowlogsGet List NAT Gateway Flow Logs * List all the Flow Logs for the specified NAT Gateway. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @return ApiDatacentersNatgatewaysFlowlogsGetRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsGet(ctx _context.Context, datacenterId string, natGatewayId string) ApiDatacentersNatgatewaysFlowlogsGetRequest { return ApiDatacentersNatgatewaysFlowlogsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return FlowLogs */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsGetExecute(r ApiDatacentersNatgatewaysFlowlogsGetRequest) (FlowLogs, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLogs ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysFlowlogsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysFlowlogsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysFlowlogsPatchRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string flowLogId string natGatewayFlowLogProperties *FlowLogProperties pretty *bool depth *int32 } func (r ApiDatacentersNatgatewaysFlowlogsPatchRequest) NatGatewayFlowLogProperties(natGatewayFlowLogProperties FlowLogProperties) ApiDatacentersNatgatewaysFlowlogsPatchRequest { r.natGatewayFlowLogProperties = &natGatewayFlowLogProperties return r } func (r ApiDatacentersNatgatewaysFlowlogsPatchRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysFlowlogsPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysFlowlogsPatchRequest) Depth(depth int32) ApiDatacentersNatgatewaysFlowlogsPatchRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysFlowlogsPatchRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysFlowlogsPatchExecute(r) } /* * DatacentersNatgatewaysFlowlogsPatch Partially modify NAT Gateway Flow Logs * Update the properties of the specified NAT Gateway Flow Log. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @param flowLogId The unique ID of the Flow Log. * @return ApiDatacentersNatgatewaysFlowlogsPatchRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsPatch(ctx _context.Context, datacenterId string, natGatewayId string, flowLogId string) ApiDatacentersNatgatewaysFlowlogsPatchRequest { return ApiDatacentersNatgatewaysFlowlogsPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, flowLogId: flowLogId, } } /* * Execute executes the request * @return FlowLog */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsPatchExecute(r ApiDatacentersNatgatewaysFlowlogsPatchRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysFlowlogsPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.natGatewayFlowLogProperties == nil { return localVarReturnValue, nil, reportError("natGatewayFlowLogProperties is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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 } // body params localVarPostBody = r.natGatewayFlowLogProperties if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysFlowlogsPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysFlowlogsPostRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string natGatewayFlowLog *FlowLog pretty *bool depth *int32 } func (r ApiDatacentersNatgatewaysFlowlogsPostRequest) NatGatewayFlowLog(natGatewayFlowLog FlowLog) ApiDatacentersNatgatewaysFlowlogsPostRequest { r.natGatewayFlowLog = &natGatewayFlowLog return r } func (r ApiDatacentersNatgatewaysFlowlogsPostRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysFlowlogsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysFlowlogsPostRequest) Depth(depth int32) ApiDatacentersNatgatewaysFlowlogsPostRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysFlowlogsPostRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysFlowlogsPostExecute(r) } /* * DatacentersNatgatewaysFlowlogsPost Create a NAT Gateway Flow Log * Adds a new Flow Log to the specified NAT Gateway. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @return ApiDatacentersNatgatewaysFlowlogsPostRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsPost(ctx _context.Context, datacenterId string, natGatewayId string) ApiDatacentersNatgatewaysFlowlogsPostRequest { return ApiDatacentersNatgatewaysFlowlogsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, } } /* * Execute executes the request * @return FlowLog */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsPostExecute(r ApiDatacentersNatgatewaysFlowlogsPostRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysFlowlogsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.natGatewayFlowLog == nil { return localVarReturnValue, nil, reportError("natGatewayFlowLog is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.natGatewayFlowLog if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysFlowlogsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysFlowlogsPutRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string flowLogId string natGatewayFlowLog *FlowLogPut pretty *bool depth *int32 } func (r ApiDatacentersNatgatewaysFlowlogsPutRequest) NatGatewayFlowLog(natGatewayFlowLog FlowLogPut) ApiDatacentersNatgatewaysFlowlogsPutRequest { r.natGatewayFlowLog = &natGatewayFlowLog return r } func (r ApiDatacentersNatgatewaysFlowlogsPutRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysFlowlogsPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysFlowlogsPutRequest) Depth(depth int32) ApiDatacentersNatgatewaysFlowlogsPutRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysFlowlogsPutRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysFlowlogsPutExecute(r) } /* * DatacentersNatgatewaysFlowlogsPut Modify NAT Gateway Flow Logs * Modify the specified NAT Gateway Flow Log. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @param flowLogId The unique ID of the Flow Log. * @return ApiDatacentersNatgatewaysFlowlogsPutRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsPut(ctx _context.Context, datacenterId string, natGatewayId string, flowLogId string) ApiDatacentersNatgatewaysFlowlogsPutRequest { return ApiDatacentersNatgatewaysFlowlogsPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, flowLogId: flowLogId, } } /* * Execute executes the request * @return FlowLog */ func (a *NATGatewaysApiService) DatacentersNatgatewaysFlowlogsPutExecute(r ApiDatacentersNatgatewaysFlowlogsPutRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysFlowlogsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.natGatewayFlowLog == nil { return localVarReturnValue, nil, reportError("natGatewayFlowLog is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.natGatewayFlowLog if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysFlowlogsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysGetRequest struct { ctx _context.Context ApiService *NATGatewaysApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysGetRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysGetRequest) Depth(depth int32) ApiDatacentersNatgatewaysGetRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNatgatewaysGetRequest) Filter(key string, value string) ApiDatacentersNatgatewaysGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersNatgatewaysGetRequest) OrderBy(orderBy string) ApiDatacentersNatgatewaysGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersNatgatewaysGetRequest) MaxResults(maxResults int32) ApiDatacentersNatgatewaysGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersNatgatewaysGetRequest) Execute() (NatGateways, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysGetExecute(r) } /* * DatacentersNatgatewaysGet List NAT Gateways * List all NAT Gateways within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersNatgatewaysGetRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysGet(ctx _context.Context, datacenterId string) ApiDatacentersNatgatewaysGetRequest { return ApiDatacentersNatgatewaysGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return NatGateways */ func (a *NATGatewaysApiService) DatacentersNatgatewaysGetExecute(r ApiDatacentersNatgatewaysGetRequest) (NatGateways, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NatGateways ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysPatchRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string natGatewayProperties *NatGatewayProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysPatchRequest) NatGatewayProperties(natGatewayProperties NatGatewayProperties) ApiDatacentersNatgatewaysPatchRequest { r.natGatewayProperties = &natGatewayProperties return r } func (r ApiDatacentersNatgatewaysPatchRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysPatchRequest) Depth(depth int32) ApiDatacentersNatgatewaysPatchRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNatgatewaysPatchRequest) Execute() (NatGateway, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysPatchExecute(r) } /* * DatacentersNatgatewaysPatch Partially modify NAT Gateways * Update the properties of the specified NAT Gateway within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @return ApiDatacentersNatgatewaysPatchRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysPatch(ctx _context.Context, datacenterId string, natGatewayId string) ApiDatacentersNatgatewaysPatchRequest { return ApiDatacentersNatgatewaysPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, } } /* * Execute executes the request * @return NatGateway */ func (a *NATGatewaysApiService) DatacentersNatgatewaysPatchExecute(r ApiDatacentersNatgatewaysPatchRequest) (NatGateway, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NatGateway ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.natGatewayProperties == nil { return localVarReturnValue, nil, reportError("natGatewayProperties is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.natGatewayProperties if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysPostRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGateway *NatGateway pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysPostRequest) NatGateway(natGateway NatGateway) ApiDatacentersNatgatewaysPostRequest { r.natGateway = &natGateway return r } func (r ApiDatacentersNatgatewaysPostRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysPostRequest) Depth(depth int32) ApiDatacentersNatgatewaysPostRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNatgatewaysPostRequest) Execute() (NatGateway, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysPostExecute(r) } /* - DatacentersNatgatewaysPost Create a NAT Gateway - Creates a NAT Gateway within the data center. This operation is restricted to contract owner, admin, and users with 'createInternetAccess' privileges. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @return ApiDatacentersNatgatewaysPostRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysPost(ctx _context.Context, datacenterId string) ApiDatacentersNatgatewaysPostRequest { return ApiDatacentersNatgatewaysPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return NatGateway */ func (a *NATGatewaysApiService) DatacentersNatgatewaysPostExecute(r ApiDatacentersNatgatewaysPostRequest) (NatGateway, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NatGateway ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.natGateway == nil { return localVarReturnValue, nil, reportError("natGateway is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.natGateway if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysPutRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string natGateway *NatGatewayPut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysPutRequest) NatGateway(natGateway NatGatewayPut) ApiDatacentersNatgatewaysPutRequest { r.natGateway = &natGateway return r } func (r ApiDatacentersNatgatewaysPutRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysPutRequest) Depth(depth int32) ApiDatacentersNatgatewaysPutRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNatgatewaysPutRequest) Execute() (NatGateway, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysPutExecute(r) } /* * DatacentersNatgatewaysPut Modify NAT Gateways * Modify the properties of the specified NAT Gateway within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @return ApiDatacentersNatgatewaysPutRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysPut(ctx _context.Context, datacenterId string, natGatewayId string) ApiDatacentersNatgatewaysPutRequest { return ApiDatacentersNatgatewaysPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, } } /* * Execute executes the request * @return NatGateway */ func (a *NATGatewaysApiService) DatacentersNatgatewaysPutExecute(r ApiDatacentersNatgatewaysPutRequest) (NatGateway, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NatGateway ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.natGateway == nil { return localVarReturnValue, nil, reportError("natGateway is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.natGateway if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysRulesDeleteRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string natGatewayRuleId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysRulesDeleteRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysRulesDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysRulesDeleteRequest) Depth(depth int32) ApiDatacentersNatgatewaysRulesDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysRulesDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysRulesDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNatgatewaysRulesDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersNatgatewaysRulesDeleteExecute(r) } /* * DatacentersNatgatewaysRulesDelete Delete NAT Gateway rules * Delete the specified NAT Gateway rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @param natGatewayRuleId The unique ID of the NAT Gateway rule. * @return ApiDatacentersNatgatewaysRulesDeleteRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesDelete(ctx _context.Context, datacenterId string, natGatewayId string, natGatewayRuleId string) ApiDatacentersNatgatewaysRulesDeleteRequest { return ApiDatacentersNatgatewaysRulesDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, natGatewayRuleId: natGatewayRuleId, } } /* * Execute executes the request */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesDeleteExecute(r ApiDatacentersNatgatewaysRulesDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysRulesDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayRuleId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysRulesDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string natGatewayRuleId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest) Depth(depth int32) ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest) Execute() (NatGatewayRule, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysRulesFindByNatGatewayRuleIdExecute(r) } /* * DatacentersNatgatewaysRulesFindByNatGatewayRuleId Retrieve NAT Gateway rules * Retrieve the properties of the specified NAT Gateway rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @param natGatewayRuleId The unique ID of the NAT Gateway rule. * @return ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesFindByNatGatewayRuleId(ctx _context.Context, datacenterId string, natGatewayId string, natGatewayRuleId string) ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest { return ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, natGatewayRuleId: natGatewayRuleId, } } /* * Execute executes the request * @return NatGatewayRule */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesFindByNatGatewayRuleIdExecute(r ApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest) (NatGatewayRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NatGatewayRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysRulesFindByNatGatewayRuleId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayRuleId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysRulesFindByNatGatewayRuleId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysRulesGetRequest struct { ctx _context.Context ApiService *NATGatewaysApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string natGatewayId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysRulesGetRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysRulesGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysRulesGetRequest) Depth(depth int32) ApiDatacentersNatgatewaysRulesGetRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysRulesGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysRulesGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNatgatewaysRulesGetRequest) Filter(key string, value string) ApiDatacentersNatgatewaysRulesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersNatgatewaysRulesGetRequest) OrderBy(orderBy string) ApiDatacentersNatgatewaysRulesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersNatgatewaysRulesGetRequest) MaxResults(maxResults int32) ApiDatacentersNatgatewaysRulesGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersNatgatewaysRulesGetRequest) Execute() (NatGatewayRules, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysRulesGetExecute(r) } /* * DatacentersNatgatewaysRulesGet List NAT Gateway rules * List all rules for the specified NAT Gateway. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @return ApiDatacentersNatgatewaysRulesGetRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesGet(ctx _context.Context, datacenterId string, natGatewayId string) ApiDatacentersNatgatewaysRulesGetRequest { return ApiDatacentersNatgatewaysRulesGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return NatGatewayRules */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesGetExecute(r ApiDatacentersNatgatewaysRulesGetRequest) (NatGatewayRules, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NatGatewayRules ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysRulesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysRulesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysRulesPatchRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string natGatewayRuleId string natGatewayRuleProperties *NatGatewayRuleProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysRulesPatchRequest) NatGatewayRuleProperties(natGatewayRuleProperties NatGatewayRuleProperties) ApiDatacentersNatgatewaysRulesPatchRequest { r.natGatewayRuleProperties = &natGatewayRuleProperties return r } func (r ApiDatacentersNatgatewaysRulesPatchRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysRulesPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysRulesPatchRequest) Depth(depth int32) ApiDatacentersNatgatewaysRulesPatchRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysRulesPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysRulesPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNatgatewaysRulesPatchRequest) Execute() (NatGatewayRule, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysRulesPatchExecute(r) } /* * DatacentersNatgatewaysRulesPatch Partially Modify a NAT Gateway Rule by ID * Updates the properties of the specified NAT Gateway rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @param natGatewayRuleId The unique ID of the NAT Gateway rule. * @return ApiDatacentersNatgatewaysRulesPatchRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesPatch(ctx _context.Context, datacenterId string, natGatewayId string, natGatewayRuleId string) ApiDatacentersNatgatewaysRulesPatchRequest { return ApiDatacentersNatgatewaysRulesPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, natGatewayRuleId: natGatewayRuleId, } } /* * Execute executes the request * @return NatGatewayRule */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesPatchExecute(r ApiDatacentersNatgatewaysRulesPatchRequest) (NatGatewayRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NatGatewayRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysRulesPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayRuleId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.natGatewayRuleProperties == nil { return localVarReturnValue, nil, reportError("natGatewayRuleProperties is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.natGatewayRuleProperties if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysRulesPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysRulesPostRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string natGatewayRule *NatGatewayRule pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysRulesPostRequest) NatGatewayRule(natGatewayRule NatGatewayRule) ApiDatacentersNatgatewaysRulesPostRequest { r.natGatewayRule = &natGatewayRule return r } func (r ApiDatacentersNatgatewaysRulesPostRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysRulesPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysRulesPostRequest) Depth(depth int32) ApiDatacentersNatgatewaysRulesPostRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysRulesPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysRulesPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNatgatewaysRulesPostRequest) Execute() (NatGatewayRule, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysRulesPostExecute(r) } /* * DatacentersNatgatewaysRulesPost Create a NAT Gateway Rule * Creates a rule for the specified NAT Gateway. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @return ApiDatacentersNatgatewaysRulesPostRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesPost(ctx _context.Context, datacenterId string, natGatewayId string) ApiDatacentersNatgatewaysRulesPostRequest { return ApiDatacentersNatgatewaysRulesPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, } } /* * Execute executes the request * @return NatGatewayRule */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesPostExecute(r ApiDatacentersNatgatewaysRulesPostRequest) (NatGatewayRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NatGatewayRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysRulesPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.natGatewayRule == nil { return localVarReturnValue, nil, reportError("natGatewayRule is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.natGatewayRule if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysRulesPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNatgatewaysRulesPutRequest struct { ctx _context.Context ApiService *NATGatewaysApiService datacenterId string natGatewayId string natGatewayRuleId string natGatewayRule *NatGatewayRulePut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNatgatewaysRulesPutRequest) NatGatewayRule(natGatewayRule NatGatewayRulePut) ApiDatacentersNatgatewaysRulesPutRequest { r.natGatewayRule = &natGatewayRule return r } func (r ApiDatacentersNatgatewaysRulesPutRequest) Pretty(pretty bool) ApiDatacentersNatgatewaysRulesPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersNatgatewaysRulesPutRequest) Depth(depth int32) ApiDatacentersNatgatewaysRulesPutRequest { r.depth = &depth return r } func (r ApiDatacentersNatgatewaysRulesPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersNatgatewaysRulesPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNatgatewaysRulesPutRequest) Execute() (NatGatewayRule, *APIResponse, error) { return r.ApiService.DatacentersNatgatewaysRulesPutExecute(r) } /* * DatacentersNatgatewaysRulesPut Modify a NAT Gateway Rule by ID * Modify the specified NAT Gateway rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param natGatewayId The unique ID of the NAT Gateway. * @param natGatewayRuleId The unique ID of the NAT Gateway rule. * @return ApiDatacentersNatgatewaysRulesPutRequest */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesPut(ctx _context.Context, datacenterId string, natGatewayId string, natGatewayRuleId string) ApiDatacentersNatgatewaysRulesPutRequest { return ApiDatacentersNatgatewaysRulesPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, natGatewayId: natGatewayId, natGatewayRuleId: natGatewayRuleId, } } /* * Execute executes the request * @return NatGatewayRule */ func (a *NATGatewaysApiService) DatacentersNatgatewaysRulesPutExecute(r ApiDatacentersNatgatewaysRulesPutRequest) (NatGatewayRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NatGatewayRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NATGatewaysApiService.DatacentersNatgatewaysRulesPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"natGatewayRuleId"+"}", _neturl.PathEscape(parameterToString(r.natGatewayRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.natGatewayRule == nil { return localVarReturnValue, nil, reportError("natGatewayRule is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.natGatewayRule if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNatgatewaysRulesPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_network_interfaces.go000066400000000000000000001207051465267054300247560ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // NetworkInterfacesApiService NetworkInterfacesApi service type NetworkInterfacesApiService service type ApiDatacentersServersNicsDeleteRequest struct { ctx _context.Context ApiService *NetworkInterfacesApiService datacenterId string serverId string nicId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersNicsDeleteRequest) Pretty(pretty bool) ApiDatacentersServersNicsDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsDeleteRequest) Depth(depth int32) ApiDatacentersServersNicsDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersNicsDeleteExecute(r) } /* * DatacentersServersNicsDelete Delete NICs * Remove the specified NIC. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @return ApiDatacentersServersNicsDeleteRequest */ func (a *NetworkInterfacesApiService) DatacentersServersNicsDelete(ctx _context.Context, datacenterId string, serverId string, nicId string) ApiDatacentersServersNicsDeleteRequest { return ApiDatacentersServersNicsDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, } } /* * Execute executes the request */ func (a *NetworkInterfacesApiService) DatacentersServersNicsDeleteExecute(r ApiDatacentersServersNicsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkInterfacesApiService.DatacentersServersNicsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersNicsFindByIdRequest struct { ctx _context.Context ApiService *NetworkInterfacesApiService datacenterId string serverId string nicId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersNicsFindByIdRequest) Pretty(pretty bool) ApiDatacentersServersNicsFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsFindByIdRequest) Depth(depth int32) ApiDatacentersServersNicsFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsFindByIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsFindByIdRequest) Execute() (Nic, *APIResponse, error) { return r.ApiService.DatacentersServersNicsFindByIdExecute(r) } /* * DatacentersServersNicsFindById Retrieve NICs * Retrieve the properties of the specified NIC. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @return ApiDatacentersServersNicsFindByIdRequest */ func (a *NetworkInterfacesApiService) DatacentersServersNicsFindById(ctx _context.Context, datacenterId string, serverId string, nicId string) ApiDatacentersServersNicsFindByIdRequest { return ApiDatacentersServersNicsFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, } } /* * Execute executes the request * @return Nic */ func (a *NetworkInterfacesApiService) DatacentersServersNicsFindByIdExecute(r ApiDatacentersServersNicsFindByIdRequest) (Nic, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Nic ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkInterfacesApiService.DatacentersServersNicsFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsGetRequest struct { ctx _context.Context ApiService *NetworkInterfacesApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersServersNicsGetRequest) Pretty(pretty bool) ApiDatacentersServersNicsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsGetRequest) Depth(depth int32) ApiDatacentersServersNicsGetRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsGetRequest) Offset(offset int32) ApiDatacentersServersNicsGetRequest { r.offset = &offset return r } func (r ApiDatacentersServersNicsGetRequest) Limit(limit int32) ApiDatacentersServersNicsGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersNicsGetRequest) Filter(key string, value string) ApiDatacentersServersNicsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersServersNicsGetRequest) OrderBy(orderBy string) ApiDatacentersServersNicsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersServersNicsGetRequest) MaxResults(maxResults int32) ApiDatacentersServersNicsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersServersNicsGetRequest) Execute() (Nics, *APIResponse, error) { return r.ApiService.DatacentersServersNicsGetExecute(r) } /* * DatacentersServersNicsGet List NICs * List all NICs, attached to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersNicsGetRequest */ func (a *NetworkInterfacesApiService) DatacentersServersNicsGet(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersNicsGetRequest { return ApiDatacentersServersNicsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Nics */ func (a *NetworkInterfacesApiService) DatacentersServersNicsGetExecute(r ApiDatacentersServersNicsGetRequest) (Nics, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Nics ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkInterfacesApiService.DatacentersServersNicsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsPatchRequest struct { ctx _context.Context ApiService *NetworkInterfacesApiService datacenterId string serverId string nicId string nic *NicProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersNicsPatchRequest) Nic(nic NicProperties) ApiDatacentersServersNicsPatchRequest { r.nic = &nic return r } func (r ApiDatacentersServersNicsPatchRequest) Pretty(pretty bool) ApiDatacentersServersNicsPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsPatchRequest) Depth(depth int32) ApiDatacentersServersNicsPatchRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsPatchRequest) Execute() (Nic, *APIResponse, error) { return r.ApiService.DatacentersServersNicsPatchExecute(r) } /* * DatacentersServersNicsPatch Partially modify NICs * Update the properties of the specified NIC. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @return ApiDatacentersServersNicsPatchRequest */ func (a *NetworkInterfacesApiService) DatacentersServersNicsPatch(ctx _context.Context, datacenterId string, serverId string, nicId string) ApiDatacentersServersNicsPatchRequest { return ApiDatacentersServersNicsPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, } } /* * Execute executes the request * @return Nic */ func (a *NetworkInterfacesApiService) DatacentersServersNicsPatchExecute(r ApiDatacentersServersNicsPatchRequest) (Nic, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Nic ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkInterfacesApiService.DatacentersServersNicsPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.nic == nil { return localVarReturnValue, nil, reportError("nic is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.nic if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsPostRequest struct { ctx _context.Context ApiService *NetworkInterfacesApiService datacenterId string serverId string nic *Nic pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersNicsPostRequest) Nic(nic Nic) ApiDatacentersServersNicsPostRequest { r.nic = &nic return r } func (r ApiDatacentersServersNicsPostRequest) Pretty(pretty bool) ApiDatacentersServersNicsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsPostRequest) Depth(depth int32) ApiDatacentersServersNicsPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsPostRequest) Execute() (Nic, *APIResponse, error) { return r.ApiService.DatacentersServersNicsPostExecute(r) } /* * DatacentersServersNicsPost Create a NIC * Adds a NIC to the specified server. The combined total of NICs and attached volumes cannot exceed 24 per server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersNicsPostRequest */ func (a *NetworkInterfacesApiService) DatacentersServersNicsPost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersNicsPostRequest { return ApiDatacentersServersNicsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request * @return Nic */ func (a *NetworkInterfacesApiService) DatacentersServersNicsPostExecute(r ApiDatacentersServersNicsPostRequest) (Nic, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Nic ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkInterfacesApiService.DatacentersServersNicsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.nic == nil { return localVarReturnValue, nil, reportError("nic is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.nic if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersNicsPutRequest struct { ctx _context.Context ApiService *NetworkInterfacesApiService datacenterId string serverId string nicId string nic *NicPut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersNicsPutRequest) Nic(nic NicPut) ApiDatacentersServersNicsPutRequest { r.nic = &nic return r } func (r ApiDatacentersServersNicsPutRequest) Pretty(pretty bool) ApiDatacentersServersNicsPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersNicsPutRequest) Depth(depth int32) ApiDatacentersServersNicsPutRequest { r.depth = &depth return r } func (r ApiDatacentersServersNicsPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersNicsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersNicsPutRequest) Execute() (Nic, *APIResponse, error) { return r.ApiService.DatacentersServersNicsPutExecute(r) } /* * DatacentersServersNicsPut Modify NICs * Modify the properties of the specified NIC. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param nicId The unique ID of the NIC. * @return ApiDatacentersServersNicsPutRequest */ func (a *NetworkInterfacesApiService) DatacentersServersNicsPut(ctx _context.Context, datacenterId string, serverId string, nicId string) ApiDatacentersServersNicsPutRequest { return ApiDatacentersServersNicsPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, nicId: nicId, } } /* * Execute executes the request * @return Nic */ func (a *NetworkInterfacesApiService) DatacentersServersNicsPutExecute(r ApiDatacentersServersNicsPutRequest) (Nic, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Nic ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkInterfacesApiService.DatacentersServersNicsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"nicId"+"}", _neturl.PathEscape(parameterToString(r.nicId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.nic == nil { return localVarReturnValue, nil, reportError("nic is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.nic if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersNicsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_network_load_balancers.go000066400000000000000000004060771465267054300255750ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // NetworkLoadBalancersApiService NetworkLoadBalancersApi service type NetworkLoadBalancersApiService service type ApiDatacentersNetworkloadbalancersDeleteRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersDeleteRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersDeleteRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersDeleteExecute(r) } /* * DatacentersNetworkloadbalancersDelete Delete Network Load Balancers * Remove the specified Network Load Balancer from the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @return ApiDatacentersNetworkloadbalancersDeleteRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersDelete(ctx _context.Context, datacenterId string, networkLoadBalancerId string) ApiDatacentersNetworkloadbalancersDeleteRequest { return ApiDatacentersNetworkloadbalancersDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, } } /* * Execute executes the request */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersDeleteExecute(r ApiDatacentersNetworkloadbalancersDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest) Execute() (NetworkLoadBalancer, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdExecute(r) } /* * DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId Retrieve Network Load Balancers * Retrieve the properties of the specified Network Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @return ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId(ctx _context.Context, datacenterId string, networkLoadBalancerId string) ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest { return ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, } } /* * Execute executes the request * @return NetworkLoadBalancer */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdExecute(r ApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest) (NetworkLoadBalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NetworkLoadBalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string flowLogId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersFlowlogsDeleteExecute(r) } /* * DatacentersNetworkloadbalancersFlowlogsDelete Delete NLB Flow Logs * Delete the specified Network Load Balancer Flow Log. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @param flowLogId The unique ID of the Flow Log. * @return ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsDelete(ctx _context.Context, datacenterId string, networkLoadBalancerId string, flowLogId string) ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest { return ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, flowLogId: flowLogId, } } /* * Execute executes the request */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsDeleteExecute(r ApiDatacentersNetworkloadbalancersFlowlogsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersFlowlogsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersFlowlogsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string flowLogId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdExecute(r) } /* * DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId Retrieve NLB Flow Logs * Retrieve the specified Network Load Balancer Flow Log. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @param flowLogId The unique ID of the Flow Log. * @return ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId(ctx _context.Context, datacenterId string, networkLoadBalancerId string, flowLogId string) ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest { return ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, flowLogId: flowLogId, } } /* * Execute executes the request * @return FlowLog */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdExecute(r ApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersFlowlogsGetRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string networkLoadBalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersFlowlogsGetRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersFlowlogsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsGetRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersFlowlogsGetRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersFlowlogsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNetworkloadbalancersFlowlogsGetRequest) Filter(key string, value string) ApiDatacentersNetworkloadbalancersFlowlogsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersNetworkloadbalancersFlowlogsGetRequest) OrderBy(orderBy string) ApiDatacentersNetworkloadbalancersFlowlogsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersNetworkloadbalancersFlowlogsGetRequest) MaxResults(maxResults int32) ApiDatacentersNetworkloadbalancersFlowlogsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsGetRequest) Execute() (FlowLogs, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersFlowlogsGetExecute(r) } /* * DatacentersNetworkloadbalancersFlowlogsGet List NLB Flow Logs * List all the Flow Logs for the specified Network Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @return ApiDatacentersNetworkloadbalancersFlowlogsGetRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsGet(ctx _context.Context, datacenterId string, networkLoadBalancerId string) ApiDatacentersNetworkloadbalancersFlowlogsGetRequest { return ApiDatacentersNetworkloadbalancersFlowlogsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return FlowLogs */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsGetExecute(r ApiDatacentersNetworkloadbalancersFlowlogsGetRequest) (FlowLogs, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLogs ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersFlowlogsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersFlowlogsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string flowLogId string networkLoadBalancerFlowLogProperties *FlowLogProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest) NetworkLoadBalancerFlowLogProperties(networkLoadBalancerFlowLogProperties FlowLogProperties) ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest { r.networkLoadBalancerFlowLogProperties = &networkLoadBalancerFlowLogProperties return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersFlowlogsPatchExecute(r) } /* * DatacentersNetworkloadbalancersFlowlogsPatch Partially modify NLB Flow Logs * Update the properties of the specified Network Load Balancer Flow Log. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @param flowLogId The unique ID of the Flow Log. * @return ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsPatch(ctx _context.Context, datacenterId string, networkLoadBalancerId string, flowLogId string) ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest { return ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, flowLogId: flowLogId, } } /* * Execute executes the request * @return FlowLog */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsPatchExecute(r ApiDatacentersNetworkloadbalancersFlowlogsPatchRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersFlowlogsPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.networkLoadBalancerFlowLogProperties == nil { return localVarReturnValue, nil, reportError("networkLoadBalancerFlowLogProperties is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.networkLoadBalancerFlowLogProperties if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersFlowlogsPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersFlowlogsPostRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string networkLoadBalancerFlowLog *FlowLog pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersFlowlogsPostRequest) NetworkLoadBalancerFlowLog(networkLoadBalancerFlowLog FlowLog) ApiDatacentersNetworkloadbalancersFlowlogsPostRequest { r.networkLoadBalancerFlowLog = &networkLoadBalancerFlowLog return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPostRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersFlowlogsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPostRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersFlowlogsPostRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersFlowlogsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPostRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersFlowlogsPostExecute(r) } /* * DatacentersNetworkloadbalancersFlowlogsPost Create a NLB Flow Log * Adds a new Flow Log for the Network Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @return ApiDatacentersNetworkloadbalancersFlowlogsPostRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsPost(ctx _context.Context, datacenterId string, networkLoadBalancerId string) ApiDatacentersNetworkloadbalancersFlowlogsPostRequest { return ApiDatacentersNetworkloadbalancersFlowlogsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, } } /* * Execute executes the request * @return FlowLog */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsPostExecute(r ApiDatacentersNetworkloadbalancersFlowlogsPostRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersFlowlogsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.networkLoadBalancerFlowLog == nil { return localVarReturnValue, nil, reportError("networkLoadBalancerFlowLog is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.networkLoadBalancerFlowLog if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersFlowlogsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersFlowlogsPutRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string flowLogId string networkLoadBalancerFlowLog *FlowLogPut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersFlowlogsPutRequest) NetworkLoadBalancerFlowLog(networkLoadBalancerFlowLog FlowLogPut) ApiDatacentersNetworkloadbalancersFlowlogsPutRequest { r.networkLoadBalancerFlowLog = &networkLoadBalancerFlowLog return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPutRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersFlowlogsPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPutRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersFlowlogsPutRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersFlowlogsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersFlowlogsPutRequest) Execute() (FlowLog, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersFlowlogsPutExecute(r) } /* * DatacentersNetworkloadbalancersFlowlogsPut Modify NLB Flow Logs * Modify the specified Network Load Balancer Flow Log. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @param flowLogId The unique ID of the Flow Log. * @return ApiDatacentersNetworkloadbalancersFlowlogsPutRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsPut(ctx _context.Context, datacenterId string, networkLoadBalancerId string, flowLogId string) ApiDatacentersNetworkloadbalancersFlowlogsPutRequest { return ApiDatacentersNetworkloadbalancersFlowlogsPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, flowLogId: flowLogId, } } /* * Execute executes the request * @return FlowLog */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersFlowlogsPutExecute(r ApiDatacentersNetworkloadbalancersFlowlogsPutRequest) (FlowLog, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue FlowLog ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersFlowlogsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flowLogId"+"}", _neturl.PathEscape(parameterToString(r.flowLogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.networkLoadBalancerFlowLog == nil { return localVarReturnValue, nil, reportError("networkLoadBalancerFlowLog is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.networkLoadBalancerFlowLog if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersFlowlogsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string forwardingRuleId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersForwardingrulesDeleteExecute(r) } /* * DatacentersNetworkloadbalancersForwardingrulesDelete Delete NLB forwarding rules * Delete the specified Network Load Balancer forwarding rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @param forwardingRuleId The unique ID of the forwarding rule. * @return ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesDelete(ctx _context.Context, datacenterId string, networkLoadBalancerId string, forwardingRuleId string) ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest { return ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, forwardingRuleId: forwardingRuleId, } } /* * Execute executes the request */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesDeleteExecute(r ApiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersForwardingrulesDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersForwardingrulesDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string forwardingRuleId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest) Execute() (NetworkLoadBalancerForwardingRule, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdExecute(r) } /* * DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId Retrieve NLB forwarding rules * Retrieve the specified Network Load Balance forwarding rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @param forwardingRuleId The unique ID of the forwarding rule. * @return ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId(ctx _context.Context, datacenterId string, networkLoadBalancerId string, forwardingRuleId string) ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest { return ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, forwardingRuleId: forwardingRuleId, } } /* * Execute executes the request * @return NetworkLoadBalancerForwardingRule */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdExecute(r ApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest) (NetworkLoadBalancerForwardingRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NetworkLoadBalancerForwardingRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string networkLoadBalancerId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest) Filter(key string, value string) ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest) OrderBy(orderBy string) ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest) MaxResults(maxResults int32) ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest) Execute() (NetworkLoadBalancerForwardingRules, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersForwardingrulesGetExecute(r) } /* * DatacentersNetworkloadbalancersForwardingrulesGet List NLB forwarding rules * List the forwarding rules for the specified Network Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @return ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesGet(ctx _context.Context, datacenterId string, networkLoadBalancerId string) ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest { return ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return NetworkLoadBalancerForwardingRules */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesGetExecute(r ApiDatacentersNetworkloadbalancersForwardingrulesGetRequest) (NetworkLoadBalancerForwardingRules, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NetworkLoadBalancerForwardingRules ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersForwardingrulesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersForwardingrulesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string forwardingRuleId string networkLoadBalancerForwardingRuleProperties *NetworkLoadBalancerForwardingRuleProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest) NetworkLoadBalancerForwardingRuleProperties(networkLoadBalancerForwardingRuleProperties NetworkLoadBalancerForwardingRuleProperties) ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest { r.networkLoadBalancerForwardingRuleProperties = &networkLoadBalancerForwardingRuleProperties return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest) Execute() (NetworkLoadBalancerForwardingRule, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersForwardingrulesPatchExecute(r) } /* * DatacentersNetworkloadbalancersForwardingrulesPatch Partially modify NLB forwarding rules * Update the properties of the specified Network Load Balancer forwarding rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @param forwardingRuleId The unique ID of the forwarding rule. * @return ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesPatch(ctx _context.Context, datacenterId string, networkLoadBalancerId string, forwardingRuleId string) ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest { return ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, forwardingRuleId: forwardingRuleId, } } /* * Execute executes the request * @return NetworkLoadBalancerForwardingRule */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesPatchExecute(r ApiDatacentersNetworkloadbalancersForwardingrulesPatchRequest) (NetworkLoadBalancerForwardingRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NetworkLoadBalancerForwardingRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersForwardingrulesPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.networkLoadBalancerForwardingRuleProperties == nil { return localVarReturnValue, nil, reportError("networkLoadBalancerForwardingRuleProperties is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.networkLoadBalancerForwardingRuleProperties if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersForwardingrulesPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string networkLoadBalancerForwardingRule *NetworkLoadBalancerForwardingRule pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest) NetworkLoadBalancerForwardingRule(networkLoadBalancerForwardingRule NetworkLoadBalancerForwardingRule) ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest { r.networkLoadBalancerForwardingRule = &networkLoadBalancerForwardingRule return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest) Execute() (NetworkLoadBalancerForwardingRule, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersForwardingrulesPostExecute(r) } /* * DatacentersNetworkloadbalancersForwardingrulesPost Create a NLB Forwarding Rule * Creates a forwarding rule for the specified Network Load Balancer. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @return ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesPost(ctx _context.Context, datacenterId string, networkLoadBalancerId string) ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest { return ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, } } /* * Execute executes the request * @return NetworkLoadBalancerForwardingRule */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesPostExecute(r ApiDatacentersNetworkloadbalancersForwardingrulesPostRequest) (NetworkLoadBalancerForwardingRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NetworkLoadBalancerForwardingRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersForwardingrulesPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.networkLoadBalancerForwardingRule == nil { return localVarReturnValue, nil, reportError("networkLoadBalancerForwardingRule is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.networkLoadBalancerForwardingRule if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersForwardingrulesPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string forwardingRuleId string networkLoadBalancerForwardingRule *NetworkLoadBalancerForwardingRulePut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest) NetworkLoadBalancerForwardingRule(networkLoadBalancerForwardingRule NetworkLoadBalancerForwardingRulePut) ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest { r.networkLoadBalancerForwardingRule = &networkLoadBalancerForwardingRule return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest) Execute() (NetworkLoadBalancerForwardingRule, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersForwardingrulesPutExecute(r) } /* * DatacentersNetworkloadbalancersForwardingrulesPut Modify NLB forwarding rules * Modify the specified Network Load Balancer forwarding rule. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @param forwardingRuleId The unique ID of the forwarding rule. * @return ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesPut(ctx _context.Context, datacenterId string, networkLoadBalancerId string, forwardingRuleId string) ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest { return ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, forwardingRuleId: forwardingRuleId, } } /* * Execute executes the request * @return NetworkLoadBalancerForwardingRule */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersForwardingrulesPutExecute(r ApiDatacentersNetworkloadbalancersForwardingrulesPutRequest) (NetworkLoadBalancerForwardingRule, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NetworkLoadBalancerForwardingRule ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersForwardingrulesPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"forwardingRuleId"+"}", _neturl.PathEscape(parameterToString(r.forwardingRuleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.networkLoadBalancerForwardingRule == nil { return localVarReturnValue, nil, reportError("networkLoadBalancerForwardingRule is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.networkLoadBalancerForwardingRule if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersForwardingrulesPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersGetRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersNetworkloadbalancersGetRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersGetRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersGetRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersGetRequest) Offset(offset int32) ApiDatacentersNetworkloadbalancersGetRequest { r.offset = &offset return r } func (r ApiDatacentersNetworkloadbalancersGetRequest) Limit(limit int32) ApiDatacentersNetworkloadbalancersGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersNetworkloadbalancersGetRequest) Filter(key string, value string) ApiDatacentersNetworkloadbalancersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersNetworkloadbalancersGetRequest) OrderBy(orderBy string) ApiDatacentersNetworkloadbalancersGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersNetworkloadbalancersGetRequest) MaxResults(maxResults int32) ApiDatacentersNetworkloadbalancersGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersNetworkloadbalancersGetRequest) Execute() (NetworkLoadBalancers, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersGetExecute(r) } /* * DatacentersNetworkloadbalancersGet List Network Load Balancers * List all the Network Load Balancers within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersNetworkloadbalancersGetRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersGet(ctx _context.Context, datacenterId string) ApiDatacentersNetworkloadbalancersGetRequest { return ApiDatacentersNetworkloadbalancersGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return NetworkLoadBalancers */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersGetExecute(r ApiDatacentersNetworkloadbalancersGetRequest) (NetworkLoadBalancers, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NetworkLoadBalancers ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersPatchRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string networkLoadBalancerProperties *NetworkLoadBalancerProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersPatchRequest) NetworkLoadBalancerProperties(networkLoadBalancerProperties NetworkLoadBalancerProperties) ApiDatacentersNetworkloadbalancersPatchRequest { r.networkLoadBalancerProperties = &networkLoadBalancerProperties return r } func (r ApiDatacentersNetworkloadbalancersPatchRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersPatchRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersPatchRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersPatchRequest) Execute() (NetworkLoadBalancer, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersPatchExecute(r) } /* * DatacentersNetworkloadbalancersPatch Partially modify Network Load Balancers * Update the properties of the specified Network Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @return ApiDatacentersNetworkloadbalancersPatchRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersPatch(ctx _context.Context, datacenterId string, networkLoadBalancerId string) ApiDatacentersNetworkloadbalancersPatchRequest { return ApiDatacentersNetworkloadbalancersPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, } } /* * Execute executes the request * @return NetworkLoadBalancer */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersPatchExecute(r ApiDatacentersNetworkloadbalancersPatchRequest) (NetworkLoadBalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NetworkLoadBalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.networkLoadBalancerProperties == nil { return localVarReturnValue, nil, reportError("networkLoadBalancerProperties is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.networkLoadBalancerProperties if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersPostRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancer *NetworkLoadBalancer pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersPostRequest) NetworkLoadBalancer(networkLoadBalancer NetworkLoadBalancer) ApiDatacentersNetworkloadbalancersPostRequest { r.networkLoadBalancer = &networkLoadBalancer return r } func (r ApiDatacentersNetworkloadbalancersPostRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersPostRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersPostRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersPostRequest) Execute() (NetworkLoadBalancer, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersPostExecute(r) } /* * DatacentersNetworkloadbalancersPost Create a Network Load Balancer * Creates a Network Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersNetworkloadbalancersPostRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersPost(ctx _context.Context, datacenterId string) ApiDatacentersNetworkloadbalancersPostRequest { return ApiDatacentersNetworkloadbalancersPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return NetworkLoadBalancer */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersPostExecute(r ApiDatacentersNetworkloadbalancersPostRequest) (NetworkLoadBalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NetworkLoadBalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.networkLoadBalancer == nil { return localVarReturnValue, nil, reportError("networkLoadBalancer is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.networkLoadBalancer if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersNetworkloadbalancersPutRequest struct { ctx _context.Context ApiService *NetworkLoadBalancersApiService datacenterId string networkLoadBalancerId string networkLoadBalancer *NetworkLoadBalancerPut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersNetworkloadbalancersPutRequest) NetworkLoadBalancer(networkLoadBalancer NetworkLoadBalancerPut) ApiDatacentersNetworkloadbalancersPutRequest { r.networkLoadBalancer = &networkLoadBalancer return r } func (r ApiDatacentersNetworkloadbalancersPutRequest) Pretty(pretty bool) ApiDatacentersNetworkloadbalancersPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersNetworkloadbalancersPutRequest) Depth(depth int32) ApiDatacentersNetworkloadbalancersPutRequest { r.depth = &depth return r } func (r ApiDatacentersNetworkloadbalancersPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersNetworkloadbalancersPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersNetworkloadbalancersPutRequest) Execute() (NetworkLoadBalancer, *APIResponse, error) { return r.ApiService.DatacentersNetworkloadbalancersPutExecute(r) } /* * DatacentersNetworkloadbalancersPut Modify Network Load Balancers * Modify the properties of the specified Network Load Balancer within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param networkLoadBalancerId The unique ID of the Network Load Balancer. * @return ApiDatacentersNetworkloadbalancersPutRequest */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersPut(ctx _context.Context, datacenterId string, networkLoadBalancerId string) ApiDatacentersNetworkloadbalancersPutRequest { return ApiDatacentersNetworkloadbalancersPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, networkLoadBalancerId: networkLoadBalancerId, } } /* * Execute executes the request * @return NetworkLoadBalancer */ func (a *NetworkLoadBalancersApiService) DatacentersNetworkloadbalancersPutExecute(r ApiDatacentersNetworkloadbalancersPutRequest) (NetworkLoadBalancer, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue NetworkLoadBalancer ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkLoadBalancersApiService.DatacentersNetworkloadbalancersPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"networkLoadBalancerId"+"}", _neturl.PathEscape(parameterToString(r.networkLoadBalancerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.networkLoadBalancer == nil { return localVarReturnValue, nil, reportError("networkLoadBalancer is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.networkLoadBalancer if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersNetworkloadbalancersPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_private_cross_connects.go000066400000000000000000000740231465267054300256420ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // PrivateCrossConnectsApiService PrivateCrossConnectsApi service type PrivateCrossConnectsApiService service type ApiPccsDeleteRequest struct { ctx _context.Context ApiService *PrivateCrossConnectsApiService pccId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiPccsDeleteRequest) Pretty(pretty bool) ApiPccsDeleteRequest { r.pretty = &pretty return r } func (r ApiPccsDeleteRequest) Depth(depth int32) ApiPccsDeleteRequest { r.depth = &depth return r } func (r ApiPccsDeleteRequest) XContractNumber(xContractNumber int32) ApiPccsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiPccsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.PccsDeleteExecute(r) } /* * PccsDelete Delete Cross Connects * Remove the specified Cross Connect. Cross connect can be deleted only if it is not connected to any LANs. For non administrator users a cross connect can be deleted only if you are granted access via the user groups you are member of. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pccId The unique ID of the Cross Connect. * @return ApiPccsDeleteRequest */ func (a *PrivateCrossConnectsApiService) PccsDelete(ctx _context.Context, pccId string) ApiPccsDeleteRequest { return ApiPccsDeleteRequest{ ApiService: a, ctx: ctx, pccId: pccId, } } /* * Execute executes the request */ func (a *PrivateCrossConnectsApiService) PccsDeleteExecute(r ApiPccsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivateCrossConnectsApiService.PccsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pccs/{pccId}" localVarPath = strings.Replace(localVarPath, "{"+"pccId"+"}", _neturl.PathEscape(parameterToString(r.pccId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "PccsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiPccsFindByIdRequest struct { ctx _context.Context ApiService *PrivateCrossConnectsApiService pccId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiPccsFindByIdRequest) Pretty(pretty bool) ApiPccsFindByIdRequest { r.pretty = &pretty return r } func (r ApiPccsFindByIdRequest) Depth(depth int32) ApiPccsFindByIdRequest { r.depth = &depth return r } func (r ApiPccsFindByIdRequest) XContractNumber(xContractNumber int32) ApiPccsFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiPccsFindByIdRequest) Execute() (PrivateCrossConnect, *APIResponse, error) { return r.ApiService.PccsFindByIdExecute(r) } /* * PccsFindById Retrieve a Cross Connect * Retrieve a Cross Connect by the resource ID. Cross Connect ID is in the response body when the Cross Connect is created and in the list of Cross Connects, returned by GET. For contract owner and administrators all cross connects in your contract can be retrieved. For non administrator users it only returns the cross connects you are granted access via the user groups you are member of. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pccId The unique ID of the Cross Connect. * @return ApiPccsFindByIdRequest */ func (a *PrivateCrossConnectsApiService) PccsFindById(ctx _context.Context, pccId string) ApiPccsFindByIdRequest { return ApiPccsFindByIdRequest{ ApiService: a, ctx: ctx, pccId: pccId, } } /* * Execute executes the request * @return PrivateCrossConnect */ func (a *PrivateCrossConnectsApiService) PccsFindByIdExecute(r ApiPccsFindByIdRequest) (PrivateCrossConnect, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue PrivateCrossConnect ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivateCrossConnectsApiService.PccsFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pccs/{pccId}" localVarPath = strings.Replace(localVarPath, "{"+"pccId"+"}", _neturl.PathEscape(parameterToString(r.pccId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "PccsFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiPccsGetRequest struct { ctx _context.Context ApiService *PrivateCrossConnectsApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiPccsGetRequest) Pretty(pretty bool) ApiPccsGetRequest { r.pretty = &pretty return r } func (r ApiPccsGetRequest) Depth(depth int32) ApiPccsGetRequest { r.depth = &depth return r } func (r ApiPccsGetRequest) XContractNumber(xContractNumber int32) ApiPccsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiPccsGetRequest) Filter(key string, value string) ApiPccsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiPccsGetRequest) OrderBy(orderBy string) ApiPccsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiPccsGetRequest) MaxResults(maxResults int32) ApiPccsGetRequest { r.maxResults = &maxResults return r } func (r ApiPccsGetRequest) Execute() (PrivateCrossConnects, *APIResponse, error) { return r.ApiService.PccsGetExecute(r) } /* * PccsGet List Cross Connects * List all Cross Connects. For contract owner and administrators it returns all cross connects in your contract. For non administrator users it only returns the cross connects you are granted access via the user groups you are member of. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiPccsGetRequest */ func (a *PrivateCrossConnectsApiService) PccsGet(ctx _context.Context) ApiPccsGetRequest { return ApiPccsGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return PrivateCrossConnects */ func (a *PrivateCrossConnectsApiService) PccsGetExecute(r ApiPccsGetRequest) (PrivateCrossConnects, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue PrivateCrossConnects ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivateCrossConnectsApiService.PccsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pccs" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "PccsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiPccsPatchRequest struct { ctx _context.Context ApiService *PrivateCrossConnectsApiService pccId string pcc *PrivateCrossConnectProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiPccsPatchRequest) Pcc(pcc PrivateCrossConnectProperties) ApiPccsPatchRequest { r.pcc = &pcc return r } func (r ApiPccsPatchRequest) Pretty(pretty bool) ApiPccsPatchRequest { r.pretty = &pretty return r } func (r ApiPccsPatchRequest) Depth(depth int32) ApiPccsPatchRequest { r.depth = &depth return r } func (r ApiPccsPatchRequest) XContractNumber(xContractNumber int32) ApiPccsPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiPccsPatchRequest) Execute() (PrivateCrossConnect, *APIResponse, error) { return r.ApiService.PccsPatchExecute(r) } /* * PccsPatch Partially modify a Cross Connects * Update the properties of the specified Cross Connect.For non administrator users you can only update the cross connects you are granted access via the user groups you are member of * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param pccId The unique ID of the Cross Connect. * @return ApiPccsPatchRequest */ func (a *PrivateCrossConnectsApiService) PccsPatch(ctx _context.Context, pccId string) ApiPccsPatchRequest { return ApiPccsPatchRequest{ ApiService: a, ctx: ctx, pccId: pccId, } } /* * Execute executes the request * @return PrivateCrossConnect */ func (a *PrivateCrossConnectsApiService) PccsPatchExecute(r ApiPccsPatchRequest) (PrivateCrossConnect, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue PrivateCrossConnect ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivateCrossConnectsApiService.PccsPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pccs/{pccId}" localVarPath = strings.Replace(localVarPath, "{"+"pccId"+"}", _neturl.PathEscape(parameterToString(r.pccId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pcc == nil { return localVarReturnValue, nil, reportError("pcc is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.pcc if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "PccsPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiPccsPostRequest struct { ctx _context.Context ApiService *PrivateCrossConnectsApiService pcc *PrivateCrossConnect pretty *bool depth *int32 xContractNumber *int32 } func (r ApiPccsPostRequest) Pcc(pcc PrivateCrossConnect) ApiPccsPostRequest { r.pcc = &pcc return r } func (r ApiPccsPostRequest) Pretty(pretty bool) ApiPccsPostRequest { r.pretty = &pretty return r } func (r ApiPccsPostRequest) Depth(depth int32) ApiPccsPostRequest { r.depth = &depth return r } func (r ApiPccsPostRequest) XContractNumber(xContractNumber int32) ApiPccsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiPccsPostRequest) Execute() (PrivateCrossConnect, *APIResponse, error) { return r.ApiService.PccsPostExecute(r) } /* * PccsPost Create a Cross Connect * Creates a Cross-Connect. Only contract owners, administrators and users with createPcc user privilege can create a cross connect. Please note that connecting a LAN to a cross connect is to be done via the /lan endpoint. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiPccsPostRequest */ func (a *PrivateCrossConnectsApiService) PccsPost(ctx _context.Context) ApiPccsPostRequest { return ApiPccsPostRequest{ ApiService: a, ctx: ctx, } } /* * Execute executes the request * @return PrivateCrossConnect */ func (a *PrivateCrossConnectsApiService) PccsPostExecute(r ApiPccsPostRequest) (PrivateCrossConnect, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue PrivateCrossConnect ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivateCrossConnectsApiService.PccsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pccs" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pcc == nil { return localVarReturnValue, nil, reportError("pcc is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.pcc if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "PccsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_requests.go000066400000000000000000000565501465267054300227430ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // RequestsApiService RequestsApi service type RequestsApiService service type ApiRequestsFindByIdRequest struct { ctx _context.Context ApiService *RequestsApiService requestId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiRequestsFindByIdRequest) Pretty(pretty bool) ApiRequestsFindByIdRequest { r.pretty = &pretty return r } func (r ApiRequestsFindByIdRequest) Depth(depth int32) ApiRequestsFindByIdRequest { r.depth = &depth return r } func (r ApiRequestsFindByIdRequest) XContractNumber(xContractNumber int32) ApiRequestsFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiRequestsFindByIdRequest) Execute() (Request, *APIResponse, error) { return r.ApiService.RequestsFindByIdExecute(r) } /* * RequestsFindById Retrieve requests * Retrieve the properties of the specified request. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param requestId The unique ID of the request. * @return ApiRequestsFindByIdRequest */ func (a *RequestsApiService) RequestsFindById(ctx _context.Context, requestId string) ApiRequestsFindByIdRequest { return ApiRequestsFindByIdRequest{ ApiService: a, ctx: ctx, requestId: requestId, } } /* * Execute executes the request * @return Request */ func (a *RequestsApiService) RequestsFindByIdExecute(r ApiRequestsFindByIdRequest) (Request, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Request ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RequestsApiService.RequestsFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/requests/{requestId}" localVarPath = strings.Replace(localVarPath, "{"+"requestId"+"}", _neturl.PathEscape(parameterToString(r.requestId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "RequestsFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiRequestsGetRequest struct { ctx _context.Context ApiService *RequestsApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 filterStatus *string filterCreatedAfter *string filterCreatedBefore *string filterCreatedDate *string filterCreatedBy *string filterEtag *string filterRequestStatus *string filterMethod *string filterHeaders *string filterBody *string filterUrl *string offset *int32 limit *int32 } func (r ApiRequestsGetRequest) Pretty(pretty bool) ApiRequestsGetRequest { r.pretty = &pretty return r } func (r ApiRequestsGetRequest) Depth(depth int32) ApiRequestsGetRequest { r.depth = &depth return r } func (r ApiRequestsGetRequest) XContractNumber(xContractNumber int32) ApiRequestsGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiRequestsGetRequest) FilterStatus(filterStatus string) ApiRequestsGetRequest { r.filterStatus = &filterStatus return r } func (r ApiRequestsGetRequest) FilterCreatedAfter(filterCreatedAfter string) ApiRequestsGetRequest { r.filterCreatedAfter = &filterCreatedAfter return r } func (r ApiRequestsGetRequest) FilterCreatedBefore(filterCreatedBefore string) ApiRequestsGetRequest { r.filterCreatedBefore = &filterCreatedBefore return r } func (r ApiRequestsGetRequest) FilterCreatedDate(filterCreatedDate string) ApiRequestsGetRequest { r.filterCreatedDate = &filterCreatedDate return r } func (r ApiRequestsGetRequest) FilterCreatedBy(filterCreatedBy string) ApiRequestsGetRequest { r.filterCreatedBy = &filterCreatedBy return r } func (r ApiRequestsGetRequest) FilterEtag(filterEtag string) ApiRequestsGetRequest { r.filterEtag = &filterEtag return r } func (r ApiRequestsGetRequest) FilterRequestStatus(filterRequestStatus string) ApiRequestsGetRequest { r.filterRequestStatus = &filterRequestStatus return r } func (r ApiRequestsGetRequest) FilterMethod(filterMethod string) ApiRequestsGetRequest { r.filterMethod = &filterMethod return r } func (r ApiRequestsGetRequest) FilterHeaders(filterHeaders string) ApiRequestsGetRequest { r.filterHeaders = &filterHeaders return r } func (r ApiRequestsGetRequest) FilterBody(filterBody string) ApiRequestsGetRequest { r.filterBody = &filterBody return r } func (r ApiRequestsGetRequest) FilterUrl(filterUrl string) ApiRequestsGetRequest { r.filterUrl = &filterUrl return r } func (r ApiRequestsGetRequest) Offset(offset int32) ApiRequestsGetRequest { r.offset = &offset return r } func (r ApiRequestsGetRequest) Limit(limit int32) ApiRequestsGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiRequestsGetRequest) Filter(key string, value string) ApiRequestsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiRequestsGetRequest) OrderBy(orderBy string) ApiRequestsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiRequestsGetRequest) MaxResults(maxResults int32) ApiRequestsGetRequest { r.maxResults = &maxResults return r } func (r ApiRequestsGetRequest) Execute() (Requests, *APIResponse, error) { return r.ApiService.RequestsGetExecute(r) } /* * RequestsGet List requests * List all API requests. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiRequestsGetRequest */ func (a *RequestsApiService) RequestsGet(ctx _context.Context) ApiRequestsGetRequest { return ApiRequestsGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Requests */ func (a *RequestsApiService) RequestsGetExecute(r ApiRequestsGetRequest) (Requests, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Requests ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RequestsApiService.RequestsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/requests" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.filterStatus != nil { localVarQueryParams.Add("filter.status", parameterToString(*r.filterStatus, "")) } if r.filterCreatedAfter != nil { localVarQueryParams.Add("filter.createdAfter", parameterToString(*r.filterCreatedAfter, "")) } if r.filterCreatedBefore != nil { localVarQueryParams.Add("filter.createdBefore", parameterToString(*r.filterCreatedBefore, "")) } if r.filterCreatedDate != nil { localVarQueryParams.Add("filter.createdDate", parameterToString(*r.filterCreatedDate, "")) } if r.filterCreatedBy != nil { localVarQueryParams.Add("filter.createdBy", parameterToString(*r.filterCreatedBy, "")) } if r.filterEtag != nil { localVarQueryParams.Add("filter.etag", parameterToString(*r.filterEtag, "")) } if r.filterRequestStatus != nil { localVarQueryParams.Add("filter.requestStatus", parameterToString(*r.filterRequestStatus, "")) } if r.filterMethod != nil { localVarQueryParams.Add("filter.method", parameterToString(*r.filterMethod, "")) } if r.filterHeaders != nil { localVarQueryParams.Add("filter.headers", parameterToString(*r.filterHeaders, "")) } if r.filterBody != nil { localVarQueryParams.Add("filter.body", parameterToString(*r.filterBody, "")) } if r.filterUrl != nil { localVarQueryParams.Add("filter.url", parameterToString(*r.filterUrl, "")) } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "RequestsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiRequestsStatusGetRequest struct { ctx _context.Context ApiService *RequestsApiService filters _neturl.Values orderBy *string maxResults *int32 requestId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiRequestsStatusGetRequest) Pretty(pretty bool) ApiRequestsStatusGetRequest { r.pretty = &pretty return r } func (r ApiRequestsStatusGetRequest) Depth(depth int32) ApiRequestsStatusGetRequest { r.depth = &depth return r } func (r ApiRequestsStatusGetRequest) XContractNumber(xContractNumber int32) ApiRequestsStatusGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiRequestsStatusGetRequest) Filter(key string, value string) ApiRequestsStatusGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiRequestsStatusGetRequest) OrderBy(orderBy string) ApiRequestsStatusGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiRequestsStatusGetRequest) MaxResults(maxResults int32) ApiRequestsStatusGetRequest { r.maxResults = &maxResults return r } func (r ApiRequestsStatusGetRequest) Execute() (RequestStatus, *APIResponse, error) { return r.ApiService.RequestsStatusGetExecute(r) } /* * RequestsStatusGet Retrieve request status * Retrieve the status of the specified request. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param requestId The unique ID of the request. * @return ApiRequestsStatusGetRequest */ func (a *RequestsApiService) RequestsStatusGet(ctx _context.Context, requestId string) ApiRequestsStatusGetRequest { return ApiRequestsStatusGetRequest{ ApiService: a, ctx: ctx, requestId: requestId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return RequestStatus */ func (a *RequestsApiService) RequestsStatusGetExecute(r ApiRequestsStatusGetRequest) (RequestStatus, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue RequestStatus ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RequestsApiService.RequestsStatusGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/requests/{requestId}/status" localVarPath = strings.Replace(localVarPath, "{"+"requestId"+"}", _neturl.PathEscape(parameterToString(r.requestId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "RequestsStatusGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_servers.go000066400000000000000000004366441465267054300225670ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // ServersApiService ServersApi service type ServersApiService service type ApiDatacentersServersCdromsDeleteRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string cdromId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersCdromsDeleteRequest) Pretty(pretty bool) ApiDatacentersServersCdromsDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersCdromsDeleteRequest) Depth(depth int32) ApiDatacentersServersCdromsDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersServersCdromsDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersCdromsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersCdromsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersCdromsDeleteExecute(r) } /* - DatacentersServersCdromsDelete Detach a CD-ROM by ID - Detachs the specified CD-ROM from the server. Detaching a CD-ROM deletes the CD-ROM. The image will not be deleted. Note that detaching a CD-ROM leads to a reset of the server. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. - @param cdromId The unique ID of the CD-ROM. - @return ApiDatacentersServersCdromsDeleteRequest */ func (a *ServersApiService) DatacentersServersCdromsDelete(ctx _context.Context, datacenterId string, serverId string, cdromId string) ApiDatacentersServersCdromsDeleteRequest { return ApiDatacentersServersCdromsDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, cdromId: cdromId, } } /* * Execute executes the request */ func (a *ServersApiService) DatacentersServersCdromsDeleteExecute(r ApiDatacentersServersCdromsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersCdromsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"cdromId"+"}", _neturl.PathEscape(parameterToString(r.cdromId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersCdromsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersCdromsFindByIdRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string cdromId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersCdromsFindByIdRequest) Pretty(pretty bool) ApiDatacentersServersCdromsFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersCdromsFindByIdRequest) Depth(depth int32) ApiDatacentersServersCdromsFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersServersCdromsFindByIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersCdromsFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersCdromsFindByIdRequest) Execute() (Image, *APIResponse, error) { return r.ApiService.DatacentersServersCdromsFindByIdExecute(r) } /* * DatacentersServersCdromsFindById Get Attached CD-ROM by ID * Retrieves the properties of the CD-ROM attached to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param cdromId The unique ID of the CD-ROM. * @return ApiDatacentersServersCdromsFindByIdRequest */ func (a *ServersApiService) DatacentersServersCdromsFindById(ctx _context.Context, datacenterId string, serverId string, cdromId string) ApiDatacentersServersCdromsFindByIdRequest { return ApiDatacentersServersCdromsFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, cdromId: cdromId, } } /* * Execute executes the request * @return Image */ func (a *ServersApiService) DatacentersServersCdromsFindByIdExecute(r ApiDatacentersServersCdromsFindByIdRequest) (Image, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Image ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersCdromsFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"cdromId"+"}", _neturl.PathEscape(parameterToString(r.cdromId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersCdromsFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersCdromsGetRequest struct { ctx _context.Context ApiService *ServersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersServersCdromsGetRequest) Pretty(pretty bool) ApiDatacentersServersCdromsGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersCdromsGetRequest) Depth(depth int32) ApiDatacentersServersCdromsGetRequest { r.depth = &depth return r } func (r ApiDatacentersServersCdromsGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersCdromsGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersCdromsGetRequest) Offset(offset int32) ApiDatacentersServersCdromsGetRequest { r.offset = &offset return r } func (r ApiDatacentersServersCdromsGetRequest) Limit(limit int32) ApiDatacentersServersCdromsGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersCdromsGetRequest) Filter(key string, value string) ApiDatacentersServersCdromsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersServersCdromsGetRequest) OrderBy(orderBy string) ApiDatacentersServersCdromsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersServersCdromsGetRequest) MaxResults(maxResults int32) ApiDatacentersServersCdromsGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersServersCdromsGetRequest) Execute() (Cdroms, *APIResponse, error) { return r.ApiService.DatacentersServersCdromsGetExecute(r) } /* * DatacentersServersCdromsGet Get Attached CD-ROMs * Lists all CD-ROMs attached to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersCdromsGetRequest */ func (a *ServersApiService) DatacentersServersCdromsGet(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersCdromsGetRequest { return ApiDatacentersServersCdromsGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Cdroms */ func (a *ServersApiService) DatacentersServersCdromsGetExecute(r ApiDatacentersServersCdromsGetRequest) (Cdroms, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Cdroms ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersCdromsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/cdroms" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersCdromsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersCdromsPostRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string cdrom *Image pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersCdromsPostRequest) Cdrom(cdrom Image) ApiDatacentersServersCdromsPostRequest { r.cdrom = &cdrom return r } func (r ApiDatacentersServersCdromsPostRequest) Pretty(pretty bool) ApiDatacentersServersCdromsPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersCdromsPostRequest) Depth(depth int32) ApiDatacentersServersCdromsPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersCdromsPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersCdromsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersCdromsPostRequest) Execute() (Image, *APIResponse, error) { return r.ApiService.DatacentersServersCdromsPostExecute(r) } /* - DatacentersServersCdromsPost Attach a CD-ROM - Attachs a CD-ROM to an existing server specified by its ID. CD-ROMs cannot be created stand-alone like volumes. They are either attached to a server or do not exist. They always have an ISO-Image associated; empty CD-ROMs can not be provisioned. It is possible to attach up to two CD-ROMs to the same server. Note that attaching a CD-ROM leads to a reset of the server. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. - @return ApiDatacentersServersCdromsPostRequest */ func (a *ServersApiService) DatacentersServersCdromsPost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersCdromsPostRequest { return ApiDatacentersServersCdromsPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request * @return Image */ func (a *ServersApiService) DatacentersServersCdromsPostExecute(r ApiDatacentersServersCdromsPostRequest) (Image, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Image ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersCdromsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/cdroms" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.cdrom == nil { return localVarReturnValue, nil, reportError("cdrom is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.cdrom if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersCdromsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersDeleteRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 deleteVolumes *bool } func (r ApiDatacentersServersDeleteRequest) Pretty(pretty bool) ApiDatacentersServersDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersDeleteRequest) Depth(depth int32) ApiDatacentersServersDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersServersDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersDeleteRequest) DeleteVolumes(deleteVolumes bool) ApiDatacentersServersDeleteRequest { r.deleteVolumes = &deleteVolumes return r } func (r ApiDatacentersServersDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersDeleteExecute(r) } /* * DatacentersServersDelete Delete servers * Delete the specified server in your data center. The attached storage volumes will also be removed if the query parameter is set to true otherwise a separate API call must be made for these actions. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersDeleteRequest */ func (a *ServersApiService) DatacentersServersDelete(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersDeleteRequest { return ApiDatacentersServersDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request */ func (a *ServersApiService) DatacentersServersDeleteExecute(r ApiDatacentersServersDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.deleteVolumes != nil { localVarQueryParams.Add("deleteVolumes", parameterToString(*r.deleteVolumes, "")) } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersFindByIdRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersFindByIdRequest) Pretty(pretty bool) ApiDatacentersServersFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersFindByIdRequest) Depth(depth int32) ApiDatacentersServersFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersServersFindByIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersFindByIdRequest) Execute() (Server, *APIResponse, error) { return r.ApiService.DatacentersServersFindByIdExecute(r) } /* * DatacentersServersFindById Retrieve servers by ID * Retrieve information about the specified server within the data center, such as its configuration, provisioning status, and so on. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersFindByIdRequest */ func (a *ServersApiService) DatacentersServersFindById(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersFindByIdRequest { return ApiDatacentersServersFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request * @return Server */ func (a *ServersApiService) DatacentersServersFindByIdExecute(r ApiDatacentersServersFindByIdRequest) (Server, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Server ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersGetRequest struct { ctx _context.Context ApiService *ServersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersServersGetRequest) Pretty(pretty bool) ApiDatacentersServersGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersGetRequest) Depth(depth int32) ApiDatacentersServersGetRequest { r.depth = &depth return r } func (r ApiDatacentersServersGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersGetRequest) Offset(offset int32) ApiDatacentersServersGetRequest { r.offset = &offset return r } func (r ApiDatacentersServersGetRequest) Limit(limit int32) ApiDatacentersServersGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersGetRequest) Filter(key string, value string) ApiDatacentersServersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersServersGetRequest) OrderBy(orderBy string) ApiDatacentersServersGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersServersGetRequest) MaxResults(maxResults int32) ApiDatacentersServersGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersServersGetRequest) Execute() (Servers, *APIResponse, error) { return r.ApiService.DatacentersServersGetExecute(r) } /* * DatacentersServersGet List servers * List all servers within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersServersGetRequest */ func (a *ServersApiService) DatacentersServersGet(ctx _context.Context, datacenterId string) ApiDatacentersServersGetRequest { return ApiDatacentersServersGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Servers */ func (a *ServersApiService) DatacentersServersGetExecute(r ApiDatacentersServersGetRequest) (Servers, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Servers ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersPatchRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string server *ServerProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersPatchRequest) Server(server ServerProperties) ApiDatacentersServersPatchRequest { r.server = &server return r } func (r ApiDatacentersServersPatchRequest) Pretty(pretty bool) ApiDatacentersServersPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersPatchRequest) Depth(depth int32) ApiDatacentersServersPatchRequest { r.depth = &depth return r } func (r ApiDatacentersServersPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersPatchRequest) Execute() (Server, *APIResponse, error) { return r.ApiService.DatacentersServersPatchExecute(r) } /* * DatacentersServersPatch Partially modify servers * Update the properties of the specified server within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersPatchRequest */ func (a *ServersApiService) DatacentersServersPatch(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersPatchRequest { return ApiDatacentersServersPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request * @return Server */ func (a *ServersApiService) DatacentersServersPatchExecute(r ApiDatacentersServersPatchRequest) (Server, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Server ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.server == nil { return localVarReturnValue, nil, reportError("server is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.server if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersPostRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string server *Server pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersPostRequest) Server(server Server) ApiDatacentersServersPostRequest { r.server = &server return r } func (r ApiDatacentersServersPostRequest) Pretty(pretty bool) ApiDatacentersServersPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersPostRequest) Depth(depth int32) ApiDatacentersServersPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersPostRequest) Execute() (Server, *APIResponse, error) { return r.ApiService.DatacentersServersPostExecute(r) } /* * DatacentersServersPost Create a Server * Creates a server within the specified data center. You can also use this request to configure the boot volumes and connect to existing LANs at the same time. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersServersPostRequest */ func (a *ServersApiService) DatacentersServersPost(ctx _context.Context, datacenterId string) ApiDatacentersServersPostRequest { return ApiDatacentersServersPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return Server */ func (a *ServersApiService) DatacentersServersPostExecute(r ApiDatacentersServersPostRequest) (Server, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Server ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.server == nil { return localVarReturnValue, nil, reportError("server is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.server if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersPutRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string server *Server pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersPutRequest) Server(server Server) ApiDatacentersServersPutRequest { r.server = &server return r } func (r ApiDatacentersServersPutRequest) Pretty(pretty bool) ApiDatacentersServersPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersPutRequest) Depth(depth int32) ApiDatacentersServersPutRequest { r.depth = &depth return r } func (r ApiDatacentersServersPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersPutRequest) Execute() (Server, *APIResponse, error) { return r.ApiService.DatacentersServersPutExecute(r) } /* - DatacentersServersPut Modify a Server by ID - Modifies the properties of the specified server within the data center. Starting with v5, the 'allowReboot' attribute is retired; while previously required for changing certain server properties, this behavior is now implicit, and the backend will perform this automatically. For example, in earlier versions, when the CPU family is changed, 'allowReboot' had to be set to 'true'; this is no longer required, the reboot will be performed automatically. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. - @return ApiDatacentersServersPutRequest */ func (a *ServersApiService) DatacentersServersPut(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersPutRequest { return ApiDatacentersServersPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request * @return Server */ func (a *ServersApiService) DatacentersServersPutExecute(r ApiDatacentersServersPutRequest) (Server, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Server ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.server == nil { return localVarReturnValue, nil, reportError("server is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.server if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersRebootPostRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersRebootPostRequest) Pretty(pretty bool) ApiDatacentersServersRebootPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersRebootPostRequest) Depth(depth int32) ApiDatacentersServersRebootPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersRebootPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersRebootPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersRebootPostRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersRebootPostExecute(r) } /* * DatacentersServersRebootPost Reboot servers * Force a hard reboot of the specified server within the data center. Don't use this method if you wish to reboot gracefully. This is an equivalent of powering down a computer and turning it back on. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersRebootPostRequest */ func (a *ServersApiService) DatacentersServersRebootPost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersRebootPostRequest { return ApiDatacentersServersRebootPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request */ func (a *ServersApiService) DatacentersServersRebootPostExecute(r ApiDatacentersServersRebootPostRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersRebootPost") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/reboot" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersRebootPost", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersRemoteConsoleGetRequest struct { ctx _context.Context ApiService *ServersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersRemoteConsoleGetRequest) Pretty(pretty bool) ApiDatacentersServersRemoteConsoleGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersRemoteConsoleGetRequest) Depth(depth int32) ApiDatacentersServersRemoteConsoleGetRequest { r.depth = &depth return r } func (r ApiDatacentersServersRemoteConsoleGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersRemoteConsoleGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersRemoteConsoleGetRequest) Filter(key string, value string) ApiDatacentersServersRemoteConsoleGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersServersRemoteConsoleGetRequest) OrderBy(orderBy string) ApiDatacentersServersRemoteConsoleGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersServersRemoteConsoleGetRequest) MaxResults(maxResults int32) ApiDatacentersServersRemoteConsoleGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersServersRemoteConsoleGetRequest) Execute() (RemoteConsoleUrl, *APIResponse, error) { return r.ApiService.DatacentersServersRemoteConsoleGetExecute(r) } /* * DatacentersServersRemoteConsoleGet Get Remote Console link * Retrieve a link with a JSON Web Token for accessing the server's Remote Console. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersRemoteConsoleGetRequest */ func (a *ServersApiService) DatacentersServersRemoteConsoleGet(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersRemoteConsoleGetRequest { return ApiDatacentersServersRemoteConsoleGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return RemoteConsoleUrl */ func (a *ServersApiService) DatacentersServersRemoteConsoleGetExecute(r ApiDatacentersServersRemoteConsoleGetRequest) (RemoteConsoleUrl, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue RemoteConsoleUrl ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersRemoteConsoleGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/remoteconsole" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersRemoteConsoleGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersResumePostRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersResumePostRequest) Pretty(pretty bool) ApiDatacentersServersResumePostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersResumePostRequest) Depth(depth int32) ApiDatacentersServersResumePostRequest { r.depth = &depth return r } func (r ApiDatacentersServersResumePostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersResumePostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersResumePostRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersResumePostExecute(r) } /* - DatacentersServersResumePost Resume a Cube Server by ID - Resumes a suspended Cube Server specified by its ID. Since the suspended instance was not deleted the allocated resources continue to be billed. You can perform this operation only for Cube Servers. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. - @return ApiDatacentersServersResumePostRequest */ func (a *ServersApiService) DatacentersServersResumePost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersResumePostRequest { return ApiDatacentersServersResumePostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request */ func (a *ServersApiService) DatacentersServersResumePostExecute(r ApiDatacentersServersResumePostRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersResumePost") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/resume" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersResumePost", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersStartPostRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersStartPostRequest) Pretty(pretty bool) ApiDatacentersServersStartPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersStartPostRequest) Depth(depth int32) ApiDatacentersServersStartPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersStartPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersStartPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersStartPostRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersStartPostExecute(r) } /* - DatacentersServersStartPost Start an Enterprise Server by ID - Starts the Enterprise Server specified by its ID. >Note that you cannot use this method to start a Cube Server. By starting the Enterprise Server, cores and RAM are provisioned, and the billing continues. If the server's public IPv4 address has been deallocated, a new IPv4 address will be assigned. IPv6 blocks and addresses will remain unchanged when stopping and starting a server. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. - @return ApiDatacentersServersStartPostRequest */ func (a *ServersApiService) DatacentersServersStartPost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersStartPostRequest { return ApiDatacentersServersStartPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request */ func (a *ServersApiService) DatacentersServersStartPostExecute(r ApiDatacentersServersStartPostRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersStartPost") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/start" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersStartPost", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersStopPostRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersStopPostRequest) Pretty(pretty bool) ApiDatacentersServersStopPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersStopPostRequest) Depth(depth int32) ApiDatacentersServersStopPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersStopPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersStopPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersStopPostRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersStopPostExecute(r) } /* - DatacentersServersStopPost Stop an Enterprise Server by ID - Stops the Enterprise Server specified by its ID. >Note that you cannot use this method to stop a Cube Server. By stopping the Enterprise Server, cores and RAM are freed and no longer charged. Public IPv4 IPs that are not reserved are returned to the IPv4 pool. IPv6 blocks and addresses will remain unchanged when stopping and starting a server. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. - @return ApiDatacentersServersStopPostRequest */ func (a *ServersApiService) DatacentersServersStopPost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersStopPostRequest { return ApiDatacentersServersStopPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request */ func (a *ServersApiService) DatacentersServersStopPostExecute(r ApiDatacentersServersStopPostRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersStopPost") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/stop" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersStopPost", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersSuspendPostRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersSuspendPostRequest) Pretty(pretty bool) ApiDatacentersServersSuspendPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersSuspendPostRequest) Depth(depth int32) ApiDatacentersServersSuspendPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersSuspendPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersSuspendPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersSuspendPostRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersSuspendPostExecute(r) } /* - DatacentersServersSuspendPost Suspend a Cube Server by ID - Suspends the specified Cubes instance within the data center. The instance is not deleted and allocated resources continue to be billed. You can perform this operation only for Cube Servers. To check the status of the request, you can use the 'Location' HTTP header in the response (see 'Requests' for more information). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. - @return ApiDatacentersServersSuspendPostRequest */ func (a *ServersApiService) DatacentersServersSuspendPost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersSuspendPostRequest { return ApiDatacentersServersSuspendPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request */ func (a *ServersApiService) DatacentersServersSuspendPostExecute(r ApiDatacentersServersSuspendPostRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersSuspendPost") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/suspend" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersSuspendPost", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersTokenGetRequest struct { ctx _context.Context ApiService *ServersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersTokenGetRequest) Pretty(pretty bool) ApiDatacentersServersTokenGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersTokenGetRequest) Depth(depth int32) ApiDatacentersServersTokenGetRequest { r.depth = &depth return r } func (r ApiDatacentersServersTokenGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersTokenGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersTokenGetRequest) Filter(key string, value string) ApiDatacentersServersTokenGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersServersTokenGetRequest) OrderBy(orderBy string) ApiDatacentersServersTokenGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersServersTokenGetRequest) MaxResults(maxResults int32) ApiDatacentersServersTokenGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersServersTokenGetRequest) Execute() (Token, *APIResponse, error) { return r.ApiService.DatacentersServersTokenGetExecute(r) } /* * DatacentersServersTokenGet Get JSON Web Token * Retrieve a JSON Web Token from the server for use in login operations (such as accessing the server's console). * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersTokenGetRequest */ func (a *ServersApiService) DatacentersServersTokenGet(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersTokenGetRequest { return ApiDatacentersServersTokenGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Token */ func (a *ServersApiService) DatacentersServersTokenGetExecute(r ApiDatacentersServersTokenGetRequest) (Token, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Token ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersTokenGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/token" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersTokenGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersUpgradePostRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersUpgradePostRequest) Pretty(pretty bool) ApiDatacentersServersUpgradePostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersUpgradePostRequest) Depth(depth int32) ApiDatacentersServersUpgradePostRequest { r.depth = &depth return r } func (r ApiDatacentersServersUpgradePostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersUpgradePostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersUpgradePostRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersUpgradePostExecute(r) } /* * DatacentersServersUpgradePost Upgrade a Server by ID * Upgrades the server version. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersUpgradePostRequest */ func (a *ServersApiService) DatacentersServersUpgradePost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersUpgradePostRequest { return ApiDatacentersServersUpgradePostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request */ func (a *ServersApiService) DatacentersServersUpgradePostExecute(r ApiDatacentersServersUpgradePostRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersUpgradePost") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/upgrade" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersUpgradePost", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersVolumesDeleteRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string volumeId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersVolumesDeleteRequest) Pretty(pretty bool) ApiDatacentersServersVolumesDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersVolumesDeleteRequest) Depth(depth int32) ApiDatacentersServersVolumesDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersServersVolumesDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersVolumesDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersVolumesDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersServersVolumesDeleteExecute(r) } /* - DatacentersServersVolumesDelete Detach a Volume by ID - Detachs the specified volume from the server. Note that only the volume's connection to the specified server is disconnected. If you want to delete the volume, you must submit a separate request to perform the deletion. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. - @param volumeId The unique ID of the volume. - @return ApiDatacentersServersVolumesDeleteRequest */ func (a *ServersApiService) DatacentersServersVolumesDelete(ctx _context.Context, datacenterId string, serverId string, volumeId string) ApiDatacentersServersVolumesDeleteRequest { return ApiDatacentersServersVolumesDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, volumeId: volumeId, } } /* * Execute executes the request */ func (a *ServersApiService) DatacentersServersVolumesDeleteExecute(r ApiDatacentersServersVolumesDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersVolumesDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersVolumesDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersServersVolumesFindByIdRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string volumeId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersVolumesFindByIdRequest) Pretty(pretty bool) ApiDatacentersServersVolumesFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersVolumesFindByIdRequest) Depth(depth int32) ApiDatacentersServersVolumesFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersServersVolumesFindByIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersVolumesFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersVolumesFindByIdRequest) Execute() (Volume, *APIResponse, error) { return r.ApiService.DatacentersServersVolumesFindByIdExecute(r) } /* * DatacentersServersVolumesFindById Get Attached Volume by ID * Retrieves the properties of the volume attached to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @param volumeId The unique ID of the volume. * @return ApiDatacentersServersVolumesFindByIdRequest */ func (a *ServersApiService) DatacentersServersVolumesFindById(ctx _context.Context, datacenterId string, serverId string, volumeId string) ApiDatacentersServersVolumesFindByIdRequest { return ApiDatacentersServersVolumesFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, volumeId: volumeId, } } /* * Execute executes the request * @return Volume */ func (a *ServersApiService) DatacentersServersVolumesFindByIdExecute(r ApiDatacentersServersVolumesFindByIdRequest) (Volume, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Volume ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersVolumesFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersVolumesFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersVolumesGetRequest struct { ctx _context.Context ApiService *ServersApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string serverId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersServersVolumesGetRequest) Pretty(pretty bool) ApiDatacentersServersVolumesGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersVolumesGetRequest) Depth(depth int32) ApiDatacentersServersVolumesGetRequest { r.depth = &depth return r } func (r ApiDatacentersServersVolumesGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersVolumesGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersVolumesGetRequest) Offset(offset int32) ApiDatacentersServersVolumesGetRequest { r.offset = &offset return r } func (r ApiDatacentersServersVolumesGetRequest) Limit(limit int32) ApiDatacentersServersVolumesGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersServersVolumesGetRequest) Filter(key string, value string) ApiDatacentersServersVolumesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersServersVolumesGetRequest) OrderBy(orderBy string) ApiDatacentersServersVolumesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersServersVolumesGetRequest) MaxResults(maxResults int32) ApiDatacentersServersVolumesGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersServersVolumesGetRequest) Execute() (AttachedVolumes, *APIResponse, error) { return r.ApiService.DatacentersServersVolumesGetExecute(r) } /* * DatacentersServersVolumesGet Get Attached Volumes * Lists all volumes attached to the specified server. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param serverId The unique ID of the server. * @return ApiDatacentersServersVolumesGetRequest */ func (a *ServersApiService) DatacentersServersVolumesGet(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersVolumesGetRequest { return ApiDatacentersServersVolumesGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return AttachedVolumes */ func (a *ServersApiService) DatacentersServersVolumesGetExecute(r ApiDatacentersServersVolumesGetRequest) (AttachedVolumes, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue AttachedVolumes ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersVolumesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/volumes" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersVolumesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersServersVolumesPostRequest struct { ctx _context.Context ApiService *ServersApiService datacenterId string serverId string volume *Volume pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersServersVolumesPostRequest) Volume(volume Volume) ApiDatacentersServersVolumesPostRequest { r.volume = &volume return r } func (r ApiDatacentersServersVolumesPostRequest) Pretty(pretty bool) ApiDatacentersServersVolumesPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersServersVolumesPostRequest) Depth(depth int32) ApiDatacentersServersVolumesPostRequest { r.depth = &depth return r } func (r ApiDatacentersServersVolumesPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersServersVolumesPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersServersVolumesPostRequest) Execute() (Volume, *APIResponse, error) { return r.ApiService.DatacentersServersVolumesPostExecute(r) } /* - DatacentersServersVolumesPost Attach a Volume to a Server - Attachs an existing storage volume to the specified server. You can attach an existing volume in the VDC to a server. To move a volume from one server to another, you must first detach the volume from the first server and attach it to the second server. It is also possible to create and attach a volume in one step by simply providing a new volume description as a payload. The only difference is the URL; see 'Creating a Volume' for details about volumes. Note that the combined total of attached volumes and NICs cannot exceed 24 per server. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param datacenterId The unique ID of the data center. - @param serverId The unique ID of the server. - @return ApiDatacentersServersVolumesPostRequest */ func (a *ServersApiService) DatacentersServersVolumesPost(ctx _context.Context, datacenterId string, serverId string) ApiDatacentersServersVolumesPostRequest { return ApiDatacentersServersVolumesPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, serverId: serverId, } } /* * Execute executes the request * @return Volume */ func (a *ServersApiService) DatacentersServersVolumesPostExecute(r ApiDatacentersServersVolumesPostRequest) (Volume, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Volume ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServersApiService.DatacentersServersVolumesPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/servers/{serverId}/volumes" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", _neturl.PathEscape(parameterToString(r.serverId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.volume == nil { return localVarReturnValue, nil, reportError("volume is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.volume if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersServersVolumesPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_snapshots.go000066400000000000000000000726421465267054300231120ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // SnapshotsApiService SnapshotsApi service type SnapshotsApiService service type ApiSnapshotsDeleteRequest struct { ctx _context.Context ApiService *SnapshotsApiService snapshotId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiSnapshotsDeleteRequest) Pretty(pretty bool) ApiSnapshotsDeleteRequest { r.pretty = &pretty return r } func (r ApiSnapshotsDeleteRequest) Depth(depth int32) ApiSnapshotsDeleteRequest { r.depth = &depth return r } func (r ApiSnapshotsDeleteRequest) XContractNumber(xContractNumber int32) ApiSnapshotsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiSnapshotsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.SnapshotsDeleteExecute(r) } /* * SnapshotsDelete Delete snapshots * Deletes the specified snapshot. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @return ApiSnapshotsDeleteRequest */ func (a *SnapshotsApiService) SnapshotsDelete(ctx _context.Context, snapshotId string) ApiSnapshotsDeleteRequest { return ApiSnapshotsDeleteRequest{ ApiService: a, ctx: ctx, snapshotId: snapshotId, } } /* * Execute executes the request */ func (a *SnapshotsApiService) SnapshotsDeleteExecute(r ApiSnapshotsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnapshotsApiService.SnapshotsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/snapshots/{snapshotId}" localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "SnapshotsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiSnapshotsFindByIdRequest struct { ctx _context.Context ApiService *SnapshotsApiService snapshotId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiSnapshotsFindByIdRequest) Pretty(pretty bool) ApiSnapshotsFindByIdRequest { r.pretty = &pretty return r } func (r ApiSnapshotsFindByIdRequest) Depth(depth int32) ApiSnapshotsFindByIdRequest { r.depth = &depth return r } func (r ApiSnapshotsFindByIdRequest) XContractNumber(xContractNumber int32) ApiSnapshotsFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiSnapshotsFindByIdRequest) Execute() (Snapshot, *APIResponse, error) { return r.ApiService.SnapshotsFindByIdExecute(r) } /* * SnapshotsFindById Retrieve snapshots by ID * Retrieve the properties of the specified snapshot. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @return ApiSnapshotsFindByIdRequest */ func (a *SnapshotsApiService) SnapshotsFindById(ctx _context.Context, snapshotId string) ApiSnapshotsFindByIdRequest { return ApiSnapshotsFindByIdRequest{ ApiService: a, ctx: ctx, snapshotId: snapshotId, } } /* * Execute executes the request * @return Snapshot */ func (a *SnapshotsApiService) SnapshotsFindByIdExecute(r ApiSnapshotsFindByIdRequest) (Snapshot, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Snapshot ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnapshotsApiService.SnapshotsFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/snapshots/{snapshotId}" localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "SnapshotsFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiSnapshotsGetRequest struct { ctx _context.Context ApiService *SnapshotsApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiSnapshotsGetRequest) Pretty(pretty bool) ApiSnapshotsGetRequest { r.pretty = &pretty return r } func (r ApiSnapshotsGetRequest) Depth(depth int32) ApiSnapshotsGetRequest { r.depth = &depth return r } func (r ApiSnapshotsGetRequest) XContractNumber(xContractNumber int32) ApiSnapshotsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiSnapshotsGetRequest) Filter(key string, value string) ApiSnapshotsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiSnapshotsGetRequest) OrderBy(orderBy string) ApiSnapshotsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiSnapshotsGetRequest) MaxResults(maxResults int32) ApiSnapshotsGetRequest { r.maxResults = &maxResults return r } func (r ApiSnapshotsGetRequest) Execute() (Snapshots, *APIResponse, error) { return r.ApiService.SnapshotsGetExecute(r) } /* * SnapshotsGet List snapshots * List all available snapshots. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiSnapshotsGetRequest */ func (a *SnapshotsApiService) SnapshotsGet(ctx _context.Context) ApiSnapshotsGetRequest { return ApiSnapshotsGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Snapshots */ func (a *SnapshotsApiService) SnapshotsGetExecute(r ApiSnapshotsGetRequest) (Snapshots, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Snapshots ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnapshotsApiService.SnapshotsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/snapshots" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "SnapshotsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiSnapshotsPatchRequest struct { ctx _context.Context ApiService *SnapshotsApiService snapshotId string snapshot *SnapshotProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiSnapshotsPatchRequest) Snapshot(snapshot SnapshotProperties) ApiSnapshotsPatchRequest { r.snapshot = &snapshot return r } func (r ApiSnapshotsPatchRequest) Pretty(pretty bool) ApiSnapshotsPatchRequest { r.pretty = &pretty return r } func (r ApiSnapshotsPatchRequest) Depth(depth int32) ApiSnapshotsPatchRequest { r.depth = &depth return r } func (r ApiSnapshotsPatchRequest) XContractNumber(xContractNumber int32) ApiSnapshotsPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiSnapshotsPatchRequest) Execute() (Snapshot, *APIResponse, error) { return r.ApiService.SnapshotsPatchExecute(r) } /* * SnapshotsPatch Partially modify snapshots * Update the properties of the specified snapshot. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @return ApiSnapshotsPatchRequest */ func (a *SnapshotsApiService) SnapshotsPatch(ctx _context.Context, snapshotId string) ApiSnapshotsPatchRequest { return ApiSnapshotsPatchRequest{ ApiService: a, ctx: ctx, snapshotId: snapshotId, } } /* * Execute executes the request * @return Snapshot */ func (a *SnapshotsApiService) SnapshotsPatchExecute(r ApiSnapshotsPatchRequest) (Snapshot, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Snapshot ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnapshotsApiService.SnapshotsPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/snapshots/{snapshotId}" localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.snapshot == nil { return localVarReturnValue, nil, reportError("snapshot is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.snapshot if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "SnapshotsPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiSnapshotsPutRequest struct { ctx _context.Context ApiService *SnapshotsApiService snapshotId string snapshot *Snapshot pretty *bool depth *int32 xContractNumber *int32 } func (r ApiSnapshotsPutRequest) Snapshot(snapshot Snapshot) ApiSnapshotsPutRequest { r.snapshot = &snapshot return r } func (r ApiSnapshotsPutRequest) Pretty(pretty bool) ApiSnapshotsPutRequest { r.pretty = &pretty return r } func (r ApiSnapshotsPutRequest) Depth(depth int32) ApiSnapshotsPutRequest { r.depth = &depth return r } func (r ApiSnapshotsPutRequest) XContractNumber(xContractNumber int32) ApiSnapshotsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiSnapshotsPutRequest) Execute() (Snapshot, *APIResponse, error) { return r.ApiService.SnapshotsPutExecute(r) } /* * SnapshotsPut Modify a Snapshot by ID * Modifies the properties of the specified snapshot. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param snapshotId The unique ID of the snapshot. * @return ApiSnapshotsPutRequest */ func (a *SnapshotsApiService) SnapshotsPut(ctx _context.Context, snapshotId string) ApiSnapshotsPutRequest { return ApiSnapshotsPutRequest{ ApiService: a, ctx: ctx, snapshotId: snapshotId, } } /* * Execute executes the request * @return Snapshot */ func (a *SnapshotsApiService) SnapshotsPutExecute(r ApiSnapshotsPutRequest) (Snapshot, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Snapshot ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnapshotsApiService.SnapshotsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/snapshots/{snapshotId}" localVarPath = strings.Replace(localVarPath, "{"+"snapshotId"+"}", _neturl.PathEscape(parameterToString(r.snapshotId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.snapshot == nil { return localVarReturnValue, nil, reportError("snapshot is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.snapshot if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "SnapshotsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_target_groups.go000066400000000000000000001122021465267054300237400ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // TargetGroupsApiService TargetGroupsApi service type TargetGroupsApiService service type ApiTargetGroupsDeleteRequest struct { ctx _context.Context ApiService *TargetGroupsApiService targetGroupId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiTargetGroupsDeleteRequest) Pretty(pretty bool) ApiTargetGroupsDeleteRequest { r.pretty = &pretty return r } func (r ApiTargetGroupsDeleteRequest) Depth(depth int32) ApiTargetGroupsDeleteRequest { r.depth = &depth return r } func (r ApiTargetGroupsDeleteRequest) XContractNumber(xContractNumber int32) ApiTargetGroupsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiTargetGroupsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.TargetGroupsDeleteExecute(r) } /* * TargetGroupsDelete Delete a Target Group by ID * Deletes the target group specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param targetGroupId The unique ID of the target group. * @return ApiTargetGroupsDeleteRequest */ func (a *TargetGroupsApiService) TargetGroupsDelete(ctx _context.Context, targetGroupId string) ApiTargetGroupsDeleteRequest { return ApiTargetGroupsDeleteRequest{ ApiService: a, ctx: ctx, targetGroupId: targetGroupId, } } /* * Execute executes the request */ func (a *TargetGroupsApiService) TargetGroupsDeleteExecute(r ApiTargetGroupsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetGroupsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/targetgroups/{targetGroupId}" localVarPath = strings.Replace(localVarPath, "{"+"targetGroupId"+"}", _neturl.PathEscape(parameterToString(r.targetGroupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "TargetGroupsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiTargetgroupsFindByTargetGroupIdRequest struct { ctx _context.Context ApiService *TargetGroupsApiService targetGroupId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiTargetgroupsFindByTargetGroupIdRequest) Pretty(pretty bool) ApiTargetgroupsFindByTargetGroupIdRequest { r.pretty = &pretty return r } func (r ApiTargetgroupsFindByTargetGroupIdRequest) Depth(depth int32) ApiTargetgroupsFindByTargetGroupIdRequest { r.depth = &depth return r } func (r ApiTargetgroupsFindByTargetGroupIdRequest) XContractNumber(xContractNumber int32) ApiTargetgroupsFindByTargetGroupIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiTargetgroupsFindByTargetGroupIdRequest) Execute() (TargetGroup, *APIResponse, error) { return r.ApiService.TargetgroupsFindByTargetGroupIdExecute(r) } /* * TargetgroupsFindByTargetGroupId Get a Target Group by ID * Retrieves the properties of the target group specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param targetGroupId The unique ID of the target group. * @return ApiTargetgroupsFindByTargetGroupIdRequest */ func (a *TargetGroupsApiService) TargetgroupsFindByTargetGroupId(ctx _context.Context, targetGroupId string) ApiTargetgroupsFindByTargetGroupIdRequest { return ApiTargetgroupsFindByTargetGroupIdRequest{ ApiService: a, ctx: ctx, targetGroupId: targetGroupId, } } /* * Execute executes the request * @return TargetGroup */ func (a *TargetGroupsApiService) TargetgroupsFindByTargetGroupIdExecute(r ApiTargetgroupsFindByTargetGroupIdRequest) (TargetGroup, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue TargetGroup ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetgroupsFindByTargetGroupId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/targetgroups/{targetGroupId}" localVarPath = strings.Replace(localVarPath, "{"+"targetGroupId"+"}", _neturl.PathEscape(parameterToString(r.targetGroupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "TargetgroupsFindByTargetGroupId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiTargetgroupsGetRequest struct { ctx _context.Context ApiService *TargetGroupsApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiTargetgroupsGetRequest) Pretty(pretty bool) ApiTargetgroupsGetRequest { r.pretty = &pretty return r } func (r ApiTargetgroupsGetRequest) Depth(depth int32) ApiTargetgroupsGetRequest { r.depth = &depth return r } func (r ApiTargetgroupsGetRequest) XContractNumber(xContractNumber int32) ApiTargetgroupsGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiTargetgroupsGetRequest) Offset(offset int32) ApiTargetgroupsGetRequest { r.offset = &offset return r } func (r ApiTargetgroupsGetRequest) Limit(limit int32) ApiTargetgroupsGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiTargetgroupsGetRequest) Filter(key string, value string) ApiTargetgroupsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiTargetgroupsGetRequest) OrderBy(orderBy string) ApiTargetgroupsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiTargetgroupsGetRequest) MaxResults(maxResults int32) ApiTargetgroupsGetRequest { r.maxResults = &maxResults return r } func (r ApiTargetgroupsGetRequest) Execute() (TargetGroups, *APIResponse, error) { return r.ApiService.TargetgroupsGetExecute(r) } /* - TargetgroupsGet Get Target Groups - Lists target groups. A target group is a set of one or more registered targets. You must specify an IP address, a port number, and a weight for each target. Any object with an IP address in your VDC can be a target, for example, a VM, another load balancer, etc. You can register a target with multiple target groups. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTargetgroupsGetRequest */ func (a *TargetGroupsApiService) TargetgroupsGet(ctx _context.Context) ApiTargetgroupsGetRequest { return ApiTargetgroupsGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return TargetGroups */ func (a *TargetGroupsApiService) TargetgroupsGetExecute(r ApiTargetgroupsGetRequest) (TargetGroups, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue TargetGroups ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetgroupsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/targetgroups" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(100, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "TargetgroupsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiTargetgroupsPatchRequest struct { ctx _context.Context ApiService *TargetGroupsApiService targetGroupId string targetGroupProperties *TargetGroupProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiTargetgroupsPatchRequest) TargetGroupProperties(targetGroupProperties TargetGroupProperties) ApiTargetgroupsPatchRequest { r.targetGroupProperties = &targetGroupProperties return r } func (r ApiTargetgroupsPatchRequest) Pretty(pretty bool) ApiTargetgroupsPatchRequest { r.pretty = &pretty return r } func (r ApiTargetgroupsPatchRequest) Depth(depth int32) ApiTargetgroupsPatchRequest { r.depth = &depth return r } func (r ApiTargetgroupsPatchRequest) XContractNumber(xContractNumber int32) ApiTargetgroupsPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiTargetgroupsPatchRequest) Execute() (TargetGroup, *APIResponse, error) { return r.ApiService.TargetgroupsPatchExecute(r) } /* * TargetgroupsPatch Partially Modify a Target Group by ID * Updates the properties of the target group specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param targetGroupId The unique ID of the target group. * @return ApiTargetgroupsPatchRequest */ func (a *TargetGroupsApiService) TargetgroupsPatch(ctx _context.Context, targetGroupId string) ApiTargetgroupsPatchRequest { return ApiTargetgroupsPatchRequest{ ApiService: a, ctx: ctx, targetGroupId: targetGroupId, } } /* * Execute executes the request * @return TargetGroup */ func (a *TargetGroupsApiService) TargetgroupsPatchExecute(r ApiTargetgroupsPatchRequest) (TargetGroup, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue TargetGroup ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetgroupsPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/targetgroups/{targetGroupId}" localVarPath = strings.Replace(localVarPath, "{"+"targetGroupId"+"}", _neturl.PathEscape(parameterToString(r.targetGroupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.targetGroupProperties == nil { return localVarReturnValue, nil, reportError("targetGroupProperties is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.targetGroupProperties if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "TargetgroupsPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiTargetgroupsPostRequest struct { ctx _context.Context ApiService *TargetGroupsApiService targetGroup *TargetGroup pretty *bool depth *int32 xContractNumber *int32 } func (r ApiTargetgroupsPostRequest) TargetGroup(targetGroup TargetGroup) ApiTargetgroupsPostRequest { r.targetGroup = &targetGroup return r } func (r ApiTargetgroupsPostRequest) Pretty(pretty bool) ApiTargetgroupsPostRequest { r.pretty = &pretty return r } func (r ApiTargetgroupsPostRequest) Depth(depth int32) ApiTargetgroupsPostRequest { r.depth = &depth return r } func (r ApiTargetgroupsPostRequest) XContractNumber(xContractNumber int32) ApiTargetgroupsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiTargetgroupsPostRequest) Execute() (TargetGroup, *APIResponse, error) { return r.ApiService.TargetgroupsPostExecute(r) } /* * TargetgroupsPost Create a Target Group * Creates a target group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiTargetgroupsPostRequest */ func (a *TargetGroupsApiService) TargetgroupsPost(ctx _context.Context) ApiTargetgroupsPostRequest { return ApiTargetgroupsPostRequest{ ApiService: a, ctx: ctx, } } /* * Execute executes the request * @return TargetGroup */ func (a *TargetGroupsApiService) TargetgroupsPostExecute(r ApiTargetgroupsPostRequest) (TargetGroup, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue TargetGroup ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetgroupsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/targetgroups" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.targetGroup == nil { return localVarReturnValue, nil, reportError("targetGroup is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.targetGroup if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "TargetgroupsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiTargetgroupsPutRequest struct { ctx _context.Context ApiService *TargetGroupsApiService targetGroupId string targetGroup *TargetGroupPut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiTargetgroupsPutRequest) TargetGroup(targetGroup TargetGroupPut) ApiTargetgroupsPutRequest { r.targetGroup = &targetGroup return r } func (r ApiTargetgroupsPutRequest) Pretty(pretty bool) ApiTargetgroupsPutRequest { r.pretty = &pretty return r } func (r ApiTargetgroupsPutRequest) Depth(depth int32) ApiTargetgroupsPutRequest { r.depth = &depth return r } func (r ApiTargetgroupsPutRequest) XContractNumber(xContractNumber int32) ApiTargetgroupsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiTargetgroupsPutRequest) Execute() (TargetGroup, *APIResponse, error) { return r.ApiService.TargetgroupsPutExecute(r) } /* * TargetgroupsPut Modify a Target Group by ID * Modifies the properties of the target group specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param targetGroupId The unique ID of the target group. * @return ApiTargetgroupsPutRequest */ func (a *TargetGroupsApiService) TargetgroupsPut(ctx _context.Context, targetGroupId string) ApiTargetgroupsPutRequest { return ApiTargetgroupsPutRequest{ ApiService: a, ctx: ctx, targetGroupId: targetGroupId, } } /* * Execute executes the request * @return TargetGroup */ func (a *TargetGroupsApiService) TargetgroupsPutExecute(r ApiTargetgroupsPutRequest) (TargetGroup, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue TargetGroup ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TargetGroupsApiService.TargetgroupsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/targetgroups/{targetGroupId}" localVarPath = strings.Replace(localVarPath, "{"+"targetGroupId"+"}", _neturl.PathEscape(parameterToString(r.targetGroupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.targetGroup == nil { return localVarReturnValue, nil, reportError("targetGroup is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.targetGroup if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "TargetgroupsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_templates.go000066400000000000000000000267211465267054300230630ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // TemplatesApiService TemplatesApi service type TemplatesApiService service type ApiTemplatesFindByIdRequest struct { ctx _context.Context ApiService *TemplatesApiService templateId string depth *int32 } func (r ApiTemplatesFindByIdRequest) Depth(depth int32) ApiTemplatesFindByIdRequest { r.depth = &depth return r } func (r ApiTemplatesFindByIdRequest) Execute() (Template, *APIResponse, error) { return r.ApiService.TemplatesFindByIdExecute(r) } /* * TemplatesFindById Get Cubes Template by ID * Retrieves the properties of the Cubes template specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param templateId The unique template ID. * @return ApiTemplatesFindByIdRequest */ func (a *TemplatesApiService) TemplatesFindById(ctx _context.Context, templateId string) ApiTemplatesFindByIdRequest { return ApiTemplatesFindByIdRequest{ ApiService: a, ctx: ctx, templateId: templateId, } } /* * Execute executes the request * @return Template */ func (a *TemplatesApiService) TemplatesFindByIdExecute(r ApiTemplatesFindByIdRequest) (Template, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Template ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplatesApiService.TemplatesFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/templates/{templateId}" localVarPath = strings.Replace(localVarPath, "{"+"templateId"+"}", _neturl.PathEscape(parameterToString(r.templateId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "TemplatesFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiTemplatesGetRequest struct { ctx _context.Context ApiService *TemplatesApiService filters _neturl.Values orderBy *string maxResults *int32 depth *int32 } func (r ApiTemplatesGetRequest) Depth(depth int32) ApiTemplatesGetRequest { r.depth = &depth return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiTemplatesGetRequest) Filter(key string, value string) ApiTemplatesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiTemplatesGetRequest) OrderBy(orderBy string) ApiTemplatesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiTemplatesGetRequest) MaxResults(maxResults int32) ApiTemplatesGetRequest { r.maxResults = &maxResults return r } func (r ApiTemplatesGetRequest) Execute() (Templates, *APIResponse, error) { return r.ApiService.TemplatesGetExecute(r) } /* - TemplatesGet Get Cubes Templates - Retrieves all available templates. Templates provide a pre-defined configuration for Cube servers. >Templates are read-only and cannot be created, modified, or deleted by users. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiTemplatesGetRequest */ func (a *TemplatesApiService) TemplatesGet(ctx _context.Context) ApiTemplatesGetRequest { return ApiTemplatesGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Templates */ func (a *TemplatesApiService) TemplatesGetExecute(r ApiTemplatesGetRequest) (Templates, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Templates ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TemplatesApiService.TemplatesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/templates" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "TemplatesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_user_management.go000066400000000000000000004427071465267054300242450ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // UserManagementApiService UserManagementApi service type UserManagementApiService service type ApiUmGroupsDeleteRequest struct { ctx _context.Context ApiService *UserManagementApiService groupId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsDeleteRequest) Pretty(pretty bool) ApiUmGroupsDeleteRequest { r.pretty = &pretty return r } func (r ApiUmGroupsDeleteRequest) Depth(depth int32) ApiUmGroupsDeleteRequest { r.depth = &depth return r } func (r ApiUmGroupsDeleteRequest) XContractNumber(xContractNumber int32) ApiUmGroupsDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmGroupsDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.UmGroupsDeleteExecute(r) } /* * UmGroupsDelete Delete groups * Remove the specified group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @return ApiUmGroupsDeleteRequest */ func (a *UserManagementApiService) UmGroupsDelete(ctx _context.Context, groupId string) ApiUmGroupsDeleteRequest { return ApiUmGroupsDeleteRequest{ ApiService: a, ctx: ctx, groupId: groupId, } } /* * Execute executes the request */ func (a *UserManagementApiService) UmGroupsDeleteExecute(r ApiUmGroupsDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiUmGroupsFindByIdRequest struct { ctx _context.Context ApiService *UserManagementApiService groupId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsFindByIdRequest) Pretty(pretty bool) ApiUmGroupsFindByIdRequest { r.pretty = &pretty return r } func (r ApiUmGroupsFindByIdRequest) Depth(depth int32) ApiUmGroupsFindByIdRequest { r.depth = &depth return r } func (r ApiUmGroupsFindByIdRequest) XContractNumber(xContractNumber int32) ApiUmGroupsFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmGroupsFindByIdRequest) Execute() (Group, *APIResponse, error) { return r.ApiService.UmGroupsFindByIdExecute(r) } /* * UmGroupsFindById Retrieve groups * Retrieve a group by the group ID. This value is in the response body when the group is created, and in the list of the groups, returned by GET. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @return ApiUmGroupsFindByIdRequest */ func (a *UserManagementApiService) UmGroupsFindById(ctx _context.Context, groupId string) ApiUmGroupsFindByIdRequest { return ApiUmGroupsFindByIdRequest{ ApiService: a, ctx: ctx, groupId: groupId, } } /* * Execute executes the request * @return Group */ func (a *UserManagementApiService) UmGroupsFindByIdExecute(r ApiUmGroupsFindByIdRequest) (Group, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Group ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmGroupsGetRequest struct { ctx _context.Context ApiService *UserManagementApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsGetRequest) Pretty(pretty bool) ApiUmGroupsGetRequest { r.pretty = &pretty return r } func (r ApiUmGroupsGetRequest) Depth(depth int32) ApiUmGroupsGetRequest { r.depth = &depth return r } func (r ApiUmGroupsGetRequest) XContractNumber(xContractNumber int32) ApiUmGroupsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmGroupsGetRequest) Filter(key string, value string) ApiUmGroupsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiUmGroupsGetRequest) OrderBy(orderBy string) ApiUmGroupsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiUmGroupsGetRequest) MaxResults(maxResults int32) ApiUmGroupsGetRequest { r.maxResults = &maxResults return r } func (r ApiUmGroupsGetRequest) Execute() (Groups, *APIResponse, error) { return r.ApiService.UmGroupsGetExecute(r) } /* * UmGroupsGet List all groups * List all the available user groups. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiUmGroupsGetRequest */ func (a *UserManagementApiService) UmGroupsGet(ctx _context.Context) ApiUmGroupsGetRequest { return ApiUmGroupsGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Groups */ func (a *UserManagementApiService) UmGroupsGetExecute(r ApiUmGroupsGetRequest) (Groups, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Groups ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmGroupsPostRequest struct { ctx _context.Context ApiService *UserManagementApiService group *Group pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsPostRequest) Group(group Group) ApiUmGroupsPostRequest { r.group = &group return r } func (r ApiUmGroupsPostRequest) Pretty(pretty bool) ApiUmGroupsPostRequest { r.pretty = &pretty return r } func (r ApiUmGroupsPostRequest) Depth(depth int32) ApiUmGroupsPostRequest { r.depth = &depth return r } func (r ApiUmGroupsPostRequest) XContractNumber(xContractNumber int32) ApiUmGroupsPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmGroupsPostRequest) Execute() (Group, *APIResponse, error) { return r.ApiService.UmGroupsPostExecute(r) } /* * UmGroupsPost Create groups * Create a group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiUmGroupsPostRequest */ func (a *UserManagementApiService) UmGroupsPost(ctx _context.Context) ApiUmGroupsPostRequest { return ApiUmGroupsPostRequest{ ApiService: a, ctx: ctx, } } /* * Execute executes the request * @return Group */ func (a *UserManagementApiService) UmGroupsPostExecute(r ApiUmGroupsPostRequest) (Group, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Group ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.group == nil { return localVarReturnValue, nil, reportError("group is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.group if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmGroupsPutRequest struct { ctx _context.Context ApiService *UserManagementApiService groupId string group *Group pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsPutRequest) Group(group Group) ApiUmGroupsPutRequest { r.group = &group return r } func (r ApiUmGroupsPutRequest) Pretty(pretty bool) ApiUmGroupsPutRequest { r.pretty = &pretty return r } func (r ApiUmGroupsPutRequest) Depth(depth int32) ApiUmGroupsPutRequest { r.depth = &depth return r } func (r ApiUmGroupsPutRequest) XContractNumber(xContractNumber int32) ApiUmGroupsPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmGroupsPutRequest) Execute() (Group, *APIResponse, error) { return r.ApiService.UmGroupsPutExecute(r) } /* * UmGroupsPut Modify groups * Modify the properties of the specified group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @return ApiUmGroupsPutRequest */ func (a *UserManagementApiService) UmGroupsPut(ctx _context.Context, groupId string) ApiUmGroupsPutRequest { return ApiUmGroupsPutRequest{ ApiService: a, ctx: ctx, groupId: groupId, } } /* * Execute executes the request * @return Group */ func (a *UserManagementApiService) UmGroupsPutExecute(r ApiUmGroupsPutRequest) (Group, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Group ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.group == nil { return localVarReturnValue, nil, reportError("group is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.group if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmGroupsResourcesGetRequest struct { ctx _context.Context ApiService *UserManagementApiService filters _neturl.Values orderBy *string maxResults *int32 groupId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsResourcesGetRequest) Pretty(pretty bool) ApiUmGroupsResourcesGetRequest { r.pretty = &pretty return r } func (r ApiUmGroupsResourcesGetRequest) Depth(depth int32) ApiUmGroupsResourcesGetRequest { r.depth = &depth return r } func (r ApiUmGroupsResourcesGetRequest) XContractNumber(xContractNumber int32) ApiUmGroupsResourcesGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmGroupsResourcesGetRequest) Filter(key string, value string) ApiUmGroupsResourcesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiUmGroupsResourcesGetRequest) OrderBy(orderBy string) ApiUmGroupsResourcesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiUmGroupsResourcesGetRequest) MaxResults(maxResults int32) ApiUmGroupsResourcesGetRequest { r.maxResults = &maxResults return r } func (r ApiUmGroupsResourcesGetRequest) Execute() (ResourceGroups, *APIResponse, error) { return r.ApiService.UmGroupsResourcesGetExecute(r) } /* * UmGroupsResourcesGet Retrieve group resources * List the resources assigned to the group, by group ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @return ApiUmGroupsResourcesGetRequest */ func (a *UserManagementApiService) UmGroupsResourcesGet(ctx _context.Context, groupId string) ApiUmGroupsResourcesGetRequest { return ApiUmGroupsResourcesGetRequest{ ApiService: a, ctx: ctx, groupId: groupId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return ResourceGroups */ func (a *UserManagementApiService) UmGroupsResourcesGetExecute(r ApiUmGroupsResourcesGetRequest) (ResourceGroups, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ResourceGroups ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsResourcesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}/resources" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsResourcesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmGroupsSharesDeleteRequest struct { ctx _context.Context ApiService *UserManagementApiService groupId string resourceId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsSharesDeleteRequest) Pretty(pretty bool) ApiUmGroupsSharesDeleteRequest { r.pretty = &pretty return r } func (r ApiUmGroupsSharesDeleteRequest) Depth(depth int32) ApiUmGroupsSharesDeleteRequest { r.depth = &depth return r } func (r ApiUmGroupsSharesDeleteRequest) XContractNumber(xContractNumber int32) ApiUmGroupsSharesDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmGroupsSharesDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.UmGroupsSharesDeleteExecute(r) } /* * UmGroupsSharesDelete Remove group shares * Remove the specified share from the group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @param resourceId The unique ID of the resource. * @return ApiUmGroupsSharesDeleteRequest */ func (a *UserManagementApiService) UmGroupsSharesDelete(ctx _context.Context, groupId string, resourceId string) ApiUmGroupsSharesDeleteRequest { return ApiUmGroupsSharesDeleteRequest{ ApiService: a, ctx: ctx, groupId: groupId, resourceId: resourceId, } } /* * Execute executes the request */ func (a *UserManagementApiService) UmGroupsSharesDeleteExecute(r ApiUmGroupsSharesDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsSharesDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}/shares/{resourceId}" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"resourceId"+"}", _neturl.PathEscape(parameterToString(r.resourceId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsSharesDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiUmGroupsSharesFindByResourceIdRequest struct { ctx _context.Context ApiService *UserManagementApiService groupId string resourceId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsSharesFindByResourceIdRequest) Pretty(pretty bool) ApiUmGroupsSharesFindByResourceIdRequest { r.pretty = &pretty return r } func (r ApiUmGroupsSharesFindByResourceIdRequest) Depth(depth int32) ApiUmGroupsSharesFindByResourceIdRequest { r.depth = &depth return r } func (r ApiUmGroupsSharesFindByResourceIdRequest) XContractNumber(xContractNumber int32) ApiUmGroupsSharesFindByResourceIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmGroupsSharesFindByResourceIdRequest) Execute() (GroupShare, *APIResponse, error) { return r.ApiService.UmGroupsSharesFindByResourceIdExecute(r) } /* * UmGroupsSharesFindByResourceId Retrieve group shares * Retrieve the properties of the specified group share. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @param resourceId The unique ID of the resource. * @return ApiUmGroupsSharesFindByResourceIdRequest */ func (a *UserManagementApiService) UmGroupsSharesFindByResourceId(ctx _context.Context, groupId string, resourceId string) ApiUmGroupsSharesFindByResourceIdRequest { return ApiUmGroupsSharesFindByResourceIdRequest{ ApiService: a, ctx: ctx, groupId: groupId, resourceId: resourceId, } } /* * Execute executes the request * @return GroupShare */ func (a *UserManagementApiService) UmGroupsSharesFindByResourceIdExecute(r ApiUmGroupsSharesFindByResourceIdRequest) (GroupShare, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue GroupShare ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsSharesFindByResourceId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}/shares/{resourceId}" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"resourceId"+"}", _neturl.PathEscape(parameterToString(r.resourceId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsSharesFindByResourceId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmGroupsSharesGetRequest struct { ctx _context.Context ApiService *UserManagementApiService filters _neturl.Values orderBy *string maxResults *int32 groupId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsSharesGetRequest) Pretty(pretty bool) ApiUmGroupsSharesGetRequest { r.pretty = &pretty return r } func (r ApiUmGroupsSharesGetRequest) Depth(depth int32) ApiUmGroupsSharesGetRequest { r.depth = &depth return r } func (r ApiUmGroupsSharesGetRequest) XContractNumber(xContractNumber int32) ApiUmGroupsSharesGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmGroupsSharesGetRequest) Filter(key string, value string) ApiUmGroupsSharesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiUmGroupsSharesGetRequest) OrderBy(orderBy string) ApiUmGroupsSharesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiUmGroupsSharesGetRequest) MaxResults(maxResults int32) ApiUmGroupsSharesGetRequest { r.maxResults = &maxResults return r } func (r ApiUmGroupsSharesGetRequest) Execute() (GroupShares, *APIResponse, error) { return r.ApiService.UmGroupsSharesGetExecute(r) } /* * UmGroupsSharesGet List group shares * List all shares and share privileges for the specified group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @return ApiUmGroupsSharesGetRequest */ func (a *UserManagementApiService) UmGroupsSharesGet(ctx _context.Context, groupId string) ApiUmGroupsSharesGetRequest { return ApiUmGroupsSharesGetRequest{ ApiService: a, ctx: ctx, groupId: groupId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return GroupShares */ func (a *UserManagementApiService) UmGroupsSharesGetExecute(r ApiUmGroupsSharesGetRequest) (GroupShares, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue GroupShares ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsSharesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}/shares" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsSharesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmGroupsSharesPostRequest struct { ctx _context.Context ApiService *UserManagementApiService groupId string resourceId string resource *GroupShare pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsSharesPostRequest) Resource(resource GroupShare) ApiUmGroupsSharesPostRequest { r.resource = &resource return r } func (r ApiUmGroupsSharesPostRequest) Pretty(pretty bool) ApiUmGroupsSharesPostRequest { r.pretty = &pretty return r } func (r ApiUmGroupsSharesPostRequest) Depth(depth int32) ApiUmGroupsSharesPostRequest { r.depth = &depth return r } func (r ApiUmGroupsSharesPostRequest) XContractNumber(xContractNumber int32) ApiUmGroupsSharesPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmGroupsSharesPostRequest) Execute() (GroupShare, *APIResponse, error) { return r.ApiService.UmGroupsSharesPostExecute(r) } /* * UmGroupsSharesPost Add group shares * Add the specified share to the group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @param resourceId The unique ID of the resource. * @return ApiUmGroupsSharesPostRequest */ func (a *UserManagementApiService) UmGroupsSharesPost(ctx _context.Context, groupId string, resourceId string) ApiUmGroupsSharesPostRequest { return ApiUmGroupsSharesPostRequest{ ApiService: a, ctx: ctx, groupId: groupId, resourceId: resourceId, } } /* * Execute executes the request * @return GroupShare */ func (a *UserManagementApiService) UmGroupsSharesPostExecute(r ApiUmGroupsSharesPostRequest) (GroupShare, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue GroupShare ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsSharesPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}/shares/{resourceId}" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"resourceId"+"}", _neturl.PathEscape(parameterToString(r.resourceId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.resource == nil { return localVarReturnValue, nil, reportError("resource is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.resource if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsSharesPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmGroupsSharesPutRequest struct { ctx _context.Context ApiService *UserManagementApiService groupId string resourceId string resource *GroupShare pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsSharesPutRequest) Resource(resource GroupShare) ApiUmGroupsSharesPutRequest { r.resource = &resource return r } func (r ApiUmGroupsSharesPutRequest) Pretty(pretty bool) ApiUmGroupsSharesPutRequest { r.pretty = &pretty return r } func (r ApiUmGroupsSharesPutRequest) Depth(depth int32) ApiUmGroupsSharesPutRequest { r.depth = &depth return r } func (r ApiUmGroupsSharesPutRequest) XContractNumber(xContractNumber int32) ApiUmGroupsSharesPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmGroupsSharesPutRequest) Execute() (GroupShare, *APIResponse, error) { return r.ApiService.UmGroupsSharesPutExecute(r) } /* * UmGroupsSharesPut Modify group share privileges * Modify share permissions for the specified group. With an empty body, no updates are performed, and the current share permissions for the group are returned with response code 200. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @param resourceId The unique ID of the resource. * @return ApiUmGroupsSharesPutRequest */ func (a *UserManagementApiService) UmGroupsSharesPut(ctx _context.Context, groupId string, resourceId string) ApiUmGroupsSharesPutRequest { return ApiUmGroupsSharesPutRequest{ ApiService: a, ctx: ctx, groupId: groupId, resourceId: resourceId, } } /* * Execute executes the request * @return GroupShare */ func (a *UserManagementApiService) UmGroupsSharesPutExecute(r ApiUmGroupsSharesPutRequest) (GroupShare, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue GroupShare ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsSharesPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}/shares/{resourceId}" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"resourceId"+"}", _neturl.PathEscape(parameterToString(r.resourceId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.resource == nil { return localVarReturnValue, nil, reportError("resource is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.resource if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsSharesPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmGroupsUsersDeleteRequest struct { ctx _context.Context ApiService *UserManagementApiService groupId string userId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsUsersDeleteRequest) Pretty(pretty bool) ApiUmGroupsUsersDeleteRequest { r.pretty = &pretty return r } func (r ApiUmGroupsUsersDeleteRequest) Depth(depth int32) ApiUmGroupsUsersDeleteRequest { r.depth = &depth return r } func (r ApiUmGroupsUsersDeleteRequest) XContractNumber(xContractNumber int32) ApiUmGroupsUsersDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmGroupsUsersDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.UmGroupsUsersDeleteExecute(r) } /* * UmGroupsUsersDelete Remove users from groups * Remove the specified user from the group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @param userId The unique ID of the user. * @return ApiUmGroupsUsersDeleteRequest */ func (a *UserManagementApiService) UmGroupsUsersDelete(ctx _context.Context, groupId string, userId string) ApiUmGroupsUsersDeleteRequest { return ApiUmGroupsUsersDeleteRequest{ ApiService: a, ctx: ctx, groupId: groupId, userId: userId, } } /* * Execute executes the request */ func (a *UserManagementApiService) UmGroupsUsersDeleteExecute(r ApiUmGroupsUsersDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsUsersDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}/users/{userId}" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsUsersDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiUmGroupsUsersGetRequest struct { ctx _context.Context ApiService *UserManagementApiService filters _neturl.Values orderBy *string maxResults *int32 groupId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsUsersGetRequest) Pretty(pretty bool) ApiUmGroupsUsersGetRequest { r.pretty = &pretty return r } func (r ApiUmGroupsUsersGetRequest) Depth(depth int32) ApiUmGroupsUsersGetRequest { r.depth = &depth return r } func (r ApiUmGroupsUsersGetRequest) XContractNumber(xContractNumber int32) ApiUmGroupsUsersGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmGroupsUsersGetRequest) Filter(key string, value string) ApiUmGroupsUsersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiUmGroupsUsersGetRequest) OrderBy(orderBy string) ApiUmGroupsUsersGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiUmGroupsUsersGetRequest) MaxResults(maxResults int32) ApiUmGroupsUsersGetRequest { r.maxResults = &maxResults return r } func (r ApiUmGroupsUsersGetRequest) Execute() (GroupMembers, *APIResponse, error) { return r.ApiService.UmGroupsUsersGetExecute(r) } /* * UmGroupsUsersGet List group members * List all members of the specified user group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @return ApiUmGroupsUsersGetRequest */ func (a *UserManagementApiService) UmGroupsUsersGet(ctx _context.Context, groupId string) ApiUmGroupsUsersGetRequest { return ApiUmGroupsUsersGetRequest{ ApiService: a, ctx: ctx, groupId: groupId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return GroupMembers */ func (a *UserManagementApiService) UmGroupsUsersGetExecute(r ApiUmGroupsUsersGetRequest) (GroupMembers, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue GroupMembers ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsUsersGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}/users" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsUsersGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmGroupsUsersPostRequest struct { ctx _context.Context ApiService *UserManagementApiService groupId string user *User pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmGroupsUsersPostRequest) User(user User) ApiUmGroupsUsersPostRequest { r.user = &user return r } func (r ApiUmGroupsUsersPostRequest) Pretty(pretty bool) ApiUmGroupsUsersPostRequest { r.pretty = &pretty return r } func (r ApiUmGroupsUsersPostRequest) Depth(depth int32) ApiUmGroupsUsersPostRequest { r.depth = &depth return r } func (r ApiUmGroupsUsersPostRequest) XContractNumber(xContractNumber int32) ApiUmGroupsUsersPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmGroupsUsersPostRequest) Execute() (User, *APIResponse, error) { return r.ApiService.UmGroupsUsersPostExecute(r) } /* * UmGroupsUsersPost Add a Group Member * Adds an existing user to the specified group. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param groupId The unique ID of the group. * @return ApiUmGroupsUsersPostRequest */ func (a *UserManagementApiService) UmGroupsUsersPost(ctx _context.Context, groupId string) ApiUmGroupsUsersPostRequest { return ApiUmGroupsUsersPostRequest{ ApiService: a, ctx: ctx, groupId: groupId, } } /* * Execute executes the request * @return User */ func (a *UserManagementApiService) UmGroupsUsersPostExecute(r ApiUmGroupsUsersPostRequest) (User, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue User ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmGroupsUsersPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/groups/{groupId}/users" localVarPath = strings.Replace(localVarPath, "{"+"groupId"+"}", _neturl.PathEscape(parameterToString(r.groupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.user == nil { return localVarReturnValue, nil, reportError("user is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.user if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmGroupsUsersPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmResourcesFindByTypeRequest struct { ctx _context.Context ApiService *UserManagementApiService resourceType string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmResourcesFindByTypeRequest) Pretty(pretty bool) ApiUmResourcesFindByTypeRequest { r.pretty = &pretty return r } func (r ApiUmResourcesFindByTypeRequest) Depth(depth int32) ApiUmResourcesFindByTypeRequest { r.depth = &depth return r } func (r ApiUmResourcesFindByTypeRequest) XContractNumber(xContractNumber int32) ApiUmResourcesFindByTypeRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmResourcesFindByTypeRequest) Execute() (Resources, *APIResponse, error) { return r.ApiService.UmResourcesFindByTypeExecute(r) } /* - UmResourcesFindByType List resources by type - List all resources of the specified type. Resource types are: {datacenter, snapshot, image, ipblock, pcc, backupunit, k8s} Resource types are in the list of resources, returned by GET. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param resourceType The resource type - @return ApiUmResourcesFindByTypeRequest */ func (a *UserManagementApiService) UmResourcesFindByType(ctx _context.Context, resourceType string) ApiUmResourcesFindByTypeRequest { return ApiUmResourcesFindByTypeRequest{ ApiService: a, ctx: ctx, resourceType: resourceType, } } /* * Execute executes the request * @return Resources */ func (a *UserManagementApiService) UmResourcesFindByTypeExecute(r ApiUmResourcesFindByTypeRequest) (Resources, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Resources ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmResourcesFindByType") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/resources/{resourceType}" localVarPath = strings.Replace(localVarPath, "{"+"resourceType"+"}", _neturl.PathEscape(parameterToString(r.resourceType, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmResourcesFindByType", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmResourcesFindByTypeAndIdRequest struct { ctx _context.Context ApiService *UserManagementApiService resourceType string resourceId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmResourcesFindByTypeAndIdRequest) Pretty(pretty bool) ApiUmResourcesFindByTypeAndIdRequest { r.pretty = &pretty return r } func (r ApiUmResourcesFindByTypeAndIdRequest) Depth(depth int32) ApiUmResourcesFindByTypeAndIdRequest { r.depth = &depth return r } func (r ApiUmResourcesFindByTypeAndIdRequest) XContractNumber(xContractNumber int32) ApiUmResourcesFindByTypeAndIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmResourcesFindByTypeAndIdRequest) Execute() (Resource, *APIResponse, error) { return r.ApiService.UmResourcesFindByTypeAndIdExecute(r) } /* - UmResourcesFindByTypeAndId Retrieve resources by type - Retrieve a resource by the resource type and resource ID. Resource types are: {datacenter, snapshot, image, ipblock, pcc, backupunit, k8s} Resource types are in the list of resources, returned by GET. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param resourceType The resource type - @param resourceId The resource ID - @return ApiUmResourcesFindByTypeAndIdRequest */ func (a *UserManagementApiService) UmResourcesFindByTypeAndId(ctx _context.Context, resourceType string, resourceId string) ApiUmResourcesFindByTypeAndIdRequest { return ApiUmResourcesFindByTypeAndIdRequest{ ApiService: a, ctx: ctx, resourceType: resourceType, resourceId: resourceId, } } /* * Execute executes the request * @return Resource */ func (a *UserManagementApiService) UmResourcesFindByTypeAndIdExecute(r ApiUmResourcesFindByTypeAndIdRequest) (Resource, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Resource ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmResourcesFindByTypeAndId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/resources/{resourceType}/{resourceId}" localVarPath = strings.Replace(localVarPath, "{"+"resourceType"+"}", _neturl.PathEscape(parameterToString(r.resourceType, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"resourceId"+"}", _neturl.PathEscape(parameterToString(r.resourceId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmResourcesFindByTypeAndId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmResourcesGetRequest struct { ctx _context.Context ApiService *UserManagementApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmResourcesGetRequest) Pretty(pretty bool) ApiUmResourcesGetRequest { r.pretty = &pretty return r } func (r ApiUmResourcesGetRequest) Depth(depth int32) ApiUmResourcesGetRequest { r.depth = &depth return r } func (r ApiUmResourcesGetRequest) XContractNumber(xContractNumber int32) ApiUmResourcesGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmResourcesGetRequest) Filter(key string, value string) ApiUmResourcesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiUmResourcesGetRequest) OrderBy(orderBy string) ApiUmResourcesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiUmResourcesGetRequest) MaxResults(maxResults int32) ApiUmResourcesGetRequest { r.maxResults = &maxResults return r } func (r ApiUmResourcesGetRequest) Execute() (Resources, *APIResponse, error) { return r.ApiService.UmResourcesGetExecute(r) } /* * UmResourcesGet List all resources * List all the available resources. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiUmResourcesGetRequest */ func (a *UserManagementApiService) UmResourcesGet(ctx _context.Context) ApiUmResourcesGetRequest { return ApiUmResourcesGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Resources */ func (a *UserManagementApiService) UmResourcesGetExecute(r ApiUmResourcesGetRequest) (Resources, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Resources ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmResourcesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/resources" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmResourcesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmUsersDeleteRequest struct { ctx _context.Context ApiService *UserManagementApiService userId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersDeleteRequest) Pretty(pretty bool) ApiUmUsersDeleteRequest { r.pretty = &pretty return r } func (r ApiUmUsersDeleteRequest) Depth(depth int32) ApiUmUsersDeleteRequest { r.depth = &depth return r } func (r ApiUmUsersDeleteRequest) XContractNumber(xContractNumber int32) ApiUmUsersDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmUsersDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.UmUsersDeleteExecute(r) } /* * UmUsersDelete Delete users * Delete the specified user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @return ApiUmUsersDeleteRequest */ func (a *UserManagementApiService) UmUsersDelete(ctx _context.Context, userId string) ApiUmUsersDeleteRequest { return ApiUmUsersDeleteRequest{ ApiService: a, ctx: ctx, userId: userId, } } /* * Execute executes the request */ func (a *UserManagementApiService) UmUsersDeleteExecute(r ApiUmUsersDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmUsersDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiUmUsersFindByIdRequest struct { ctx _context.Context ApiService *UserManagementApiService userId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersFindByIdRequest) Pretty(pretty bool) ApiUmUsersFindByIdRequest { r.pretty = &pretty return r } func (r ApiUmUsersFindByIdRequest) Depth(depth int32) ApiUmUsersFindByIdRequest { r.depth = &depth return r } func (r ApiUmUsersFindByIdRequest) XContractNumber(xContractNumber int32) ApiUmUsersFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmUsersFindByIdRequest) Execute() (User, *APIResponse, error) { return r.ApiService.UmUsersFindByIdExecute(r) } /* * UmUsersFindById Retrieve users * Retrieve user properties by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @return ApiUmUsersFindByIdRequest */ func (a *UserManagementApiService) UmUsersFindById(ctx _context.Context, userId string) ApiUmUsersFindByIdRequest { return ApiUmUsersFindByIdRequest{ ApiService: a, ctx: ctx, userId: userId, } } /* * Execute executes the request * @return User */ func (a *UserManagementApiService) UmUsersFindByIdExecute(r ApiUmUsersFindByIdRequest) (User, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue User ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmUsersFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmUsersGetRequest struct { ctx _context.Context ApiService *UserManagementApiService filters _neturl.Values orderBy *string maxResults *int32 pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiUmUsersGetRequest) Pretty(pretty bool) ApiUmUsersGetRequest { r.pretty = &pretty return r } func (r ApiUmUsersGetRequest) Depth(depth int32) ApiUmUsersGetRequest { r.depth = &depth return r } func (r ApiUmUsersGetRequest) XContractNumber(xContractNumber int32) ApiUmUsersGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmUsersGetRequest) Offset(offset int32) ApiUmUsersGetRequest { r.offset = &offset return r } func (r ApiUmUsersGetRequest) Limit(limit int32) ApiUmUsersGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmUsersGetRequest) Filter(key string, value string) ApiUmUsersGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiUmUsersGetRequest) OrderBy(orderBy string) ApiUmUsersGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiUmUsersGetRequest) MaxResults(maxResults int32) ApiUmUsersGetRequest { r.maxResults = &maxResults return r } func (r ApiUmUsersGetRequest) Execute() (Users, *APIResponse, error) { return r.ApiService.UmUsersGetExecute(r) } /* * UmUsersGet List all users * List all the users in your account. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiUmUsersGetRequest */ func (a *UserManagementApiService) UmUsersGet(ctx _context.Context) ApiUmUsersGetRequest { return ApiUmUsersGetRequest{ ApiService: a, ctx: ctx, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Users */ func (a *UserManagementApiService) UmUsersGetExecute(r ApiUmUsersGetRequest) (Users, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Users ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmUsersGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(100, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmUsersGroupsGetRequest struct { ctx _context.Context ApiService *UserManagementApiService filters _neturl.Values orderBy *string maxResults *int32 userId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersGroupsGetRequest) Pretty(pretty bool) ApiUmUsersGroupsGetRequest { r.pretty = &pretty return r } func (r ApiUmUsersGroupsGetRequest) Depth(depth int32) ApiUmUsersGroupsGetRequest { r.depth = &depth return r } func (r ApiUmUsersGroupsGetRequest) XContractNumber(xContractNumber int32) ApiUmUsersGroupsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmUsersGroupsGetRequest) Filter(key string, value string) ApiUmUsersGroupsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiUmUsersGroupsGetRequest) OrderBy(orderBy string) ApiUmUsersGroupsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiUmUsersGroupsGetRequest) MaxResults(maxResults int32) ApiUmUsersGroupsGetRequest { r.maxResults = &maxResults return r } func (r ApiUmUsersGroupsGetRequest) Execute() (ResourceGroups, *APIResponse, error) { return r.ApiService.UmUsersGroupsGetExecute(r) } /* * UmUsersGroupsGet Retrieve group resources by user ID * Retrieve group resources of the user by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @return ApiUmUsersGroupsGetRequest */ func (a *UserManagementApiService) UmUsersGroupsGet(ctx _context.Context, userId string) ApiUmUsersGroupsGetRequest { return ApiUmUsersGroupsGetRequest{ ApiService: a, ctx: ctx, userId: userId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return ResourceGroups */ func (a *UserManagementApiService) UmUsersGroupsGetExecute(r ApiUmUsersGroupsGetRequest) (ResourceGroups, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ResourceGroups ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmUsersGroupsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}/groups" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersGroupsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmUsersOwnsGetRequest struct { ctx _context.Context ApiService *UserManagementApiService filters _neturl.Values orderBy *string maxResults *int32 userId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersOwnsGetRequest) Pretty(pretty bool) ApiUmUsersOwnsGetRequest { r.pretty = &pretty return r } func (r ApiUmUsersOwnsGetRequest) Depth(depth int32) ApiUmUsersOwnsGetRequest { r.depth = &depth return r } func (r ApiUmUsersOwnsGetRequest) XContractNumber(xContractNumber int32) ApiUmUsersOwnsGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmUsersOwnsGetRequest) Filter(key string, value string) ApiUmUsersOwnsGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiUmUsersOwnsGetRequest) OrderBy(orderBy string) ApiUmUsersOwnsGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiUmUsersOwnsGetRequest) MaxResults(maxResults int32) ApiUmUsersOwnsGetRequest { r.maxResults = &maxResults return r } func (r ApiUmUsersOwnsGetRequest) Execute() (ResourcesUsers, *APIResponse, error) { return r.ApiService.UmUsersOwnsGetExecute(r) } /* * UmUsersOwnsGet Retrieve user resources by user ID * Retrieve own resources of the user by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @return ApiUmUsersOwnsGetRequest */ func (a *UserManagementApiService) UmUsersOwnsGet(ctx _context.Context, userId string) ApiUmUsersOwnsGetRequest { return ApiUmUsersOwnsGetRequest{ ApiService: a, ctx: ctx, userId: userId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return ResourcesUsers */ func (a *UserManagementApiService) UmUsersOwnsGetExecute(r ApiUmUsersOwnsGetRequest) (ResourcesUsers, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue ResourcesUsers ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmUsersOwnsGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}/owns" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersOwnsGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmUsersPostRequest struct { ctx _context.Context ApiService *UserManagementApiService user *UserPost pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersPostRequest) User(user UserPost) ApiUmUsersPostRequest { r.user = &user return r } func (r ApiUmUsersPostRequest) Pretty(pretty bool) ApiUmUsersPostRequest { r.pretty = &pretty return r } func (r ApiUmUsersPostRequest) Depth(depth int32) ApiUmUsersPostRequest { r.depth = &depth return r } func (r ApiUmUsersPostRequest) XContractNumber(xContractNumber int32) ApiUmUsersPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmUsersPostRequest) Execute() (User, *APIResponse, error) { return r.ApiService.UmUsersPostExecute(r) } /* * UmUsersPost Create users * Create a user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiUmUsersPostRequest */ func (a *UserManagementApiService) UmUsersPost(ctx _context.Context) ApiUmUsersPostRequest { return ApiUmUsersPostRequest{ ApiService: a, ctx: ctx, } } /* * Execute executes the request * @return User */ func (a *UserManagementApiService) UmUsersPostExecute(r ApiUmUsersPostRequest) (User, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue User ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmUsersPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.user == nil { return localVarReturnValue, nil, reportError("user is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.user if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmUsersPutRequest struct { ctx _context.Context ApiService *UserManagementApiService userId string user *UserPut pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersPutRequest) User(user UserPut) ApiUmUsersPutRequest { r.user = &user return r } func (r ApiUmUsersPutRequest) Pretty(pretty bool) ApiUmUsersPutRequest { r.pretty = &pretty return r } func (r ApiUmUsersPutRequest) Depth(depth int32) ApiUmUsersPutRequest { r.depth = &depth return r } func (r ApiUmUsersPutRequest) XContractNumber(xContractNumber int32) ApiUmUsersPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmUsersPutRequest) Execute() (User, *APIResponse, error) { return r.ApiService.UmUsersPutExecute(r) } /* * UmUsersPut Modify users * Modify the properties of the specified user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @return ApiUmUsersPutRequest */ func (a *UserManagementApiService) UmUsersPut(ctx _context.Context, userId string) ApiUmUsersPutRequest { return ApiUmUsersPutRequest{ ApiService: a, ctx: ctx, userId: userId, } } /* * Execute executes the request * @return User */ func (a *UserManagementApiService) UmUsersPutExecute(r ApiUmUsersPutRequest) (User, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue User ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserManagementApiService.UmUsersPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.user == nil { return localVarReturnValue, nil, reportError("user is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.user if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_user_s3_keys.go000066400000000000000000001124071465267054300235000ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // UserS3KeysApiService UserS3KeysApi service type UserS3KeysApiService service type ApiUmUsersS3keysDeleteRequest struct { ctx _context.Context ApiService *UserS3KeysApiService userId string keyId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersS3keysDeleteRequest) Pretty(pretty bool) ApiUmUsersS3keysDeleteRequest { r.pretty = &pretty return r } func (r ApiUmUsersS3keysDeleteRequest) Depth(depth int32) ApiUmUsersS3keysDeleteRequest { r.depth = &depth return r } func (r ApiUmUsersS3keysDeleteRequest) XContractNumber(xContractNumber int32) ApiUmUsersS3keysDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmUsersS3keysDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.UmUsersS3keysDeleteExecute(r) } /* * UmUsersS3keysDelete Delete S3 keys * Delete the specified user S3 key. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @param keyId The unique ID of the S3 key. * @return ApiUmUsersS3keysDeleteRequest */ func (a *UserS3KeysApiService) UmUsersS3keysDelete(ctx _context.Context, userId string, keyId string) ApiUmUsersS3keysDeleteRequest { return ApiUmUsersS3keysDeleteRequest{ ApiService: a, ctx: ctx, userId: userId, keyId: keyId, } } /* * Execute executes the request */ func (a *UserS3KeysApiService) UmUsersS3keysDeleteExecute(r ApiUmUsersS3keysDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserS3KeysApiService.UmUsersS3keysDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}/s3keys/{keyId}" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"keyId"+"}", _neturl.PathEscape(parameterToString(r.keyId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersS3keysDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiUmUsersS3keysFindByKeyIdRequest struct { ctx _context.Context ApiService *UserS3KeysApiService userId string keyId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersS3keysFindByKeyIdRequest) Pretty(pretty bool) ApiUmUsersS3keysFindByKeyIdRequest { r.pretty = &pretty return r } func (r ApiUmUsersS3keysFindByKeyIdRequest) Depth(depth int32) ApiUmUsersS3keysFindByKeyIdRequest { r.depth = &depth return r } func (r ApiUmUsersS3keysFindByKeyIdRequest) XContractNumber(xContractNumber int32) ApiUmUsersS3keysFindByKeyIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmUsersS3keysFindByKeyIdRequest) Execute() (S3Key, *APIResponse, error) { return r.ApiService.UmUsersS3keysFindByKeyIdExecute(r) } /* * UmUsersS3keysFindByKeyId Retrieve user S3 keys by key ID * Retrieve the specified user S3 key. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. The key ID is in the response body when the S3 key is created, and in the list of all user S3 keys, returned by GET. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @param keyId The unique ID of the S3 key. * @return ApiUmUsersS3keysFindByKeyIdRequest */ func (a *UserS3KeysApiService) UmUsersS3keysFindByKeyId(ctx _context.Context, userId string, keyId string) ApiUmUsersS3keysFindByKeyIdRequest { return ApiUmUsersS3keysFindByKeyIdRequest{ ApiService: a, ctx: ctx, userId: userId, keyId: keyId, } } /* * Execute executes the request * @return S3Key */ func (a *UserS3KeysApiService) UmUsersS3keysFindByKeyIdExecute(r ApiUmUsersS3keysFindByKeyIdRequest) (S3Key, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue S3Key ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserS3KeysApiService.UmUsersS3keysFindByKeyId") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}/s3keys/{keyId}" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"keyId"+"}", _neturl.PathEscape(parameterToString(r.keyId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersS3keysFindByKeyId", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmUsersS3keysGetRequest struct { ctx _context.Context ApiService *UserS3KeysApiService filters _neturl.Values orderBy *string maxResults *int32 userId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersS3keysGetRequest) Pretty(pretty bool) ApiUmUsersS3keysGetRequest { r.pretty = &pretty return r } func (r ApiUmUsersS3keysGetRequest) Depth(depth int32) ApiUmUsersS3keysGetRequest { r.depth = &depth return r } func (r ApiUmUsersS3keysGetRequest) XContractNumber(xContractNumber int32) ApiUmUsersS3keysGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmUsersS3keysGetRequest) Filter(key string, value string) ApiUmUsersS3keysGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiUmUsersS3keysGetRequest) OrderBy(orderBy string) ApiUmUsersS3keysGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiUmUsersS3keysGetRequest) MaxResults(maxResults int32) ApiUmUsersS3keysGetRequest { r.maxResults = &maxResults return r } func (r ApiUmUsersS3keysGetRequest) Execute() (S3Keys, *APIResponse, error) { return r.ApiService.UmUsersS3keysGetExecute(r) } /* * UmUsersS3keysGet List user S3 keys * List S3 keys by user ID. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @return ApiUmUsersS3keysGetRequest */ func (a *UserS3KeysApiService) UmUsersS3keysGet(ctx _context.Context, userId string) ApiUmUsersS3keysGetRequest { return ApiUmUsersS3keysGetRequest{ ApiService: a, ctx: ctx, userId: userId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return S3Keys */ func (a *UserS3KeysApiService) UmUsersS3keysGetExecute(r ApiUmUsersS3keysGetRequest) (S3Keys, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue S3Keys ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserS3KeysApiService.UmUsersS3keysGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}/s3keys" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersS3keysGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmUsersS3keysPostRequest struct { ctx _context.Context ApiService *UserS3KeysApiService userId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersS3keysPostRequest) Pretty(pretty bool) ApiUmUsersS3keysPostRequest { r.pretty = &pretty return r } func (r ApiUmUsersS3keysPostRequest) Depth(depth int32) ApiUmUsersS3keysPostRequest { r.depth = &depth return r } func (r ApiUmUsersS3keysPostRequest) XContractNumber(xContractNumber int32) ApiUmUsersS3keysPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmUsersS3keysPostRequest) Execute() (S3Key, *APIResponse, error) { return r.ApiService.UmUsersS3keysPostExecute(r) } /* * UmUsersS3keysPost Create user S3 keys * Create an S3 key for the specified user. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. A maximum of five keys per user can be generated. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @return ApiUmUsersS3keysPostRequest */ func (a *UserS3KeysApiService) UmUsersS3keysPost(ctx _context.Context, userId string) ApiUmUsersS3keysPostRequest { return ApiUmUsersS3keysPostRequest{ ApiService: a, ctx: ctx, userId: userId, } } /* * Execute executes the request * @return S3Key */ func (a *UserS3KeysApiService) UmUsersS3keysPostExecute(r ApiUmUsersS3keysPostRequest) (S3Key, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue S3Key ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserS3KeysApiService.UmUsersS3keysPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}/s3keys" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersS3keysPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmUsersS3keysPutRequest struct { ctx _context.Context ApiService *UserS3KeysApiService userId string keyId string s3Key *S3Key pretty *bool depth *int32 xContractNumber *int32 } func (r ApiUmUsersS3keysPutRequest) S3Key(s3Key S3Key) ApiUmUsersS3keysPutRequest { r.s3Key = &s3Key return r } func (r ApiUmUsersS3keysPutRequest) Pretty(pretty bool) ApiUmUsersS3keysPutRequest { r.pretty = &pretty return r } func (r ApiUmUsersS3keysPutRequest) Depth(depth int32) ApiUmUsersS3keysPutRequest { r.depth = &depth return r } func (r ApiUmUsersS3keysPutRequest) XContractNumber(xContractNumber int32) ApiUmUsersS3keysPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiUmUsersS3keysPutRequest) Execute() (S3Key, *APIResponse, error) { return r.ApiService.UmUsersS3keysPutExecute(r) } /* * UmUsersS3keysPut Modify a S3 Key by Key ID * Enables or disables the specified user S3 key. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @param keyId The unique ID of the S3 key. * @return ApiUmUsersS3keysPutRequest */ func (a *UserS3KeysApiService) UmUsersS3keysPut(ctx _context.Context, userId string, keyId string) ApiUmUsersS3keysPutRequest { return ApiUmUsersS3keysPutRequest{ ApiService: a, ctx: ctx, userId: userId, keyId: keyId, } } /* * Execute executes the request * @return S3Key */ func (a *UserS3KeysApiService) UmUsersS3keysPutExecute(r ApiUmUsersS3keysPutRequest) (S3Key, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue S3Key ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserS3KeysApiService.UmUsersS3keysPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}/s3keys/{keyId}" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"keyId"+"}", _neturl.PathEscape(parameterToString(r.keyId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.s3Key == nil { return localVarReturnValue, nil, reportError("s3Key is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.s3Key if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersS3keysPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiUmUsersS3ssourlGetRequest struct { ctx _context.Context ApiService *UserS3KeysApiService filters _neturl.Values orderBy *string maxResults *int32 userId string pretty *bool xContractNumber *int32 } func (r ApiUmUsersS3ssourlGetRequest) Pretty(pretty bool) ApiUmUsersS3ssourlGetRequest { r.pretty = &pretty return r } func (r ApiUmUsersS3ssourlGetRequest) XContractNumber(xContractNumber int32) ApiUmUsersS3ssourlGetRequest { r.xContractNumber = &xContractNumber return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiUmUsersS3ssourlGetRequest) Filter(key string, value string) ApiUmUsersS3ssourlGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiUmUsersS3ssourlGetRequest) OrderBy(orderBy string) ApiUmUsersS3ssourlGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiUmUsersS3ssourlGetRequest) MaxResults(maxResults int32) ApiUmUsersS3ssourlGetRequest { r.maxResults = &maxResults return r } func (r ApiUmUsersS3ssourlGetRequest) Execute() (S3ObjectStorageSSO, *APIResponse, error) { return r.ApiService.UmUsersS3ssourlGetExecute(r) } /* * UmUsersS3ssourlGet Retrieve S3 single sign-on URLs * Retrieve S3 Object Storage single sign-on URLs for the the specified user. The user ID is in the response body when the user is created, and in the list of the users, returned by GET. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param userId The unique ID of the user. * @return ApiUmUsersS3ssourlGetRequest */ func (a *UserS3KeysApiService) UmUsersS3ssourlGet(ctx _context.Context, userId string) ApiUmUsersS3ssourlGetRequest { return ApiUmUsersS3ssourlGetRequest{ ApiService: a, ctx: ctx, userId: userId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return S3ObjectStorageSSO */ func (a *UserS3KeysApiService) UmUsersS3ssourlGetExecute(r ApiUmUsersS3ssourlGetRequest) (S3ObjectStorageSSO, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue S3ObjectStorageSSO ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserS3KeysApiService.UmUsersS3ssourlGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/um/users/{userId}/s3ssourl" localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.PathEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "UmUsersS3ssourlGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/api_volumes.go000066400000000000000000001504521465267054300225560ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( _context "context" "fmt" "io" _nethttp "net/http" _neturl "net/url" "strings" ) // Linger please var ( _ _context.Context ) // VolumesApiService VolumesApi service type VolumesApiService service type ApiDatacentersVolumesCreateSnapshotPostRequest struct { ctx _context.Context ApiService *VolumesApiService datacenterId string volumeId string pretty *bool depth *int32 xContractNumber *int32 name *string description *string secAuthProtection *bool licenceType *string } func (r ApiDatacentersVolumesCreateSnapshotPostRequest) Pretty(pretty bool) ApiDatacentersVolumesCreateSnapshotPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesCreateSnapshotPostRequest) Depth(depth int32) ApiDatacentersVolumesCreateSnapshotPostRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesCreateSnapshotPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesCreateSnapshotPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesCreateSnapshotPostRequest) Name(name string) ApiDatacentersVolumesCreateSnapshotPostRequest { r.name = &name return r } func (r ApiDatacentersVolumesCreateSnapshotPostRequest) Description(description string) ApiDatacentersVolumesCreateSnapshotPostRequest { r.description = &description return r } func (r ApiDatacentersVolumesCreateSnapshotPostRequest) SecAuthProtection(secAuthProtection bool) ApiDatacentersVolumesCreateSnapshotPostRequest { r.secAuthProtection = &secAuthProtection return r } func (r ApiDatacentersVolumesCreateSnapshotPostRequest) LicenceType(licenceType string) ApiDatacentersVolumesCreateSnapshotPostRequest { r.licenceType = &licenceType return r } func (r ApiDatacentersVolumesCreateSnapshotPostRequest) Execute() (Snapshot, *APIResponse, error) { return r.ApiService.DatacentersVolumesCreateSnapshotPostExecute(r) } /* * DatacentersVolumesCreateSnapshotPost Create volume snapshots * Create a snapshot of the specified volume within the data center; this snapshot can later be used to restore this volume. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @return ApiDatacentersVolumesCreateSnapshotPostRequest */ func (a *VolumesApiService) DatacentersVolumesCreateSnapshotPost(ctx _context.Context, datacenterId string, volumeId string) ApiDatacentersVolumesCreateSnapshotPostRequest { return ApiDatacentersVolumesCreateSnapshotPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, } } /* * Execute executes the request * @return Snapshot */ func (a *VolumesApiService) DatacentersVolumesCreateSnapshotPostExecute(r ApiDatacentersVolumesCreateSnapshotPostRequest) (Snapshot, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Snapshot ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VolumesApiService.DatacentersVolumesCreateSnapshotPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.name != nil { localVarFormParams.Add("name", parameterToString(*r.name, "")) } if r.description != nil { localVarFormParams.Add("description", parameterToString(*r.description, "")) } if r.secAuthProtection != nil { localVarFormParams.Add("secAuthProtection", parameterToString(*r.secAuthProtection, "")) } if r.licenceType != nil { localVarFormParams.Add("licenceType", parameterToString(*r.licenceType, "")) } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesCreateSnapshotPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersVolumesDeleteRequest struct { ctx _context.Context ApiService *VolumesApiService datacenterId string volumeId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersVolumesDeleteRequest) Pretty(pretty bool) ApiDatacentersVolumesDeleteRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesDeleteRequest) Depth(depth int32) ApiDatacentersVolumesDeleteRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesDeleteRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesDeleteRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesDeleteRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersVolumesDeleteExecute(r) } /* * DatacentersVolumesDelete Delete volumes * Delete the specified volume within the data center. Use with caution, the volume will be permanently removed! * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @return ApiDatacentersVolumesDeleteRequest */ func (a *VolumesApiService) DatacentersVolumesDelete(ctx _context.Context, datacenterId string, volumeId string) ApiDatacentersVolumesDeleteRequest { return ApiDatacentersVolumesDeleteRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, } } /* * Execute executes the request */ func (a *VolumesApiService) DatacentersVolumesDeleteExecute(r ApiDatacentersVolumesDeleteRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VolumesApiService.DatacentersVolumesDelete") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesDelete", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } type ApiDatacentersVolumesFindByIdRequest struct { ctx _context.Context ApiService *VolumesApiService datacenterId string volumeId string pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersVolumesFindByIdRequest) Pretty(pretty bool) ApiDatacentersVolumesFindByIdRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesFindByIdRequest) Depth(depth int32) ApiDatacentersVolumesFindByIdRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesFindByIdRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesFindByIdRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesFindByIdRequest) Execute() (Volume, *APIResponse, error) { return r.ApiService.DatacentersVolumesFindByIdExecute(r) } /* * DatacentersVolumesFindById Retrieve volumes * Retrieve the properties of the specified volume within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @return ApiDatacentersVolumesFindByIdRequest */ func (a *VolumesApiService) DatacentersVolumesFindById(ctx _context.Context, datacenterId string, volumeId string) ApiDatacentersVolumesFindByIdRequest { return ApiDatacentersVolumesFindByIdRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, } } /* * Execute executes the request * @return Volume */ func (a *VolumesApiService) DatacentersVolumesFindByIdExecute(r ApiDatacentersVolumesFindByIdRequest) (Volume, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Volume ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VolumesApiService.DatacentersVolumesFindById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesFindById", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersVolumesGetRequest struct { ctx _context.Context ApiService *VolumesApiService filters _neturl.Values orderBy *string maxResults *int32 datacenterId string pretty *bool depth *int32 xContractNumber *int32 offset *int32 limit *int32 } func (r ApiDatacentersVolumesGetRequest) Pretty(pretty bool) ApiDatacentersVolumesGetRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesGetRequest) Depth(depth int32) ApiDatacentersVolumesGetRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesGetRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesGetRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesGetRequest) Offset(offset int32) ApiDatacentersVolumesGetRequest { r.offset = &offset return r } func (r ApiDatacentersVolumesGetRequest) Limit(limit int32) ApiDatacentersVolumesGetRequest { r.limit = &limit return r } // Filters query parameters limit results to those containing a matching value for a specific property. func (r ApiDatacentersVolumesGetRequest) Filter(key string, value string) ApiDatacentersVolumesGetRequest { filterKey := fmt.Sprintf(FilterQueryParam, key) r.filters[filterKey] = append(r.filters[filterKey], value) return r } // OrderBy query param sorts the results alphanumerically in ascending order based on the specified property. func (r ApiDatacentersVolumesGetRequest) OrderBy(orderBy string) ApiDatacentersVolumesGetRequest { r.orderBy = &orderBy return r } // MaxResults query param limits the number of results returned. func (r ApiDatacentersVolumesGetRequest) MaxResults(maxResults int32) ApiDatacentersVolumesGetRequest { r.maxResults = &maxResults return r } func (r ApiDatacentersVolumesGetRequest) Execute() (Volumes, *APIResponse, error) { return r.ApiService.DatacentersVolumesGetExecute(r) } /* * DatacentersVolumesGet List volumes * List all the volumes within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersVolumesGetRequest */ func (a *VolumesApiService) DatacentersVolumesGet(ctx _context.Context, datacenterId string) ApiDatacentersVolumesGetRequest { return ApiDatacentersVolumesGetRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, filters: _neturl.Values{}, } } /* * Execute executes the request * @return Volumes */ func (a *VolumesApiService) DatacentersVolumesGetExecute(r ApiDatacentersVolumesGetRequest) (Volumes, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Volumes ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VolumesApiService.DatacentersVolumesGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } if r.offset != nil { localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("offset") if defaultQueryParam == "" { localVarQueryParams.Add("offset", parameterToString(0, "")) } } if r.limit != nil { localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("limit") if defaultQueryParam == "" { localVarQueryParams.Add("limit", parameterToString(1000, "")) } } if r.orderBy != nil { localVarQueryParams.Add("orderBy", parameterToString(*r.orderBy, "")) } if r.maxResults != nil { localVarQueryParams.Add("maxResults", parameterToString(*r.maxResults, "")) } if len(r.filters) > 0 { for k, v := range r.filters { for _, iv := range v { localVarQueryParams.Add(k, iv) } } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesGet", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersVolumesPatchRequest struct { ctx _context.Context ApiService *VolumesApiService datacenterId string volumeId string volume *VolumeProperties pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersVolumesPatchRequest) Volume(volume VolumeProperties) ApiDatacentersVolumesPatchRequest { r.volume = &volume return r } func (r ApiDatacentersVolumesPatchRequest) Pretty(pretty bool) ApiDatacentersVolumesPatchRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesPatchRequest) Depth(depth int32) ApiDatacentersVolumesPatchRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesPatchRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesPatchRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesPatchRequest) Execute() (Volume, *APIResponse, error) { return r.ApiService.DatacentersVolumesPatchExecute(r) } /* * DatacentersVolumesPatch Partially modify volumes * Update the properties of the specified storage volume within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @return ApiDatacentersVolumesPatchRequest */ func (a *VolumesApiService) DatacentersVolumesPatch(ctx _context.Context, datacenterId string, volumeId string) ApiDatacentersVolumesPatchRequest { return ApiDatacentersVolumesPatchRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, } } /* * Execute executes the request * @return Volume */ func (a *VolumesApiService) DatacentersVolumesPatchExecute(r ApiDatacentersVolumesPatchRequest) (Volume, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Volume ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VolumesApiService.DatacentersVolumesPatch") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.volume == nil { return localVarReturnValue, nil, reportError("volume is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.volume if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesPatch", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersVolumesPostRequest struct { ctx _context.Context ApiService *VolumesApiService datacenterId string volume *Volume pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersVolumesPostRequest) Volume(volume Volume) ApiDatacentersVolumesPostRequest { r.volume = &volume return r } func (r ApiDatacentersVolumesPostRequest) Pretty(pretty bool) ApiDatacentersVolumesPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesPostRequest) Depth(depth int32) ApiDatacentersVolumesPostRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesPostRequest) Execute() (Volume, *APIResponse, error) { return r.ApiService.DatacentersVolumesPostExecute(r) } /* * DatacentersVolumesPost Create a Volume * Creates a storage volume within the specified data center. The volume will not be attached! Attaching volumes is described in the Servers section. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @return ApiDatacentersVolumesPostRequest */ func (a *VolumesApiService) DatacentersVolumesPost(ctx _context.Context, datacenterId string) ApiDatacentersVolumesPostRequest { return ApiDatacentersVolumesPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, } } /* * Execute executes the request * @return Volume */ func (a *VolumesApiService) DatacentersVolumesPostExecute(r ApiDatacentersVolumesPostRequest) (Volume, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Volume ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VolumesApiService.DatacentersVolumesPost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.volume == nil { return localVarReturnValue, nil, reportError("volume is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.volume if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesPost", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersVolumesPutRequest struct { ctx _context.Context ApiService *VolumesApiService datacenterId string volumeId string volume *Volume pretty *bool depth *int32 xContractNumber *int32 } func (r ApiDatacentersVolumesPutRequest) Volume(volume Volume) ApiDatacentersVolumesPutRequest { r.volume = &volume return r } func (r ApiDatacentersVolumesPutRequest) Pretty(pretty bool) ApiDatacentersVolumesPutRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesPutRequest) Depth(depth int32) ApiDatacentersVolumesPutRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesPutRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesPutRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesPutRequest) Execute() (Volume, *APIResponse, error) { return r.ApiService.DatacentersVolumesPutExecute(r) } /* * DatacentersVolumesPut Modify a Volume by ID * Modifies the properties of the specified volume within the data center. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @return ApiDatacentersVolumesPutRequest */ func (a *VolumesApiService) DatacentersVolumesPut(ctx _context.Context, datacenterId string, volumeId string) ApiDatacentersVolumesPutRequest { return ApiDatacentersVolumesPutRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, } } /* * Execute executes the request * @return Volume */ func (a *VolumesApiService) DatacentersVolumesPutExecute(r ApiDatacentersVolumesPutRequest) (Volume, *APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte localVarReturnValue Volume ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VolumesApiService.DatacentersVolumesPut") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.volume == nil { return localVarReturnValue, nil, reportError("volume is required and must be specified") } if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } // body params localVarPostBody = r.volume if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesPut", } if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarReturnValue, localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarReturnValue, localVarAPIResponse, newErr } newErr.model = v return localVarReturnValue, localVarAPIResponse, newErr } err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: err.Error(), } return localVarReturnValue, localVarAPIResponse, newErr } return localVarReturnValue, localVarAPIResponse, nil } type ApiDatacentersVolumesRestoreSnapshotPostRequest struct { ctx _context.Context ApiService *VolumesApiService datacenterId string volumeId string pretty *bool depth *int32 xContractNumber *int32 snapshotId *string } func (r ApiDatacentersVolumesRestoreSnapshotPostRequest) Pretty(pretty bool) ApiDatacentersVolumesRestoreSnapshotPostRequest { r.pretty = &pretty return r } func (r ApiDatacentersVolumesRestoreSnapshotPostRequest) Depth(depth int32) ApiDatacentersVolumesRestoreSnapshotPostRequest { r.depth = &depth return r } func (r ApiDatacentersVolumesRestoreSnapshotPostRequest) XContractNumber(xContractNumber int32) ApiDatacentersVolumesRestoreSnapshotPostRequest { r.xContractNumber = &xContractNumber return r } func (r ApiDatacentersVolumesRestoreSnapshotPostRequest) SnapshotId(snapshotId string) ApiDatacentersVolumesRestoreSnapshotPostRequest { r.snapshotId = &snapshotId return r } func (r ApiDatacentersVolumesRestoreSnapshotPostRequest) Execute() (*APIResponse, error) { return r.ApiService.DatacentersVolumesRestoreSnapshotPostExecute(r) } /* * DatacentersVolumesRestoreSnapshotPost Restore volume snapshots * Restore a snapshot for the specified volume within the data center. A snapshot is an image of a volume, which can be used to restore this volume at a later time. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param datacenterId The unique ID of the data center. * @param volumeId The unique ID of the volume. * @return ApiDatacentersVolumesRestoreSnapshotPostRequest */ func (a *VolumesApiService) DatacentersVolumesRestoreSnapshotPost(ctx _context.Context, datacenterId string, volumeId string) ApiDatacentersVolumesRestoreSnapshotPostRequest { return ApiDatacentersVolumesRestoreSnapshotPostRequest{ ApiService: a, ctx: ctx, datacenterId: datacenterId, volumeId: volumeId, } } /* * Execute executes the request */ func (a *VolumesApiService) DatacentersVolumesRestoreSnapshotPostExecute(r ApiDatacentersVolumesRestoreSnapshotPostRequest) (*APIResponse, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VolumesApiService.DatacentersVolumesRestoreSnapshotPost") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot" localVarPath = strings.Replace(localVarPath, "{"+"datacenterId"+"}", _neturl.PathEscape(parameterToString(r.datacenterId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"volumeId"+"}", _neturl.PathEscape(parameterToString(r.volumeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.pretty != nil { localVarQueryParams.Add("pretty", parameterToString(*r.pretty, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("pretty") if defaultQueryParam == "" { localVarQueryParams.Add("pretty", parameterToString(true, "")) } } if r.depth != nil { localVarQueryParams.Add("depth", parameterToString(*r.depth, "")) } else { defaultQueryParam := a.client.cfg.DefaultQueryParams.Get("depth") if defaultQueryParam == "" { localVarQueryParams.Add("depth", parameterToString(0, "")) } } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} // 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.xContractNumber != nil { localVarHeaderParams["X-Contract-Number"] = parameterToString(*r.xContractNumber, "") } if r.snapshotId != nil { localVarFormParams.Add("snapshotId", parameterToString(*r.snapshotId, "")) } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if apiKey, ok := auth["TokenAuthentication"]; ok { var key string if apiKey.Prefix != "" { key = apiKey.Prefix + " " + apiKey.Key } else { key = apiKey.Key } localVarHeaderParams["Authorization"] = key } } } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req) localVarAPIResponse := &APIResponse{ Response: localVarHTTPResponse, Method: localVarHTTPMethod, RequestURL: localVarPath, RequestTime: httpRequestTime, Operation: "DatacentersVolumesRestoreSnapshotPost", } if err != nil || localVarHTTPResponse == nil { return localVarAPIResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } if localVarHTTPResponse.StatusCode >= 300 { newErr := GenericOpenAPIError{ statusCode: localVarHTTPResponse.StatusCode, body: localVarBody, error: fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, string(localVarBody)), } var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = fmt.Sprintf(FormatStringErr, localVarHTTPResponse.Status, err.Error()) return localVarAPIResponse, newErr } newErr.model = v return localVarAPIResponse, newErr } return localVarAPIResponse, nil } golang-github-ionos-cloud-sdk-go-6.2.0/client.go000066400000000000000000000767731465267054300215260ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "bytes" "context" "crypto/sha256" "crypto/tls" "crypto/x509" "encoding/hex" "encoding/json" "encoding/xml" "errors" "fmt" "io" "mime/multipart" "net" "net/http" "net/http/httputil" "net/url" "os" "path/filepath" "reflect" "regexp" "strconv" "strings" "time" "unicode/utf8" "golang.org/x/oauth2" ) var ( jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) ) const DepthParam = "depth" const ( RequestStatusQueued = "QUEUED" RequestStatusRunning = "RUNNING" RequestStatusFailed = "FAILED" RequestStatusDone = "DONE" Version = "6.2.0" ) // Constants for APIs const FilterQueryParam = "filter.%s" const FormatStringErr = "%s %s" // APIClient manages communication with the CLOUD API API v6.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration common service // Reuse a single struct instead of allocating one for each service on the heap. // API Services DefaultApi *DefaultApiService ApplicationLoadBalancersApi *ApplicationLoadBalancersApiService BackupUnitsApi *BackupUnitsApiService ContractResourcesApi *ContractResourcesApiService DataCentersApi *DataCentersApiService FirewallRulesApi *FirewallRulesApiService FlowLogsApi *FlowLogsApiService IPBlocksApi *IPBlocksApiService ImagesApi *ImagesApiService KubernetesApi *KubernetesApiService LANsApi *LANsApiService LabelsApi *LabelsApiService LoadBalancersApi *LoadBalancersApiService LocationsApi *LocationsApiService NATGatewaysApi *NATGatewaysApiService NetworkInterfacesApi *NetworkInterfacesApiService NetworkLoadBalancersApi *NetworkLoadBalancersApiService PrivateCrossConnectsApi *PrivateCrossConnectsApiService RequestsApi *RequestsApiService ServersApi *ServersApiService SnapshotsApi *SnapshotsApiService TargetGroupsApi *TargetGroupsApiService TemplatesApi *TemplatesApiService UserManagementApi *UserManagementApiService UserS3KeysApi *UserS3KeysApiService VolumesApi *VolumesApiService } type service struct { client *APIClient } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *Configuration) *APIClient { if cfg.HTTPClient == nil { cfg.HTTPClient = http.DefaultClient } //enable certificate pinning if the env variable is set pkFingerprint := os.Getenv(IonosPinnedCertEnvVar) if pkFingerprint != "" { httpTransport := &http.Transport{} AddPinnedCert(httpTransport, pkFingerprint) cfg.HTTPClient.Transport = httpTransport } c := &APIClient{} c.cfg = cfg c.common.client = c // API Services c.DefaultApi = (*DefaultApiService)(&c.common) c.ApplicationLoadBalancersApi = (*ApplicationLoadBalancersApiService)(&c.common) c.BackupUnitsApi = (*BackupUnitsApiService)(&c.common) c.ContractResourcesApi = (*ContractResourcesApiService)(&c.common) c.DataCentersApi = (*DataCentersApiService)(&c.common) c.FirewallRulesApi = (*FirewallRulesApiService)(&c.common) c.FlowLogsApi = (*FlowLogsApiService)(&c.common) c.IPBlocksApi = (*IPBlocksApiService)(&c.common) c.ImagesApi = (*ImagesApiService)(&c.common) c.KubernetesApi = (*KubernetesApiService)(&c.common) c.LANsApi = (*LANsApiService)(&c.common) c.LabelsApi = (*LabelsApiService)(&c.common) c.LoadBalancersApi = (*LoadBalancersApiService)(&c.common) c.LocationsApi = (*LocationsApiService)(&c.common) c.NATGatewaysApi = (*NATGatewaysApiService)(&c.common) c.NetworkInterfacesApi = (*NetworkInterfacesApiService)(&c.common) c.NetworkLoadBalancersApi = (*NetworkLoadBalancersApiService)(&c.common) c.PrivateCrossConnectsApi = (*PrivateCrossConnectsApiService)(&c.common) c.RequestsApi = (*RequestsApiService)(&c.common) c.ServersApi = (*ServersApiService)(&c.common) c.SnapshotsApi = (*SnapshotsApiService)(&c.common) c.TargetGroupsApi = (*TargetGroupsApiService)(&c.common) c.TemplatesApi = (*TemplatesApiService)(&c.common) c.UserManagementApi = (*UserManagementApiService)(&c.common) c.UserS3KeysApi = (*UserS3KeysApiService)(&c.common) c.VolumesApi = (*VolumesApiService)(&c.common) return c } // AddPinnedCert - enables pinning of the sha256 public fingerprint to the http client's transport func AddPinnedCert(transport *http.Transport, pkFingerprint string) { if pkFingerprint != "" { transport.DialTLSContext = addPinnedCertVerification([]byte(pkFingerprint), new(tls.Config)) } } // TLSDial can be assigned to a http.Transport's DialTLS field. type TLSDial func(ctx context.Context, network, addr string) (net.Conn, error) // AddPinnedCertVerification returns a TLSDial function which checks that // the remote server provides a certificate whose SHA256 fingerprint matches // the provided value. // // The returned dialer function can be plugged into a http.Transport's DialTLS // field to allow for certificate pinning. func addPinnedCertVerification(fingerprint []byte, tlsConfig *tls.Config) TLSDial { return func(ctx context.Context, network, addr string) (net.Conn, error) { //fingerprints can be added with ':', we need to trim fingerprint = bytes.ReplaceAll(fingerprint, []byte(":"), []byte("")) fingerprint = bytes.ReplaceAll(fingerprint, []byte(" "), []byte("")) //we are manually checking a certificate, so we need to enable insecure tlsConfig.InsecureSkipVerify = true // Dial the connection to get certificates to check conn, err := tls.Dial(network, addr, tlsConfig) if err != nil { return nil, err } if err := verifyPinnedCert(fingerprint, conn.ConnectionState().PeerCertificates); err != nil { _ = conn.Close() return nil, err } return conn, nil } } // verifyPinnedCert iterates the list of peer certificates and attempts to // locate a certificate that is not a CA and whose public key fingerprint matches pkFingerprint. func verifyPinnedCert(pkFingerprint []byte, peerCerts []*x509.Certificate) error { for _, cert := range peerCerts { fingerprint := sha256.Sum256(cert.Raw) var bytesFingerPrint = make([]byte, hex.EncodedLen(len(fingerprint[:]))) hex.Encode(bytesFingerPrint, fingerprint[:]) // we have a match, and it's not an authority certificate if cert.IsCA == false && bytes.EqualFold(bytesFingerPrint, pkFingerprint) { return nil } } return fmt.Errorf("remote server presented a certificate which does not match the provided fingerprint") } 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 insenstive match, finding needle in a haystack func contains(haystack []string, needle string) bool { for _, a := range haystack { if strings.ToLower(a) == strings.ToLower(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 } // parameterToString convert interface{} parameters to string, using a delimiter if format is provided. func parameterToString(obj interface{}, collectionFormat string) string { var delimiter string switch collectionFormat { case "pipes": delimiter = "|" case "ssv": delimiter = " " case "tsv": delimiter = "\t" case "csv": delimiter = "," } if reflect.TypeOf(obj).Kind() == reflect.Slice { return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") } else if t, ok := obj.(time.Time); ok { return t.Format(time.RFC3339) } return fmt.Sprintf("%v", obj) } // 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, time.Duration, error) { retryCount := 0 var resp *http.Response var httpRequestTime time.Duration var err error for { retryCount++ /* we need to clone the request with every retry time because Body closes after the request */ var clonedRequest *http.Request = request.Clone(request.Context()) if request.Body != nil { clonedRequest.Body, err = request.GetBody() if err != nil { return nil, httpRequestTime, err } } if c.cfg.Debug || c.cfg.LogLevel.Satisfies(Trace) { dump, err := httputil.DumpRequestOut(clonedRequest, true) if err == nil { c.cfg.Logger.Printf(" DumpRequestOut : %s\n", string(dump)) } else { c.cfg.Logger.Printf(" DumpRequestOut err: %+v", err) } c.cfg.Logger.Printf("\n try no: %d\n", retryCount) } httpRequestStartTime := time.Now() clonedRequest.Close = true resp, err = c.cfg.HTTPClient.Do(clonedRequest) httpRequestTime = time.Since(httpRequestStartTime) if err != nil { return resp, httpRequestTime, err } if c.cfg.Debug || c.cfg.LogLevel.Satisfies(Trace) { dump, err := httputil.DumpResponse(resp, true) if err == nil { c.cfg.Logger.Printf("\n DumpResponse : %s\n", string(dump)) } else { c.cfg.Logger.Printf(" DumpResponse err %+v", err) } } var backoffTime time.Duration switch resp.StatusCode { case http.StatusServiceUnavailable, http.StatusGatewayTimeout, http.StatusBadGateway: if request.Method == http.MethodPost { return resp, httpRequestTime, err } backoffTime = c.GetConfig().WaitTime case http.StatusTooManyRequests: if retryAfterSeconds := resp.Header.Get("Retry-After"); retryAfterSeconds != "" { waitTime, err := time.ParseDuration(retryAfterSeconds + "s") if err != nil { return resp, httpRequestTime, err } backoffTime = waitTime } else { backoffTime = c.GetConfig().WaitTime } default: return resp, httpRequestTime, err } if retryCount >= c.GetConfig().MaxRetries { if c.cfg.Debug || c.cfg.LogLevel.Satisfies(Debug) { c.cfg.Logger.Printf(" Number of maximum retries exceeded (%d retries)\n", c.cfg.MaxRetries) } break } else { c.backOff(request.Context(), backoffTime) } } return resp, httpRequestTime, err } func (c *APIClient) backOff(ctx context.Context, t time.Duration) { if t > c.GetConfig().MaxWaitTime { t = c.GetConfig().MaxWaitTime } if c.cfg.Debug || c.cfg.LogLevel.Satisfies(Debug) { c.cfg.Logger.Printf(" sleeping %s before retrying request\n", t.String()) } if t <= 0 { return } timer := time.NewTimer(t) defer timer.Stop() select { case <-ctx.Done(): case <-timer.C: } } // 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() *Configuration { return c.cfg } // 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, formFileName string, fileName string, fileBytes []byte) (localVarRequest *http.Request, err error) { var body *bytes.Buffer val, isSetInEnv := os.LookupEnv(IonosContractNumber) _, isSetInMap := headerParams["X-Contract-Number"] if headerParams == nil { headerParams = make(map[string]string) } if !isSetInMap && isSetInEnv { headerParams["X-Contract-Number"] = val } // Detect postBody type and post. if postBody != nil { contentType := headerParams["Content-Type"] if contentType == "" { contentType = detectContentType(postBody) headerParams["Content-Type"] = contentType } body, err = setBody(postBody, contentType) if err != nil { return nil, err } } // add form parameters and file if available. if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { if body != nil { return nil, errors.New("Cannot specify postBody and multipart form at the same time.") } body = &bytes.Buffer{} w := multipart.NewWriter(body) for k, v := range formParams { for _, iv := range v { if strings.HasPrefix(k, "@") { // file err = addFile(w, k[1:], iv) if err != nil { return nil, err } } else { // form value w.WriteField(k, iv) } } } if len(fileBytes) > 0 && fileName != "" { w.Boundary() //_, fileNm := filepath.Split(fileName) part, err := w.CreateFormFile(formFileName, filepath.Base(fileName)) if err != nil { return nil, err } _, err = part.Write(fileBytes) if err != nil { return nil, err } } // Set the Boundary in the Content-Type headerParams["Content-Type"] = w.FormDataContentType() // Set Content-Length headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) w.Close() } if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { if body != nil { return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") } body = &bytes.Buffer{} body.WriteString(formParams.Encode()) // Set Content-Length headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) } // Setup path and query parameters url, err := url.Parse(path) if err != nil { return nil, err } // Override request host, if applicable if c.cfg.Host != "" { url.Host = c.cfg.Host } // Override request scheme, if applicable if c.cfg.Scheme != "" { url.Scheme = c.cfg.Scheme } // Adding Query Param query := url.Query() /* adding default query params */ for k, v := range c.cfg.DefaultQueryParams { if _, ok := queryParams[k]; !ok { queryParams[k] = v } } for k, v := range queryParams { for _, iv := range v { query.Add(k, iv) } } // Encode the parameters. url.RawQuery = query.Encode() // 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.Set(h, v) } localVarRequest.Header = headers } // Add the user agent to the request. localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) if c.cfg.Token != "" { localVarRequest.Header.Add("Authorization", "Bearer "+c.cfg.Token) } else { if c.cfg.Username != "" { localVarRequest.SetBasicAuth(c.cfg.Username, c.cfg.Password) } } if ctx != nil { // add context to the request localVarRequest = localVarRequest.WithContext(ctx) // Walk through any authentication. // OAuth2 authentication if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { // We were able to grab an oauth2 token from the context var latestToken *oauth2.Token if latestToken, err = tok.Token(); err != nil { return nil, err } latestToken.SetAuthHeader(localVarRequest) } // Basic HTTP Authentication if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { localVarRequest.SetBasicAuth(auth.UserName, auth.Password) } // AccessToken Authentication if auth, ok := ctx.Value(ContextAccessToken).(string); ok { localVarRequest.Header.Add("Authorization", "Bearer "+auth) } } 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 xmlCheck.MatchString(contentType) { if err = xml.Unmarshal(b, v); err != nil { return err } return nil } if jsonCheck.MatchString(contentType) { if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined if err = unmarshalObj.UnmarshalJSON(b); err != nil { return err } } else { return errors.New("unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") } } else if err = json.Unmarshal(b, v); err != nil { // simple model return err } return nil } return fmt.Errorf("undefined response type for content %s", contentType) } func (c *APIClient) GetRequestStatus(ctx context.Context, path string) (*RequestStatus, *APIResponse, error) { r, err := c.prepareRequest(ctx, path, http.MethodGet, nil, nil, nil, nil, "", "", nil) if err != nil { return nil, nil, err } resp, httpRequestTime, err := c.callAPI(r) var responseBody = make([]byte, 0) if resp != nil { var errRead error responseBody, errRead = io.ReadAll(resp.Body) _ = resp.Body.Close() if errRead != nil { return nil, nil, errRead } } apiResponse := &APIResponse{ Response: resp, Method: http.MethodGet, RequestTime: httpRequestTime, RequestURL: path, Operation: "GetRequestStatus", } apiResponse.Payload = responseBody if err != nil { return nil, apiResponse, err } status := &RequestStatus{} err = c.decode(status, responseBody, resp.Header.Get("Content-Type")) if err != nil { return nil, apiResponse, err } return status, apiResponse, nil } type ResourceHandler interface { GetMetadata() *DatacenterElementMetadata GetMetadataOk() (*DatacenterElementMetadata, bool) } const ( Available string = "AVAILABLE" Busy = "BUSY" Inactive = "INACTIVE" Deploying = "DEPLOYING" Active = "ACTIVE" Failed = "FAILED" Suspended = "SUSPENDED" FailedSuspended = "FAILED_SUSPENDED" Updating = "UPDATING" FailedUpdating = "FAILED_UPDATING" Destroying = "DESTROYING" FailedDestroying = "FAILED_DESTROYING" Terminated = "TERMINATED" ) type resourceGetCallFn func(apiClient *APIClient, resourceID string) (ResourceHandler, error) type resourceDeleteCallFn func(apiClient *APIClient, resourceID string) (*APIResponse, error) type StateChannel struct { Msg string Err error } type DeleteStateChannel struct { Msg int Err error } // fn() is a function that returns from the API the resource you want to check it's state. // Successful states that can be checked: Available, or Active func (c *APIClient) WaitForState(ctx context.Context, fn resourceGetCallFn, resourceID string) (bool, error) { ticker := time.NewTicker(1 * time.Second) defer ticker.Stop() for { select { case <-ctx.Done(): return false, ctx.Err() case <-ticker.C: resource, err := fn(c, resourceID) if err != nil { return false, fmt.Errorf("error occurred when calling the fn function: %w", err) } if resource == nil { return false, errors.New("fail to get resource") } if metadata := resource.GetMetadata(); metadata != nil { if state, ok := metadata.GetStateOk(); ok && state != nil { if *state == Available || *state == Active { return true, nil } if *state == Failed || *state == FailedSuspended || *state == FailedUpdating { return false, errors.New("state of the resource is " + *state) } } } else { return false, errors.New("metadata could not be retrieved from the fn API call") } } continue } } // fn() is a function that returns from the API the resource you want to check it's state // the channel is of type StateChannel and it represents the state of the resource. Successful states that can be checked: Available, or Active func (c *APIClient) waitForStateWithChanel(ctx context.Context, fn resourceGetCallFn, resourceID string, ch chan<- StateChannel) { ticker := time.NewTicker(1 * time.Second) defer ticker.Stop() done := make(chan bool, 1) for { select { case <-ctx.Done(): ch <- StateChannel{ "", ctx.Err(), } return case <-done: return case <-ticker.C: resource, err := fn(c, resourceID) if err != nil { ch <- StateChannel{ "", fmt.Errorf("error occurred when calling the fn function: %w", err), } } else if resource == nil { ch <- StateChannel{ "", errors.New("fail to get resource"), } } else if metadata := resource.GetMetadata(); metadata != nil { if state, ok := metadata.GetStateOk(); ok && state != nil { if *state == Available || *state == Active { ch <- StateChannel{ *state, nil, } } if *state == Failed || *state == FailedSuspended || *state == FailedUpdating { ch <- StateChannel{ "", errors.New("state of the resource is " + *state), } } } } else { ch <- StateChannel{ "", errors.New("metadata could not be retrieved from the fn API call"), } } done <- true } continue } } // fn() is a function that returns from the API the resource you want to check it's state // the channel is of type StateChannel and it represents the state of the resource. Successful states that can be checked: Available, or Active func (c *APIClient) WaitForStateAsync(ctx context.Context, fn resourceGetCallFn, resourceID string, ch chan<- StateChannel) { go c.waitForStateWithChanel(ctx, fn, resourceID, ch) } // fn() is a function that returns from the API the resource you want to check it's state. // a resource is deleted when status code 404 is returned from the get call to API func (c *APIClient) WaitForDeletion(ctx context.Context, fn resourceDeleteCallFn, resourceID string) (bool, error) { ticker := time.NewTicker(1 * time.Second) defer ticker.Stop() for { select { case <-ctx.Done(): return false, ctx.Err() case <-ticker.C: apiResponse, err := fn(c, resourceID) if err != nil { if apiResponse == nil { return false, fmt.Errorf("fail to get response: %w", err) } if apiResp := apiResponse.Response; apiResp != nil { if apiResp.StatusCode == http.StatusNotFound { return true, nil } } return false, err } } continue } } // fn() is a function that returns from the API the resource you want to check it's state // the channel is of type int and it represents the status response of the resource, which in this case is 404 to check when the resource is not found. func (c *APIClient) waitForDeletionWithChannel(ctx context.Context, fn resourceDeleteCallFn, resourceID string, ch chan<- DeleteStateChannel) { ticker := time.NewTicker(1 * time.Second) defer ticker.Stop() done := make(chan bool, 1) for { select { case <-ctx.Done(): ch <- DeleteStateChannel{ 0, ctx.Err(), } return case <-done: return case <-ticker.C: apiResponse, err := fn(c, resourceID) if err != nil { if apiResponse == nil { ch <- DeleteStateChannel{ 0, fmt.Errorf("API Response from fn is empty: %w ", err), } } else if apiresp := apiResponse.Response; apiresp != nil { if statusCode := apiresp.StatusCode; statusCode == http.StatusNotFound { ch <- DeleteStateChannel{ statusCode, nil, } } else { ch <- DeleteStateChannel{ statusCode, err, } } done <- true } } } continue } } // fn() is a function that returns from the API the resource you want to check it's state // the channel is of type int and it represents the status response of the resource, which in this case is 404 to check when the resource is not found. func (c *APIClient) WaitForDeletionAsync(ctx context.Context, fn resourceDeleteCallFn, resourceID string, ch chan<- DeleteStateChannel) { go c.waitForDeletionWithChannel(ctx, fn, resourceID, ch) } func (c *APIClient) WaitForRequest(ctx context.Context, path string) (*APIResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) // create path and map variables localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} r, err := c.prepareRequest(ctx, path, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } ticker := time.NewTicker(1 * time.Second) defer ticker.Stop() for { resp, httpRequestTime, err := c.callAPI(r) var localVarBody = make([]byte, 0) if resp != nil { var errRead error localVarBody, errRead = io.ReadAll(resp.Body) _ = resp.Body.Close() if errRead != nil { return nil, errRead } } localVarAPIResponse := &APIResponse{ Response: resp, Method: localVarHTTPMethod, RequestTime: httpRequestTime, RequestURL: path, Operation: "WaitForRequest", } localVarAPIResponse.Payload = localVarBody if err != nil { return localVarAPIResponse, err } status := RequestStatus{} err = c.decode(&status, localVarBody, resp.Header.Get("Content-Type")) if err != nil { return localVarAPIResponse, err } if resp.StatusCode != http.StatusOK { msg := fmt.Sprintf("WaitForRequest failed; received status code %d from API", resp.StatusCode) return localVarAPIResponse, NewGenericOpenAPIError(msg, localVarBody, nil, resp.StatusCode) } if status.Metadata != nil && status.Metadata.Status != nil { switch *status.Metadata.Status { case RequestStatusDone: return localVarAPIResponse, nil case RequestStatusFailed: var id = "" var message = "" if status.Id != nil { id = *status.Id } if status.Metadata.Message != nil { message = *status.Metadata.Message } return localVarAPIResponse, fmt.Errorf("Request %s failed: %s", id, message) } } select { case <-ctx.Done(): return nil, ctx.Err() case <-ticker.C: continue } } } // Add a file to the multipart request func addFile(w *multipart.Writer, fieldName, path string) error { file, err := os.Open(path) if err != nil { return err } defer file.Close() part, err := w.CreateFormFile(fieldName, filepath.Base(path)) if err != nil { return err } _, err = io.Copy(part, file) return err } // Prevent trying to import "fmt" func reportError(format string, a ...interface{}) error { return fmt.Errorf(format, a...) } // 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 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\n", contentType) return nil, err } return bodyBuf, nil } // detectContentType method is used to figure out `Request.Body` content type for request header func detectContentType(body interface{}) string { contentType := "text/plain; charset=utf-8" kind := reflect.TypeOf(body).Kind() switch kind { case reflect.Struct, reflect.Map, reflect.Ptr: contentType = "application/json; charset=utf-8" case reflect.String: contentType = "text/plain; charset=utf-8" default: if b, ok := body.([]byte); ok { contentType = http.DetectContentType(b) } else if kind == reflect.Slice { contentType = "application/json; charset=utf-8" } } return contentType } // Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go type cacheControl map[string]string func parseCacheControl(headers http.Header) cacheControl { cc := cacheControl{} ccHeader := headers.Get("Cache-Control") for _, part := range strings.Split(ccHeader, ",") { part = strings.Trim(part, " ") if part == "" { continue } if strings.ContainsRune(part, '=') { keyval := strings.Split(part, "=") cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") } else { cc[part] = "" } } return cc } // CacheExpires helper function to determine remaining time before repeating a request. func CacheExpires(r *http.Response) time.Time { // Figure out when the cache expires. var expires time.Time now, err := time.Parse(time.RFC1123, r.Header.Get("date")) if err != nil { return time.Now() } respCacheControl := parseCacheControl(r.Header) if maxAge, ok := respCacheControl["max-age"]; ok { lifetime, err := time.ParseDuration(maxAge + "s") if err != nil { expires = now } else { expires = now.Add(lifetime) } } else { expiresHeader := r.Header.Get("Expires") if expiresHeader != "" { expires, err = time.Parse(time.RFC1123, expiresHeader) if err != nil { expires = now } } } return expires } func strlen(s string) int { return utf8.RuneCountInString(s) } // GenericOpenAPIError provides access to the body, error and model on returned errors. type GenericOpenAPIError struct { statusCode int body []byte error string model interface{} } // NewGenericOpenAPIError - constructor for GenericOpenAPIError func NewGenericOpenAPIError(message string, body []byte, model interface{}, statusCode int) GenericOpenAPIError { return GenericOpenAPIError{ statusCode: statusCode, body: body, error: message, model: model, } } // Error returns non-empty string if there was an error. func (e GenericOpenAPIError) Error() string { return e.error } // SetError sets the error string func (e *GenericOpenAPIError) SetError(error string) { e.error = error } // Body returns the raw bytes of the response func (e GenericOpenAPIError) Body() []byte { return e.body } // SetBody sets the raw body of the error func (e *GenericOpenAPIError) SetBody(body []byte) { e.body = body } // Model returns the unpacked model of the error func (e GenericOpenAPIError) Model() interface{} { return e.model } // SetModel sets the model of the error func (e *GenericOpenAPIError) SetModel(model interface{}) { e.model = model } // StatusCode returns the status code of the error func (e GenericOpenAPIError) StatusCode() int { return e.statusCode } // SetStatusCode sets the status code of the error func (e *GenericOpenAPIError) SetStatusCode(statusCode int) { e.statusCode = statusCode } golang-github-ionos-cloud-sdk-go-6.2.0/configuration.go000066400000000000000000000240521465267054300230760ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "context" "fmt" "net/http" "net/url" "os" "strconv" "strings" "time" ) const ( IonosUsernameEnvVar = "IONOS_USERNAME" IonosPasswordEnvVar = "IONOS_PASSWORD" IonosTokenEnvVar = "IONOS_TOKEN" IonosApiUrlEnvVar = "IONOS_API_URL" IonosPinnedCertEnvVar = "IONOS_PINNED_CERT" IonosLogLevelEnvVar = "IONOS_LOG_LEVEL" IonosContractNumber = "IONOS_CONTRACT_NUMBER" DefaultIonosServerUrl = "https://api.ionos.com/cloudapi/v6" DefaultIonosBasePath = "/cloudapi/v6" defaultMaxRetries = 3 defaultWaitTime = time.Duration(100) * time.Millisecond defaultMaxWaitTime = time.Duration(2000) * time.Millisecond ) // contextKeys are used to identify the type of value in the context. // Since these are string, it is possible to get a short description of the // context key for logging and debugging using key.String(). type contextKey string func (c contextKey) String() string { return "auth " + string(c) } var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKeys takes a string apikey as authentication for the request ContextAPIKeys = contextKey("apiKeys") // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. ContextHttpSignatureAuth = contextKey("httpsignature") // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") // ContextOperationServerIndices uses a server configuration from the index mapping. ContextOperationServerIndices = contextKey("serverOperationIndices") // ContextServerVariables overrides a server configuration variables. ContextServerVariables = contextKey("serverVariables") // ContextOperationServerVariables overrides a server configuration variables using operation specific values. ContextOperationServerVariables = contextKey("serverOperationVariables") ) // BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` } // APIKey provides API key based authentication to a request passed via context using ContextAPIKey type APIKey struct { Key string Prefix string } // ServerVariable stores the information about a server variable type ServerVariable struct { Description string DefaultValue string EnumValues []string } // ServerConfiguration stores the information about a server type ServerConfiguration struct { URL string Description string Variables map[string]ServerVariable } // ServerConfigurations stores multiple ServerConfiguration items type ServerConfigurations []ServerConfiguration // Configuration stores the configuration of the API client type Configuration struct { Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` DefaultQueryParams url.Values `json:"defaultQueryParams,omitempty"` UserAgent string `json:"userAgent,omitempty"` // Debug is deprecated, will be replaced by LogLevel Debug bool `json:"debug,omitempty"` Servers ServerConfigurations OperationServers map[string]ServerConfigurations HTTPClient *http.Client Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Token string `json:"token,omitempty"` MaxRetries int `json:"maxRetries,omitempty"` WaitTime time.Duration `json:"waitTime,omitempty"` MaxWaitTime time.Duration `json:"maxWaitTime,omitempty"` LogLevel LogLevel Logger Logger } // NewConfiguration returns a new Configuration object func NewConfiguration(username, password, token, hostUrl string) *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), DefaultQueryParams: url.Values{}, UserAgent: "ionos-cloud-sdk-go/v6.2.0", Debug: false, Username: username, Password: password, Token: token, MaxRetries: defaultMaxRetries, MaxWaitTime: defaultMaxWaitTime, WaitTime: defaultWaitTime, Logger: NewDefaultLogger(), LogLevel: getLogLevelFromEnv(), Host: getHost(hostUrl), Scheme: getScheme(hostUrl), Servers: ServerConfigurations{ { URL: getServerUrl(hostUrl), Description: "No description provided", }, }, OperationServers: map[string]ServerConfigurations{}, } return cfg } func NewConfigurationFromEnv() *Configuration { return NewConfiguration(os.Getenv(IonosUsernameEnvVar), os.Getenv(IonosPasswordEnvVar), os.Getenv(IonosTokenEnvVar), os.Getenv(IonosApiUrlEnvVar)) } // SetDepth sets the depth query param for all the requests func (c *Configuration) SetDepth(depth int32) { c.DefaultQueryParams["depth"] = []string{strconv.Itoa(int(depth))} } // AddDefaultHeader adds a new HTTP header to the default header in the request func (c *Configuration) AddDefaultHeader(key string, value string) { c.DefaultHeader[key] = value } func (c *Configuration) AddDefaultQueryParam(key string, value string) { c.DefaultQueryParams[key] = []string{value} } // URL formats template on a index using given variables func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { if index < 0 || len(sc) <= index { return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) } server := sc[index] url := server.URL // go through variables and replace placeholders for name, variable := range server.Variables { if value, ok := variables[name]; ok { found := bool(len(variable.EnumValues) == 0) for _, enumValue := range variable.EnumValues { if value == enumValue { found = true } } if !found { return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) } url = strings.Replace(url, "{"+name+"}", value, -1) } else { url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) } } return url, nil } // ServerURL returns URL based on server settings func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { return c.Servers.URL(index, variables) } func getServerIndex(ctx context.Context) (int, error) { si := ctx.Value(ContextServerIndex) if si != nil { if index, ok := si.(int); ok { return index, nil } return 0, reportError("Invalid type %T should be int", si) } return 0, nil } func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { osi := ctx.Value(ContextOperationServerIndices) if osi != nil { if operationIndices, ok := osi.(map[string]int); !ok { return 0, reportError("Invalid type %T should be map[string]int", osi) } else { index, ok := operationIndices[endpoint] if ok { return index, nil } } } return getServerIndex(ctx) } func getServerVariables(ctx context.Context) (map[string]string, error) { sv := ctx.Value(ContextServerVariables) if sv != nil { if variables, ok := sv.(map[string]string); ok { return variables, nil } return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) } return nil, nil } func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { osv := ctx.Value(ContextOperationServerVariables) if osv != nil { if operationVariables, ok := osv.(map[string]map[string]string); !ok { return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) } else { variables, ok := operationVariables[endpoint] if ok { return variables, nil } } } return getServerVariables(ctx) } func getServerUrl(serverUrl string) string { if serverUrl == "" { return DefaultIonosServerUrl } if !strings.HasPrefix(serverUrl, "https://") && !strings.HasPrefix(serverUrl, "http://") { serverUrl = fmt.Sprintf("https://%s", serverUrl) } if !strings.HasSuffix(serverUrl, DefaultIonosBasePath) { serverUrl = fmt.Sprintf("%s%s", serverUrl, DefaultIonosBasePath) } return serverUrl } func getHost(serverUrl string) string { // url.Parse only interprets the host correctly when the scheme is set, so we prepend one here if needed if !strings.HasPrefix(serverUrl, "https://") && !strings.HasPrefix(serverUrl, "http://") { serverUrl = "http://" + serverUrl } url, err := url.Parse(serverUrl) if err != nil { return "" } return url.Host } func getScheme(serverUrl string) string { url, err := url.Parse(serverUrl) if err != nil { return "" } return url.Scheme } // ServerURLWithContext returns a new server URL given an endpoint func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { sc, ok := c.OperationServers[endpoint] if !ok { sc = c.Servers } if ctx == nil { return sc.URL(0, nil) } index, err := getServerOperationIndex(ctx, endpoint) if err != nil { return "", err } variables, err := getServerOperationVariables(ctx, endpoint) if err != nil { return "", err } return sc.URL(index, variables) } golang-github-ionos-cloud-sdk-go-6.2.0/docs/000077500000000000000000000000001465267054300206255ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/docs/CHANGELOG.md000066400000000000000000000131511465267054300224370ustar00rootroot00000000000000# CHANGELOG ## 6.1.10 (December, 2023) ### Features: - Add `proxyProtocol` parameter for ALB and NLB targets ### Fixes: - Allow setting `Host` and `Scheme` when creating a client with a `serverUrl` (@maxbischoff) ### Enhancements - Remove usage of deprecated `ioutil` package (@avorima) ### Documentation - Move docs for Url with context to `api_doc.mustache` ## 6.1.9 (September, 2023) ### Features: - Support injecting `x-contract-number` header through environment variable. ## 6.1.8 (July, 2023) ### Features: Added support for **IPv6**: - New parameter on `DatacenterProperties`: `Ipv6CidrBlock` - New parameter on `LanProperties` and `LanPropertiesPost`: `Ipv6CidrBlock` - New parameters on `NicProperties`: `Dhcpv6`, `Ipv6CidrBlock` and `Ipv6Ips` More details about IPv6 configuration can be found [here](https://docs.ionos.com/cloud/compute-engine/networks/ipv6). ### Fixes: - Go client backoff now respects context cancellation **Full Changelog**: https://github.com/ionos-cloud/sdk-go/compare/v6.1.7...v6.1.8 ## 6.1.7 (June, 2023) ### Features: - New licenceType supported: **RHEL** ## 6.1.5 (March, 2023) ### Features: - Added generic functions for utility package ### Fixes: - Removed swagger ### Updated: - Library dependencies ## 6.1.4 \(January 26th, 2022\) ### Features: - Added `placementGroupId` and `vnet` parameters. ### Fixes: - Allow multiple values to be set for the same filter key ## 6.1.3 \(August 30th, 2022\) ### Fixes: - Fix return type of NewGenericOpenAPIError ## 6.1.2 \(August 4th, 2022\) ### Fixes : - Changed from `manageDbaas` to `manageDBaaS` field in `model_group_properties.go` : provides privilege for a group to manage DBaaS related functionality. Admin users already have it enabled by default. - Issue #26 ## 6.1.1 \(July 14th, 2022\) ### Features : - Added `manageDbaas` field in `model_group_properties.go` : provides privilege for a group to manage DBaaS related functionality. Admin users already here this enabled by default. - Added `deleteVolumes` to `DatacentersServersDelete` function: If true, all attached storage volumes will also be deleted. - Added `bootOrder` to `model_volume_properties` : Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices. | [optional] [default to 'AUTO'] | - Logger interface with log levels for the sdk. Allows user to inject it's own logger that implements Printf. More information [here](https://github.com/ionos-cloud/sdk-go#debugging) - Added helper function `HttpNotFound` in `response.go` ## 6.1.0 \(June 16th, 2022\) ### Enhancements: * added Application Load Balancer and Target Group, 18 new models and 2 new apis ## v6.0.1 (January, 2022) ### Enhancements: - new parameter on KubernetesClusterProperties, KubernetesClusterPropertiesForPost: **public** - new parameter on KubernetesNodePoolProperties, KubernetesNodePoolPropertiesForPost: **gatewayIp** - allow fields that are explicitly nullable to be sent with null values - updated oauth import - depth parameter: - new method **SetDepth** on **configuration** that allows setting a value for the **depth** parameter on all the API calls for the client - changed the default value of depth parameter from 10 to 0 - this affects the amount of data that is returned on GET methods. If there is a need to change the value, please do it with caution and only if it is needed. ## v6.0.0 (December, 2021) ### Enhancements: * changed structure `ApiK8sNodepoolsPostRequest`, changed name of `kubernetesNodePool` field from `KubernetesNodePool` to `KubernetesNodePoolForPost` * changed structure `ApiK8sNodepoolsPutRequest`, changed type of `KubernetesNodePoolForPut` field from `kubernetesNodePoolForPut` to `kubernetesNodePool` ### Fixes: * fixed sporadic EOF error seen from server * fixed overwriting https with `http` for host endpoint that starts with `http`. It now allows user to enter a url that starts with `http` * added `Password` field to `UserPropertiesPut` to allow user password update ## v6.0.0-beta.9 (November, 2021) ### Enhancements: * added support for `maxResults` query parameter on **GET** requests ### Features: * renamed Apis services: `LansApi` to `LANsApi` * renamed `BackupUnitProperties` to `BackupUnit` on `BackupunitsPatch` method ### Documentation: * updated descriptions ## v6.0.0-beta.8 (October, 2021) ### Enhancements: * improved code in sync with Sonar Cloud requirements: * added global constant `FilterQueryParam` * renamed global constant `FORMAT_STRING` to `FormatStringErr` ## v6.0.0-beta.7 (October, 2021) ### Enhancements: * added support for filter query parameters on **GET** requests: `Filter()` * added support for overwriting the host-url value via `IONOS_API_URL` environment variable * added `gofmt` check's results ## v6.0.0-beta.6 (September, 2021) ### Features: * added Offset, Limit and Links to **_IpBlocks_** * removed Public parameter from **_KubernetesClusterProperties_** * removed GatewayIp parameter from **_KubernetesNodePoolProperties_** ## v6.0.0-beta.5 (September, 2021) ### Features: * added imageAlias to **_VolumeProperties_** * added Offset, Limit and Links to **_User_** * removed gatewayIp parameter from **_KubernetesClusterProperties_** * added GatewayIp parameter from **_KubernetesNodePoolProperties_** golang-github-ionos-cloud-sdk-go-6.2.0/docs/README.md000066400000000000000000000175451465267054300221200ustar00rootroot00000000000000# Introduction ## Overview The IONOS Cloud SDK for GO provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in GO . The SDK for GO wraps the IONOS Cloud API. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response. ## Getting Started Before you begin you will need to have [signed-up](https://www.ionos.com/enterprise-cloud/signup) for a IONOS Cloud account. The credentials you setup during sign-up will be used to authenticate against the API. ### Installation Install the Go language from from the official [Go installation](https://golang.org/doc/install) guide. The `GOPATH` environment variable specifies the location of your Go workspace. It is likely the only environment variable you will need to set when developing Go code. This is an example of pointing to a workspace configured under your home directory: ```text mkdir -p ~/go/bin export GOPATH=~/go export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN ``` The following `go` command will download `sdk-go` to your configured `GOPATH`: ```go go get "github.com/ionos-cloud/sdk-go" ``` The source code of the package will be located here: ```text $GOPATH/src/github.com/ionos-cloud/sdk-go ``` Create main package file _example.go_: ```go package main import ( "fmt" ) func main() { } ``` Include the IONOS Cloud SDK for Go under the list of imports. ```go import( "fmt" "github.com/ionos-cloud/sdk-go" ) ``` ### Authentication The username and passwod or the authentication token can be manually specified when initializing the sdk client: ```go client := ionoscloud.NewAPIClient(ionoscloud.NewConfiguration(username, password, token, apiUrl)) ``` Environment variables can also be used. The sdk uses the following variables: * IONOS\_USERNAME - to specify the username used to login * IONOS\_PASSWORD - to specify the password * IONOS\_TOKEN - if an authentication token is being used * IONOS\_API\_URL - to overwrite the api endpoint: `api.ionos.com` - if it is not set, the default value will be used In this case, the client configuration needs to be initialized using `NewConfigurationFromEnv()` ```go client := ionoscloud.NewAPIClient(ionoscloud.NewConfigurationFromEnv()) ``` **Caution**: You will want to ensure you follow security best practices when using credentials within your code or stored in a file. ### Environment Variables | Environment Variable | Description | |----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `IONOS_USERNAME` | Specify the username used to login, to authenticate against the IONOS Cloud API | | `IONOS_PASSWORD` | Specify the password used to login, to authenticate against the IONOS Cloud API | | `IONOS_TOKEN` | Specify the token used to login, if a token is being used instead of username and password | | `IONOS_API_URL` | Specify the API URL. It will overwrite the API endpoint default value `api.ionos.com`. Note: the host URL does not contain the `/cloudapi/v5` path, so it should _not_ be included in the `IONOS_API_URL` environment variable | ### Depth Many of the _List_ or _Get_ operations will accept an optional _depth_ argument. Setting this to a value between 0 and 5 affects the amount of data that is returned. The details returned vary depending on the resource being queried, however, it generally follows this pattern. | Depth | Description | | :--- | :--- | | 0 | Only direct properties are included. Children are not included. | | 1 | Direct properties and children's references are returned. | | 2 | Direct properties and children's properties are returned. | | 3 | Direct properties, children's properties, and descendant's references are returned. | | 4 | Direct properties, children's properties, and descendant's properties are returned. | | 5 | Returns all available properties. | #### How to set Depth parameter: ⚠️ **_Please use this parameter with caution. We recommend using the default value and raising its value only if it is needed._** * On the configuration level: ```go configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "URL") configuration.SetDepth(5) ``` Using this method, the depth parameter will be set **on all the API calls**. * When calling a method: ```go request := apiClient.DataCentersApi.DatacentersGet(context.Background()).Depth(1) ``` Using this method, the depth parameter will be set **on the current API call**. * Using the default value: If the depth parameter is not set, it will have the default value from the API that can be found [here](https://api.ionos.com/cloudapi/v6/swagger.json). > Note: The priority for setting the depth parameter is: *set on function call > set on configuration level > set using the default value from the API* ### Pretty The operations will also accept an optional _pretty_ argument. Setting this to a value of `true` or `false` controls whether response is pretty-printed \(with indentation and new lines\). By default, the SDK sets the _pretty_ argument to `true`. ### Changing the base URL Changing the base URL for the HTTP operation is possible by using the following function: ```go requestProperties.SetURL("https://api.ionos.com/cloudapi/v6") ``` ## Feature Reference The IONOS Cloud SDK for GO aims to offer access to all resources in the IONOS Cloud API and also offers some additional features that make the integration easier: * authentication for API calls * handling of asynchronous requests ## FAQ 1. How can I open a bug/feature request? Bugs & feature requests can be open on the repository issues: [https://github.com/ionos-cloud/sdk-go/issues/new/choose](https://github.com/ionos-cloud/sdk-go/issues/new/choose) 1. Can I contribute to the GO SDK? Pure SDKs are automatically generated using OpenAPI Generator and don’t support manual changes. If you need changes please open an issue and we’ll try to take care of it. ## Debugging If you want to see the API call request and response messages, you need to set the Debug field in the Configuration struct: ```golang package main import "github.com/ionos-cloud/sdk-go/v5" func main() { // create your configuration. replace username, password, token and url with correct values, or use NewConfigurationFromEnv() // if you have set your env variables as explained above cfg := ionoscloud.NewConfiguration("username", "password", "token", "hostUrl") // enable request and response logging cfg.Debug = true // create you api client with the configuration apiClient := ionoscloud.NewAPIClient(cfg) } ``` ⚠️ **_Note: We recommend you only set this field for debugging purposes. Disable it in your production environments because it can log sensitive data. It logs the full request and response without encryption, even for an HTTPS call. Verbose request and response logging can also significantly impact your application’s performance._** golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/000077500000000000000000000000001465267054300213765ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/ApplicationLoadBalancersApi.md000066400000000000000000002435551465267054300272460ustar00rootroot00000000000000# \ApplicationLoadBalancersApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersApplicationloadbalancersDelete**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersDelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Delete an Application Load Balancer by ID| |[**DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Get an Application Load Balancer by ID| |[**DatacentersApplicationloadbalancersFlowlogsDelete**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersFlowlogsDelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Delete an ALB Flow Log by ID| |[**DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Get an ALB Flow Log by ID| |[**DatacentersApplicationloadbalancersFlowlogsGet**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersFlowlogsGet) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Get ALB Flow Logs| |[**DatacentersApplicationloadbalancersFlowlogsPatch**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersFlowlogsPatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Partially Modify an ALB Flow Log by ID| |[**DatacentersApplicationloadbalancersFlowlogsPost**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersFlowlogsPost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs | Create an ALB Flow Log| |[**DatacentersApplicationloadbalancersFlowlogsPut**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersFlowlogsPut) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} | Modify an ALB Flow Log by ID| |[**DatacentersApplicationloadbalancersForwardingrulesDelete**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersForwardingrulesDelete) | **Delete** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete an ALB Forwarding Rule by ID| |[**DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Get an ALB Forwarding Rule by ID| |[**DatacentersApplicationloadbalancersForwardingrulesGet**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersForwardingrulesGet) | **Get** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Get ALB Forwarding Rules| |[**DatacentersApplicationloadbalancersForwardingrulesPatch**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersForwardingrulesPatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify an ALB Forwarding Rule by ID| |[**DatacentersApplicationloadbalancersForwardingrulesPost**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersForwardingrulesPost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules | Create an ALB Forwarding Rule| |[**DatacentersApplicationloadbalancersForwardingrulesPut**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersForwardingrulesPut) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify an ALB Forwarding Rule by ID| |[**DatacentersApplicationloadbalancersGet**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersGet) | **Get** /datacenters/{datacenterId}/applicationloadbalancers | Get Application Load Balancers| |[**DatacentersApplicationloadbalancersPatch**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersPatch) | **Patch** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Partially Modify an Application Load Balancer by ID| |[**DatacentersApplicationloadbalancersPost**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersPost) | **Post** /datacenters/{datacenterId}/applicationloadbalancers | Create an Application Load Balancer| |[**DatacentersApplicationloadbalancersPut**](ApplicationLoadBalancersApi.md#DatacentersApplicationloadbalancersPut) | **Put** /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} | Modify an Application Load Balancer by ID| ## DatacentersApplicationloadbalancersDelete ```go var result = DatacentersApplicationloadbalancersDelete(ctx, datacenterId, applicationLoadBalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete an Application Load Balancer by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersDelete(context.Background(), datacenterId, applicationLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId ```go var result ApplicationLoadBalancer = DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId(ctx, datacenterId, applicationLoadBalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get an Application Load Balancer by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId(context.Background(), datacenterId, applicationLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId`: ApplicationLoadBalancer fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ApplicationLoadBalancer**](../models/ApplicationLoadBalancer.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersFlowlogsDelete ```go var result = DatacentersApplicationloadbalancersFlowlogsDelete(ctx, datacenterId, applicationLoadBalancerId, flowLogId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete an ALB Flow Log by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. flowLogId := "flowLogId_example" // string | The unique ID of the flow log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsDelete(context.Background(), datacenterId, applicationLoadBalancerId, flowLogId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | |**flowLogId** | **string** | The unique ID of the flow log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersFlowlogsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId ```go var result FlowLog = DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId(ctx, datacenterId, applicationLoadBalancerId, flowLogId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get an ALB Flow Log by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. flowLogId := "flowLogId_example" // string | The unique ID of the flow log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId(context.Background(), datacenterId, applicationLoadBalancerId, flowLogId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId`: FlowLog fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | |**flowLogId** | **string** | The unique ID of the flow log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersFlowlogsGet ```go var result FlowLogs = DatacentersApplicationloadbalancersFlowlogsGet(ctx, datacenterId, applicationLoadBalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get ALB Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsGet(context.Background(), datacenterId, applicationLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersFlowlogsGet`: FlowLogs fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersFlowlogsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FlowLogs**](../models/FlowLogs.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersFlowlogsPatch ```go var result FlowLog = DatacentersApplicationloadbalancersFlowlogsPatch(ctx, datacenterId, applicationLoadBalancerId, flowLogId) .ApplicationLoadBalancerFlowLogProperties(applicationLoadBalancerFlowLogProperties) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially Modify an ALB Flow Log by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. flowLogId := "flowLogId_example" // string | The unique ID of the flow log. applicationLoadBalancerFlowLogProperties := *openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key") // FlowLogProperties | The properties of the ALB flow log to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPatch(context.Background(), datacenterId, applicationLoadBalancerId, flowLogId).ApplicationLoadBalancerFlowLogProperties(applicationLoadBalancerFlowLogProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersFlowlogsPatch`: FlowLog fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | |**flowLogId** | **string** | The unique ID of the flow log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersFlowlogsPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **applicationLoadBalancerFlowLogProperties** | [**FlowLogProperties**](../models/FlowLogProperties.md) | The properties of the ALB flow log to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersFlowlogsPost ```go var result FlowLog = DatacentersApplicationloadbalancersFlowlogsPost(ctx, datacenterId, applicationLoadBalancerId) .ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create an ALB Flow Log ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. applicationLoadBalancerFlowLog := *openapiclient.NewFlowLog(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLog | The flow log to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPost(context.Background(), datacenterId, applicationLoadBalancerId).ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersFlowlogsPost`: FlowLog fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersFlowlogsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **applicationLoadBalancerFlowLog** | [**FlowLog**](../models/FlowLog.md) | The flow log to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersApplicationloadbalancersFlowlogsPut ```go var result FlowLog = DatacentersApplicationloadbalancersFlowlogsPut(ctx, datacenterId, applicationLoadBalancerId, flowLogId) .ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify an ALB Flow Log by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. flowLogId := "flowLogId_example" // string | The unique ID of the flow log. applicationLoadBalancerFlowLog := *openapiclient.NewFlowLogPut(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLogPut | The modified ALB flow log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPut(context.Background(), datacenterId, applicationLoadBalancerId, flowLogId).ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersFlowlogsPut`: FlowLog fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | |**flowLogId** | **string** | The unique ID of the flow log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersFlowlogsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **applicationLoadBalancerFlowLog** | [**FlowLogPut**](../models/FlowLogPut.md) | The modified ALB flow log. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersApplicationloadbalancersForwardingrulesDelete ```go var result = DatacentersApplicationloadbalancersForwardingrulesDelete(ctx, datacenterId, applicationLoadBalancerId, forwardingRuleId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete an ALB Forwarding Rule by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesDelete(context.Background(), datacenterId, applicationLoadBalancerId, forwardingRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | |**forwardingRuleId** | **string** | The unique ID of the forwarding rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersForwardingrulesDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId ```go var result ApplicationLoadBalancerForwardingRule = DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId(ctx, datacenterId, applicationLoadBalancerId, forwardingRuleId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get an ALB Forwarding Rule by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId(context.Background(), datacenterId, applicationLoadBalancerId, forwardingRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId`: ApplicationLoadBalancerForwardingRule fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | |**forwardingRuleId** | **string** | The unique ID of the forwarding rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ApplicationLoadBalancerForwardingRule**](../models/ApplicationLoadBalancerForwardingRule.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersForwardingrulesGet ```go var result ApplicationLoadBalancerForwardingRules = DatacentersApplicationloadbalancersForwardingrulesGet(ctx, datacenterId, applicationLoadBalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get ALB Forwarding Rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesGet(context.Background(), datacenterId, applicationLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersForwardingrulesGet`: ApplicationLoadBalancerForwardingRules fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersForwardingrulesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ApplicationLoadBalancerForwardingRules**](../models/ApplicationLoadBalancerForwardingRules.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersForwardingrulesPatch ```go var result ApplicationLoadBalancerForwardingRule = DatacentersApplicationloadbalancersForwardingrulesPatch(ctx, datacenterId, applicationLoadBalancerId, forwardingRuleId) .ApplicationLoadBalancerForwardingRuleProperties(applicationLoadBalancerForwardingRuleProperties) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify an ALB Forwarding Rule by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule. applicationLoadBalancerForwardingRuleProperties := *openapiclient.NewApplicationLoadBalancerForwardingRuleProperties("My Application Load Balancer forwarding rule", "HTTP", "81.173.1.2", int32(8080)) // ApplicationLoadBalancerForwardingRuleProperties | The properties of the forwarding rule to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPatch(context.Background(), datacenterId, applicationLoadBalancerId, forwardingRuleId).ApplicationLoadBalancerForwardingRuleProperties(applicationLoadBalancerForwardingRuleProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersForwardingrulesPatch`: ApplicationLoadBalancerForwardingRule fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | |**forwardingRuleId** | **string** | The unique ID of the forwarding rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersForwardingrulesPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **applicationLoadBalancerForwardingRuleProperties** | [**ApplicationLoadBalancerForwardingRuleProperties**](../models/ApplicationLoadBalancerForwardingRuleProperties.md) | The properties of the forwarding rule to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ApplicationLoadBalancerForwardingRule**](../models/ApplicationLoadBalancerForwardingRule.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersForwardingrulesPost ```go var result ApplicationLoadBalancerForwardingRule = DatacentersApplicationloadbalancersForwardingrulesPost(ctx, datacenterId, applicationLoadBalancerId) .ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create an ALB Forwarding Rule ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. applicationLoadBalancerForwardingRule := *openapiclient.NewApplicationLoadBalancerForwardingRule(*openapiclient.NewApplicationLoadBalancerForwardingRuleProperties("My Application Load Balancer forwarding rule", "HTTP", "81.173.1.2", int32(8080))) // ApplicationLoadBalancerForwardingRule | The forwarding rule to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPost(context.Background(), datacenterId, applicationLoadBalancerId).ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersForwardingrulesPost`: ApplicationLoadBalancerForwardingRule fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersForwardingrulesPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **applicationLoadBalancerForwardingRule** | [**ApplicationLoadBalancerForwardingRule**](../models/ApplicationLoadBalancerForwardingRule.md) | The forwarding rule to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ApplicationLoadBalancerForwardingRule**](../models/ApplicationLoadBalancerForwardingRule.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersApplicationloadbalancersForwardingrulesPut ```go var result ApplicationLoadBalancerForwardingRule = DatacentersApplicationloadbalancersForwardingrulesPut(ctx, datacenterId, applicationLoadBalancerId, forwardingRuleId) .ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify an ALB Forwarding Rule by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule. applicationLoadBalancerForwardingRule := *openapiclient.NewApplicationLoadBalancerForwardingRulePut(*openapiclient.NewApplicationLoadBalancerForwardingRuleProperties("My Application Load Balancer forwarding rule", "HTTP", "81.173.1.2", int32(8080))) // ApplicationLoadBalancerForwardingRulePut | The modified ALB forwarding rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPut(context.Background(), datacenterId, applicationLoadBalancerId, forwardingRuleId).ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersForwardingrulesPut`: ApplicationLoadBalancerForwardingRule fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | |**forwardingRuleId** | **string** | The unique ID of the forwarding rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersForwardingrulesPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **applicationLoadBalancerForwardingRule** | [**ApplicationLoadBalancerForwardingRulePut**](../models/ApplicationLoadBalancerForwardingRulePut.md) | The modified ALB forwarding rule. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ApplicationLoadBalancerForwardingRule**](../models/ApplicationLoadBalancerForwardingRule.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersApplicationloadbalancersGet ```go var result ApplicationLoadBalancers = DatacentersApplicationloadbalancersGet(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` Get Application Load Balancers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersGet`: ApplicationLoadBalancers fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**ApplicationLoadBalancers**](../models/ApplicationLoadBalancers.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersPatch ```go var result ApplicationLoadBalancer = DatacentersApplicationloadbalancersPatch(ctx, datacenterId, applicationLoadBalancerId) .ApplicationLoadBalancerProperties(applicationLoadBalancerProperties) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially Modify an Application Load Balancer by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. applicationLoadBalancerProperties := *openapiclient.NewApplicationLoadBalancerProperties("My Application Load Balancer", int32(1), int32(2)) // ApplicationLoadBalancerProperties | The Application Load Balancer properties to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPatch(context.Background(), datacenterId, applicationLoadBalancerId).ApplicationLoadBalancerProperties(applicationLoadBalancerProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersPatch`: ApplicationLoadBalancer fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **applicationLoadBalancerProperties** | [**ApplicationLoadBalancerProperties**](../models/ApplicationLoadBalancerProperties.md) | The Application Load Balancer properties to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ApplicationLoadBalancer**](../models/ApplicationLoadBalancer.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersApplicationloadbalancersPost ```go var result ApplicationLoadBalancer = DatacentersApplicationloadbalancersPost(ctx, datacenterId) .ApplicationLoadBalancer(applicationLoadBalancer) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create an Application Load Balancer ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancer := *openapiclient.NewApplicationLoadBalancer(*openapiclient.NewApplicationLoadBalancerProperties("My Application Load Balancer", int32(1), int32(2))) // ApplicationLoadBalancer | The Application Load Balancer to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPost(context.Background(), datacenterId).ApplicationLoadBalancer(applicationLoadBalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersPost`: ApplicationLoadBalancer fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **applicationLoadBalancer** | [**ApplicationLoadBalancer**](../models/ApplicationLoadBalancer.md) | The Application Load Balancer to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ApplicationLoadBalancer**](../models/ApplicationLoadBalancer.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersApplicationloadbalancersPut ```go var result ApplicationLoadBalancer = DatacentersApplicationloadbalancersPut(ctx, datacenterId, applicationLoadBalancerId) .ApplicationLoadBalancer(applicationLoadBalancer) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify an Application Load Balancer by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer. applicationLoadBalancer := *openapiclient.NewApplicationLoadBalancerPut(*openapiclient.NewApplicationLoadBalancerProperties("My Application Load Balancer", int32(1), int32(2))) // ApplicationLoadBalancerPut | The modified Application Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPut(context.Background(), datacenterId, applicationLoadBalancerId).ApplicationLoadBalancer(applicationLoadBalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersApplicationloadbalancersPut`: ApplicationLoadBalancer fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**applicationLoadBalancerId** | **string** | The unique ID of the Application Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersApplicationloadbalancersPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **applicationLoadBalancer** | [**ApplicationLoadBalancerPut**](../models/ApplicationLoadBalancerPut.md) | The modified Application Load Balancer. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ApplicationLoadBalancer**](../models/ApplicationLoadBalancer.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/BackupUnitsApi.md000066400000000000000000000565021465267054300246120ustar00rootroot00000000000000# \BackupUnitsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**BackupunitsDelete**](BackupUnitsApi.md#BackupunitsDelete) | **Delete** /backupunits/{backupunitId} | Delete backup units| |[**BackupunitsFindById**](BackupUnitsApi.md#BackupunitsFindById) | **Get** /backupunits/{backupunitId} | Retrieve backup units| |[**BackupunitsGet**](BackupUnitsApi.md#BackupunitsGet) | **Get** /backupunits | List backup units| |[**BackupunitsPatch**](BackupUnitsApi.md#BackupunitsPatch) | **Patch** /backupunits/{backupunitId} | Partially modify backup units| |[**BackupunitsPost**](BackupUnitsApi.md#BackupunitsPost) | **Post** /backupunits | Create backup units| |[**BackupunitsPut**](BackupUnitsApi.md#BackupunitsPut) | **Put** /backupunits/{backupunitId} | Modify backup units| |[**BackupunitsSsourlGet**](BackupUnitsApi.md#BackupunitsSsourlGet) | **Get** /backupunits/{backupunitId}/ssourl | Retrieve BU single sign-on URLs| ## BackupunitsDelete ```go var result = BackupunitsDelete(ctx, backupunitId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete backup units ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { backupunitId := "backupunitId_example" // string | The unique ID of the backup unit. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.BackupUnitsApi.BackupunitsDelete(context.Background(), backupunitId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**backupunitId** | **string** | The unique ID of the backup unit. | | ### Other Parameters Other parameters are passed through a pointer to a apiBackupunitsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## BackupunitsFindById ```go var result BackupUnit = BackupunitsFindById(ctx, backupunitId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve backup units ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { backupunitId := "backupunitId_example" // string | The unique ID of the backup unit. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.BackupUnitsApi.BackupunitsFindById(context.Background(), backupunitId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `BackupunitsFindById`: BackupUnit fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**backupunitId** | **string** | The unique ID of the backup unit. | | ### Other Parameters Other parameters are passed through a pointer to a apiBackupunitsFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**BackupUnit**](../models/BackupUnit.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## BackupunitsGet ```go var result BackupUnits = BackupunitsGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List backup units ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.BackupUnitsApi.BackupunitsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `BackupunitsGet`: BackupUnits fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiBackupunitsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**BackupUnits**](../models/BackupUnits.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## BackupunitsPatch ```go var result BackupUnit = BackupunitsPatch(ctx, backupunitId) .BackupUnit(backupUnit) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify backup units ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { backupunitId := "backupunitId_example" // string | The unique ID of the backup unit. backupUnit := *openapiclient.NewBackupUnitProperties("BackupUnitName") // BackupUnitProperties | The properties of the backup unit to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.BackupUnitsApi.BackupunitsPatch(context.Background(), backupunitId).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `BackupunitsPatch`: BackupUnit fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**backupunitId** | **string** | The unique ID of the backup unit. | | ### Other Parameters Other parameters are passed through a pointer to a apiBackupunitsPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **backupUnit** | [**BackupUnitProperties**](../models/BackupUnitProperties.md) | The properties of the backup unit to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**BackupUnit**](../models/BackupUnit.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## BackupunitsPost ```go var result BackupUnit = BackupunitsPost(ctx) .BackupUnit(backupUnit) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create backup units ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { backupUnit := *openapiclient.NewBackupUnit(*openapiclient.NewBackupUnitProperties("BackupUnitName")) // BackupUnit | The backup unit to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.BackupUnitsApi.BackupunitsPost(context.Background()).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `BackupunitsPost`: BackupUnit fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsPost`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiBackupunitsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **backupUnit** | [**BackupUnit**](../models/BackupUnit.md) | The backup unit to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**BackupUnit**](../models/BackupUnit.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## BackupunitsPut ```go var result BackupUnit = BackupunitsPut(ctx, backupunitId) .BackupUnit(backupUnit) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify backup units ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { backupunitId := "backupunitId_example" // string | The unique ID of the backup unit. backupUnit := *openapiclient.NewBackupUnit(*openapiclient.NewBackupUnitProperties("BackupUnitName")) // BackupUnit | The modified backup unit. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.BackupUnitsApi.BackupunitsPut(context.Background(), backupunitId).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `BackupunitsPut`: BackupUnit fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**backupunitId** | **string** | The unique ID of the backup unit. | | ### Other Parameters Other parameters are passed through a pointer to a apiBackupunitsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **backupUnit** | [**BackupUnit**](../models/BackupUnit.md) | The modified backup unit. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**BackupUnit**](../models/BackupUnit.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## BackupunitsSsourlGet ```go var result BackupUnitSSO = BackupunitsSsourlGet(ctx, backupunitId) .Pretty(pretty) .XContractNumber(xContractNumber) .Execute() ``` Retrieve BU single sign-on URLs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { backupunitId := "backupunitId_example" // string | The unique ID of the backup unit. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.BackupUnitsApi.BackupunitsSsourlGet(context.Background(), backupunitId).Pretty(pretty).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsSsourlGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `BackupunitsSsourlGet`: BackupUnitSSO fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsSsourlGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**backupunitId** | **string** | The unique ID of the backup unit. | | ### Other Parameters Other parameters are passed through a pointer to a apiBackupunitsSsourlGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**BackupUnitSSO**](../models/BackupUnitSSO.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/ContractResourcesApi.md000066400000000000000000000063151465267054300260270ustar00rootroot00000000000000# \ContractResourcesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**ContractsGet**](ContractResourcesApi.md#ContractsGet) | **Get** /contracts | Get Contract Information| ## ContractsGet ```go var result Contracts = ContractsGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Contract Information ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ContractResourcesApi.ContractsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ContractResourcesApi.ContractsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ContractsGet`: Contracts fmt.Fprintf(os.Stdout, "Response from `ContractResourcesApi.ContractsGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiContractsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Contracts**](../models/Contracts.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/DataCentersApi.md000066400000000000000000000531551465267054300245600ustar00rootroot00000000000000# \DataCentersApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersDelete**](DataCentersApi.md#DatacentersDelete) | **Delete** /datacenters/{datacenterId} | Delete data centers| |[**DatacentersFindById**](DataCentersApi.md#DatacentersFindById) | **Get** /datacenters/{datacenterId} | Retrieve data centers| |[**DatacentersGet**](DataCentersApi.md#DatacentersGet) | **Get** /datacenters | List your data centers| |[**DatacentersPatch**](DataCentersApi.md#DatacentersPatch) | **Patch** /datacenters/{datacenterId} | Partially modify a Data Center by ID| |[**DatacentersPost**](DataCentersApi.md#DatacentersPost) | **Post** /datacenters | Create a Data Center| |[**DatacentersPut**](DataCentersApi.md#DatacentersPut) | **Put** /datacenters/{datacenterId} | Modify a Data Center by ID| ## DatacentersDelete ```go var result = DatacentersDelete(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete data centers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.DataCentersApi.DatacentersDelete(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersFindById ```go var result Datacenter = DatacentersFindById(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve data centers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.DataCentersApi.DatacentersFindById(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersFindById`: Datacenter fmt.Fprintf(os.Stdout, "Response from `DataCentersApi.DatacentersFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Datacenter**](../models/Datacenter.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersGet ```go var result Datacenters = DatacentersGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List your data centers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.DataCentersApi.DatacentersGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersGet`: Datacenters fmt.Fprintf(os.Stdout, "Response from `DataCentersApi.DatacentersGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**Datacenters**](../models/Datacenters.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersPatch ```go var result Datacenter = DatacentersPatch(ctx, datacenterId) .Datacenter(datacenter) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify a Data Center by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. datacenter := *openapiclient.NewDatacenterProperties("us/las") // DatacenterProperties | The properties of the data center to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.DataCentersApi.DatacentersPatch(context.Background(), datacenterId).Datacenter(datacenter).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersPatch`: Datacenter fmt.Fprintf(os.Stdout, "Response from `DataCentersApi.DatacentersPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **datacenter** | [**DatacenterProperties**](../models/DatacenterProperties.md) | The properties of the data center to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Datacenter**](../models/Datacenter.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersPost ```go var result Datacenter = DatacentersPost(ctx) .Datacenter(datacenter) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Data Center ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenter := *openapiclient.NewDatacenter(*openapiclient.NewDatacenterProperties("us/las")) // Datacenter | The data center to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.DataCentersApi.DatacentersPost(context.Background()).Datacenter(datacenter).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersPost`: Datacenter fmt.Fprintf(os.Stdout, "Response from `DataCentersApi.DatacentersPost`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **datacenter** | [**Datacenter**](../models/Datacenter.md) | The data center to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Datacenter**](../models/Datacenter.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersPut ```go var result Datacenter = DatacentersPut(ctx, datacenterId) .Datacenter(datacenter) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Data Center by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. datacenter := *openapiclient.NewDatacenter(*openapiclient.NewDatacenterProperties("us/las")) // Datacenter | The modified data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.DataCentersApi.DatacentersPut(context.Background(), datacenterId).Datacenter(datacenter).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersPut`: Datacenter fmt.Fprintf(os.Stdout, "Response from `DataCentersApi.DatacentersPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **datacenter** | [**Datacenter**](../models/Datacenter.md) | The modified data center. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Datacenter**](../models/Datacenter.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/DefaultApi.md000066400000000000000000000061421465267054300237410ustar00rootroot00000000000000# \DefaultApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**ApiInfoGet**](DefaultApi.md#ApiInfoGet) | **Get** / | Get API information| ## ApiInfoGet ```go var result Info = ApiInfoGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get API information ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.DefaultApi.ApiInfoGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ApiInfoGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ApiInfoGet`: Info fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ApiInfoGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiApiInfoGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Info**](../models/Info.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/FirewallRulesApi.md000066400000000000000000000652021465267054300251370ustar00rootroot00000000000000# \FirewallRulesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersServersNicsFirewallrulesDelete**](FirewallRulesApi.md#DatacentersServersNicsFirewallrulesDelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Delete firewall rules| |[**DatacentersServersNicsFirewallrulesFindById**](FirewallRulesApi.md#DatacentersServersNicsFirewallrulesFindById) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Retrieve firewall rules| |[**DatacentersServersNicsFirewallrulesGet**](FirewallRulesApi.md#DatacentersServersNicsFirewallrulesGet) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | List firewall rules| |[**DatacentersServersNicsFirewallrulesPatch**](FirewallRulesApi.md#DatacentersServersNicsFirewallrulesPatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Partially modify firewall rules| |[**DatacentersServersNicsFirewallrulesPost**](FirewallRulesApi.md#DatacentersServersNicsFirewallrulesPost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules | Create a Firewall Rule| |[**DatacentersServersNicsFirewallrulesPut**](FirewallRulesApi.md#DatacentersServersNicsFirewallrulesPut) | **Put** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} | Modify a Firewall Rule| ## DatacentersServersNicsFirewallrulesDelete ```go var result = DatacentersServersNicsFirewallrulesDelete(ctx, datacenterId, serverId, nicId, firewallruleId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete firewall rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. firewallruleId := "firewallruleId_example" // string | The unique ID of the firewall rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesDelete(context.Background(), datacenterId, serverId, nicId, firewallruleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | |**firewallruleId** | **string** | The unique ID of the firewall rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFirewallrulesDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersNicsFirewallrulesFindById ```go var result FirewallRule = DatacentersServersNicsFirewallrulesFindById(ctx, datacenterId, serverId, nicId, firewallruleId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve firewall rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. firewallruleId := "firewallruleId_example" // string | The unique ID of the firewall rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesFindById(context.Background(), datacenterId, serverId, nicId, firewallruleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFirewallrulesFindById`: FirewallRule fmt.Fprintf(os.Stdout, "Response from `FirewallRulesApi.DatacentersServersNicsFirewallrulesFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | |**firewallruleId** | **string** | The unique ID of the firewall rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFirewallrulesFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FirewallRule**](../models/FirewallRule.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersNicsFirewallrulesGet ```go var result FirewallRules = DatacentersServersNicsFirewallrulesGet(ctx, datacenterId, serverId, nicId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List firewall rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesGet(context.Background(), datacenterId, serverId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFirewallrulesGet`: FirewallRules fmt.Fprintf(os.Stdout, "Response from `FirewallRulesApi.DatacentersServersNicsFirewallrulesGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFirewallrulesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**FirewallRules**](../models/FirewallRules.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersNicsFirewallrulesPatch ```go var result FirewallRule = DatacentersServersNicsFirewallrulesPatch(ctx, datacenterId, serverId, nicId, firewallruleId) .Firewallrule(firewallrule) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify firewall rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. firewallruleId := "firewallruleId_example" // string | The unique ID of the firewall rule. firewallrule := *openapiclient.NewFirewallruleProperties("TCP") // FirewallruleProperties | The properties of the firewall rule to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesPatch(context.Background(), datacenterId, serverId, nicId, firewallruleId).Firewallrule(firewallrule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFirewallrulesPatch`: FirewallRule fmt.Fprintf(os.Stdout, "Response from `FirewallRulesApi.DatacentersServersNicsFirewallrulesPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | |**firewallruleId** | **string** | The unique ID of the firewall rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFirewallrulesPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **firewallrule** | [**FirewallruleProperties**](../models/FirewallruleProperties.md) | The properties of the firewall rule to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FirewallRule**](../models/FirewallRule.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersNicsFirewallrulesPost ```go var result FirewallRule = DatacentersServersNicsFirewallrulesPost(ctx, datacenterId, serverId, nicId) .Firewallrule(firewallrule) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Firewall Rule ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. firewallrule := *openapiclient.NewFirewallRule(*openapiclient.NewFirewallruleProperties("TCP")) // FirewallRule | The firewall rule to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesPost(context.Background(), datacenterId, serverId, nicId).Firewallrule(firewallrule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFirewallrulesPost`: FirewallRule fmt.Fprintf(os.Stdout, "Response from `FirewallRulesApi.DatacentersServersNicsFirewallrulesPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFirewallrulesPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **firewallrule** | [**FirewallRule**](../models/FirewallRule.md) | The firewall rule to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FirewallRule**](../models/FirewallRule.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersNicsFirewallrulesPut ```go var result FirewallRule = DatacentersServersNicsFirewallrulesPut(ctx, datacenterId, serverId, nicId, firewallruleId) .Firewallrule(firewallrule) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Firewall Rule ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. firewallruleId := "firewallruleId_example" // string | The unique ID of the firewall rule. firewallrule := *openapiclient.NewFirewallRule(*openapiclient.NewFirewallruleProperties("TCP")) // FirewallRule | The modified firewall rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesPut(context.Background(), datacenterId, serverId, nicId, firewallruleId).Firewallrule(firewallrule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFirewallrulesPut`: FirewallRule fmt.Fprintf(os.Stdout, "Response from `FirewallRulesApi.DatacentersServersNicsFirewallrulesPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | |**firewallruleId** | **string** | The unique ID of the firewall rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFirewallrulesPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **firewallrule** | [**FirewallRule**](../models/FirewallRule.md) | The modified firewall rule. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FirewallRule**](../models/FirewallRule.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/FlowLogsApi.md000066400000000000000000000567551465267054300241300ustar00rootroot00000000000000# \FlowLogsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersServersNicsFlowlogsDelete**](FlowLogsApi.md#DatacentersServersNicsFlowlogsDelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Delete Flow Logs| |[**DatacentersServersNicsFlowlogsFindById**](FlowLogsApi.md#DatacentersServersNicsFlowlogsFindById) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Retrieve Flow Logs| |[**DatacentersServersNicsFlowlogsGet**](FlowLogsApi.md#DatacentersServersNicsFlowlogsGet) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | List Flow Logs| |[**DatacentersServersNicsFlowlogsPatch**](FlowLogsApi.md#DatacentersServersNicsFlowlogsPatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Partially modify Flow Logs| |[**DatacentersServersNicsFlowlogsPost**](FlowLogsApi.md#DatacentersServersNicsFlowlogsPost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs | Create a Flow Log| |[**DatacentersServersNicsFlowlogsPut**](FlowLogsApi.md#DatacentersServersNicsFlowlogsPut) | **Put** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} | Modify Flow Logs| ## DatacentersServersNicsFlowlogsDelete ```go var result = DatacentersServersNicsFlowlogsDelete(ctx, datacenterId, serverId, nicId, flowlogId) .Pretty(pretty) .Depth(depth) .Execute() ``` Delete Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsDelete(context.Background(), datacenterId, serverId, nicId, flowlogId).Pretty(pretty).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | |**flowlogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFlowlogsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersNicsFlowlogsFindById ```go var result FlowLog = DatacentersServersNicsFlowlogsFindById(ctx, datacenterId, serverId, nicId, flowlogId) .Pretty(pretty) .Depth(depth) .Execute() ``` Retrieve Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsFindById(context.Background(), datacenterId, serverId, nicId, flowlogId).Pretty(pretty).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFlowlogsFindById`: FlowLog fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | |**flowlogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFlowlogsFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersNicsFlowlogsGet ```go var result FlowLogs = DatacentersServersNicsFlowlogsGet(ctx, datacenterId, serverId, nicId) .Pretty(pretty) .Depth(depth) .Offset(offset) .Limit(limit) .Execute() ``` List Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsGet(context.Background(), datacenterId, serverId, nicId).Pretty(pretty).Depth(depth).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFlowlogsGet`: FlowLogs fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFlowlogsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**FlowLogs**](../models/FlowLogs.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersNicsFlowlogsPatch ```go var result FlowLog = DatacentersServersNicsFlowlogsPatch(ctx, datacenterId, serverId, nicId, flowlogId) .Flowlog(flowlog) .Pretty(pretty) .Depth(depth) .Execute() ``` Partially modify Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log. flowlog := *openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key") // FlowLogProperties | The Flow Log record to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsPatch(context.Background(), datacenterId, serverId, nicId, flowlogId).Flowlog(flowlog).Pretty(pretty).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFlowlogsPatch`: FlowLog fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | |**flowlogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFlowlogsPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **flowlog** | [**FlowLogProperties**](../models/FlowLogProperties.md) | The Flow Log record to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersNicsFlowlogsPost ```go var result FlowLog = DatacentersServersNicsFlowlogsPost(ctx, datacenterId, serverId, nicId) .Flowlog(flowlog) .Pretty(pretty) .Depth(depth) .Execute() ``` Create a Flow Log ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. flowlog := *openapiclient.NewFlowLog(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLog | The Flow Log to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsPost(context.Background(), datacenterId, serverId, nicId).Flowlog(flowlog).Pretty(pretty).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFlowlogsPost`: FlowLog fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFlowlogsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **flowlog** | [**FlowLog**](../models/FlowLog.md) | The Flow Log to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersNicsFlowlogsPut ```go var result FlowLog = DatacentersServersNicsFlowlogsPut(ctx, datacenterId, serverId, nicId, flowlogId) .Flowlog(flowlog) .Pretty(pretty) .Depth(depth) .Execute() ``` Modify Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log. flowlog := *openapiclient.NewFlowLogPut(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLogPut | The modified Flow Log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsPut(context.Background(), datacenterId, serverId, nicId, flowlogId).Flowlog(flowlog).Pretty(pretty).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFlowlogsPut`: FlowLog fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | |**flowlogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFlowlogsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **flowlog** | [**FlowLogPut**](../models/FlowLogPut.md) | The modified Flow Log. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/IPBlocksApi.md000066400000000000000000000521271465267054300240270ustar00rootroot00000000000000# \IPBlocksApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**IpblocksDelete**](IPBlocksApi.md#IpblocksDelete) | **Delete** /ipblocks/{ipblockId} | Delete IP blocks| |[**IpblocksFindById**](IPBlocksApi.md#IpblocksFindById) | **Get** /ipblocks/{ipblockId} | Retrieve IP blocks| |[**IpblocksGet**](IPBlocksApi.md#IpblocksGet) | **Get** /ipblocks | List IP blocks | |[**IpblocksPatch**](IPBlocksApi.md#IpblocksPatch) | **Patch** /ipblocks/{ipblockId} | Partially modify IP blocks| |[**IpblocksPost**](IPBlocksApi.md#IpblocksPost) | **Post** /ipblocks | Reserve a IP Block| |[**IpblocksPut**](IPBlocksApi.md#IpblocksPut) | **Put** /ipblocks/{ipblockId} | Modify a IP Block by ID| ## IpblocksDelete ```go var result = IpblocksDelete(ctx, ipblockId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete IP blocks ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { ipblockId := "ipblockId_example" // string | The unique ID of the IP block. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.IPBlocksApi.IpblocksDelete(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**ipblockId** | **string** | The unique ID of the IP block. | | ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## IpblocksFindById ```go var result IpBlock = IpblocksFindById(ctx, ipblockId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve IP blocks ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { ipblockId := "ipblockId_example" // string | The unique ID of the IP block. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.IPBlocksApi.IpblocksFindById(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `IpblocksFindById`: IpBlock fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**ipblockId** | **string** | The unique ID of the IP block. | | ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**IpBlock**](../models/IpBlock.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## IpblocksGet ```go var result IpBlocks = IpblocksGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List IP blocks ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 100) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.IPBlocksApi.IpblocksGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `IpblocksGet`: IpBlocks fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 100]| ### Return type [**IpBlocks**](../models/IpBlocks.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## IpblocksPatch ```go var result IpBlock = IpblocksPatch(ctx, ipblockId) .Ipblock(ipblock) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify IP blocks ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { ipblockId := "ipblockId_example" // string | The unique ID of the IP block. ipblock := *openapiclient.NewIpBlockProperties("us/las", int32(5)) // IpBlockProperties | The properties of the IP block to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.IPBlocksApi.IpblocksPatch(context.Background(), ipblockId).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `IpblocksPatch`: IpBlock fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**ipblockId** | **string** | The unique ID of the IP block. | | ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **ipblock** | [**IpBlockProperties**](../models/IpBlockProperties.md) | The properties of the IP block to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**IpBlock**](../models/IpBlock.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## IpblocksPost ```go var result IpBlock = IpblocksPost(ctx) .Ipblock(ipblock) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Reserve a IP Block ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { ipblock := *openapiclient.NewIpBlock(*openapiclient.NewIpBlockProperties("us/las", int32(5))) // IpBlock | The IP block to be reserved. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.IPBlocksApi.IpblocksPost(context.Background()).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `IpblocksPost`: IpBlock fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPost`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **ipblock** | [**IpBlock**](../models/IpBlock.md) | The IP block to be reserved. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**IpBlock**](../models/IpBlock.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## IpblocksPut ```go var result IpBlock = IpblocksPut(ctx, ipblockId) .Ipblock(ipblock) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a IP Block by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { ipblockId := "ipblockId_example" // string | The unique ID of the IP block. ipblock := *openapiclient.NewIpBlock(*openapiclient.NewIpBlockProperties("us/las", int32(5))) // IpBlock | The modified IP block. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.IPBlocksApi.IpblocksPut(context.Background(), ipblockId).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `IpblocksPut`: IpBlock fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**ipblockId** | **string** | The unique ID of the IP block. | | ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **ipblock** | [**IpBlock**](../models/IpBlock.md) | The modified IP block. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**IpBlock**](../models/IpBlock.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/ImagesApi.md000066400000000000000000000413141465267054300235620ustar00rootroot00000000000000# \ImagesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**ImagesDelete**](ImagesApi.md#ImagesDelete) | **Delete** /images/{imageId} | Delete images| |[**ImagesFindById**](ImagesApi.md#ImagesFindById) | **Get** /images/{imageId} | Retrieve images| |[**ImagesGet**](ImagesApi.md#ImagesGet) | **Get** /images | List images| |[**ImagesPatch**](ImagesApi.md#ImagesPatch) | **Patch** /images/{imageId} | Partially modify images| |[**ImagesPut**](ImagesApi.md#ImagesPut) | **Put** /images/{imageId} | Modify an Image by ID| ## ImagesDelete ```go var result = ImagesDelete(ctx, imageId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete images ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { imageId := "imageId_example" // string | The unique ID of the image. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.ImagesApi.ImagesDelete(context.Background(), imageId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**imageId** | **string** | The unique ID of the image. | | ### Other Parameters Other parameters are passed through a pointer to a apiImagesDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## ImagesFindById ```go var result Image = ImagesFindById(ctx, imageId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve images ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { imageId := "imageId_example" // string | The unique ID of the image. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ImagesApi.ImagesFindById(context.Background(), imageId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ImagesFindById`: Image fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**imageId** | **string** | The unique ID of the image. | | ### Other Parameters Other parameters are passed through a pointer to a apiImagesFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Image**](../models/Image.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## ImagesGet ```go var result Images = ImagesGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List images ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ImagesApi.ImagesGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ImagesGet`: Images fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiImagesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Images**](../models/Images.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## ImagesPatch ```go var result Image = ImagesPatch(ctx, imageId) .Image(image) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify images ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { imageId := "imageId_example" // string | The unique ID of the image. image := *openapiclient.NewImageProperties("LINUX") // ImageProperties | The image properties to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ImagesApi.ImagesPatch(context.Background(), imageId).Image(image).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ImagesPatch`: Image fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**imageId** | **string** | The unique ID of the image. | | ### Other Parameters Other parameters are passed through a pointer to a apiImagesPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **image** | [**ImageProperties**](../models/ImageProperties.md) | The image properties to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Image**](../models/Image.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## ImagesPut ```go var result Image = ImagesPut(ctx, imageId) .Image(image) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify an Image by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { imageId := "imageId_example" // string | The unique ID of the image. image := *openapiclient.NewImage(*openapiclient.NewImageProperties("LINUX")) // Image | The modified image pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ImagesApi.ImagesPut(context.Background(), imageId).Image(image).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ImagesPut`: Image fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**imageId** | **string** | The unique ID of the image. | | ### Other Parameters Other parameters are passed through a pointer to a apiImagesPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **image** | [**Image**](../models/Image.md) | The modified image | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Image**](../models/Image.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/KubernetesApi.md000066400000000000000000001624171465267054300244740ustar00rootroot00000000000000# \KubernetesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**K8sDelete**](KubernetesApi.md#K8sDelete) | **Delete** /k8s/{k8sClusterId} | Delete a Kubernetes Cluster by ID| |[**K8sFindByClusterId**](KubernetesApi.md#K8sFindByClusterId) | **Get** /k8s/{k8sClusterId} | Get a Kubernetes Cluster by ID| |[**K8sGet**](KubernetesApi.md#K8sGet) | **Get** /k8s | Get Kubernetes Clusters| |[**K8sKubeconfigGet**](KubernetesApi.md#K8sKubeconfigGet) | **Get** /k8s/{k8sClusterId}/kubeconfig | Get Kubernetes Configuration File| |[**K8sNodepoolsDelete**](KubernetesApi.md#K8sNodepoolsDelete) | **Delete** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Delete a Kubernetes Node Pool by ID| |[**K8sNodepoolsFindById**](KubernetesApi.md#K8sNodepoolsFindById) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Get a Kubernetes Node Pool by ID| |[**K8sNodepoolsGet**](KubernetesApi.md#K8sNodepoolsGet) | **Get** /k8s/{k8sClusterId}/nodepools | Get Kubernetes Node Pools| |[**K8sNodepoolsNodesDelete**](KubernetesApi.md#K8sNodepoolsNodesDelete) | **Delete** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Delete a Kubernetes Node by ID| |[**K8sNodepoolsNodesFindById**](KubernetesApi.md#K8sNodepoolsNodesFindById) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Get Kubernetes Node by ID| |[**K8sNodepoolsNodesGet**](KubernetesApi.md#K8sNodepoolsNodesGet) | **Get** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes | Get Kubernetes Nodes| |[**K8sNodepoolsNodesReplacePost**](KubernetesApi.md#K8sNodepoolsNodesReplacePost) | **Post** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace | Recreate a Kubernetes Node by ID| |[**K8sNodepoolsPost**](KubernetesApi.md#K8sNodepoolsPost) | **Post** /k8s/{k8sClusterId}/nodepools | Create a Kubernetes Node Pool| |[**K8sNodepoolsPut**](KubernetesApi.md#K8sNodepoolsPut) | **Put** /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Modify a Kubernetes Node Pool by ID| |[**K8sPost**](KubernetesApi.md#K8sPost) | **Post** /k8s | Create a Kubernetes Cluster| |[**K8sPut**](KubernetesApi.md#K8sPut) | **Put** /k8s/{k8sClusterId} | Modify a Kubernetes Cluster by ID| |[**K8sVersionsDefaultGet**](KubernetesApi.md#K8sVersionsDefaultGet) | **Get** /k8s/versions/default | Get Default Kubernetes Version| |[**K8sVersionsGet**](KubernetesApi.md#K8sVersionsGet) | **Get** /k8s/versions | Get Kubernetes Versions| ## K8sDelete ```go var result = K8sDelete(ctx, k8sClusterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete a Kubernetes Cluster by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.KubernetesApi.K8sDelete(context.Background(), k8sClusterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sFindByClusterId ```go var result KubernetesCluster = K8sFindByClusterId(ctx, k8sClusterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get a Kubernetes Cluster by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the K8s cluster to be retrieved. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sFindByClusterId(context.Background(), k8sClusterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sFindByClusterId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sFindByClusterId`: KubernetesCluster fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sFindByClusterId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the K8s cluster to be retrieved. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sFindByClusterIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**KubernetesCluster**](../models/KubernetesCluster.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sGet ```go var result KubernetesClusters = K8sGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Kubernetes Clusters ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sGet`: KubernetesClusters fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiK8sGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**KubernetesClusters**](../models/KubernetesClusters.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sKubeconfigGet ```go var result string = K8sKubeconfigGet(ctx, k8sClusterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Kubernetes Configuration File ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sKubeconfigGet(context.Background(), k8sClusterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sKubeconfigGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sKubeconfigGet`: string fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sKubeconfigGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sKubeconfigGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type **string** ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/yamlapplication/x-yamlapplication/json ## K8sNodepoolsDelete ```go var result = K8sNodepoolsDelete(ctx, k8sClusterId, nodepoolId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete a Kubernetes Node Pool by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.KubernetesApi.K8sNodepoolsDelete(context.Background(), k8sClusterId, nodepoolId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | |**nodepoolId** | **string** | The unique ID of the Kubernetes node pool. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sNodepoolsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sNodepoolsFindById ```go var result KubernetesNodePool = K8sNodepoolsFindById(ctx, k8sClusterId, nodepoolId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get a Kubernetes Node Pool by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsFindById(context.Background(), k8sClusterId, nodepoolId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sNodepoolsFindById`: KubernetesNodePool fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | |**nodepoolId** | **string** | The unique ID of the Kubernetes node pool. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sNodepoolsFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**KubernetesNodePool**](../models/KubernetesNodePool.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sNodepoolsGet ```go var result KubernetesNodePools = K8sNodepoolsGet(ctx, k8sClusterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Kubernetes Node Pools ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsGet(context.Background(), k8sClusterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sNodepoolsGet`: KubernetesNodePools fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sNodepoolsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**KubernetesNodePools**](../models/KubernetesNodePools.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sNodepoolsNodesDelete ```go var result = K8sNodepoolsNodesDelete(ctx, k8sClusterId, nodepoolId, nodeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete a Kubernetes Node by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool. nodeId := "nodeId_example" // string | The unique ID of the Kubernetes node. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.KubernetesApi.K8sNodepoolsNodesDelete(context.Background(), k8sClusterId, nodepoolId, nodeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsNodesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | |**nodepoolId** | **string** | The unique ID of the Kubernetes node pool. | | |**nodeId** | **string** | The unique ID of the Kubernetes node. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sNodepoolsNodesDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sNodepoolsNodesFindById ```go var result KubernetesNode = K8sNodepoolsNodesFindById(ctx, k8sClusterId, nodepoolId, nodeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Kubernetes Node by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool. nodeId := "nodeId_example" // string | The unique ID of the Kubernetes node. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsNodesFindById(context.Background(), k8sClusterId, nodepoolId, nodeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsNodesFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sNodepoolsNodesFindById`: KubernetesNode fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsNodesFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | |**nodepoolId** | **string** | The unique ID of the Kubernetes node pool. | | |**nodeId** | **string** | The unique ID of the Kubernetes node. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sNodepoolsNodesFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**KubernetesNode**](../models/KubernetesNode.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sNodepoolsNodesGet ```go var result KubernetesNodes = K8sNodepoolsNodesGet(ctx, k8sClusterId, nodepoolId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Kubernetes Nodes ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsNodesGet(context.Background(), k8sClusterId, nodepoolId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsNodesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sNodepoolsNodesGet`: KubernetesNodes fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsNodesGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | |**nodepoolId** | **string** | The unique ID of the Kubernetes node pool. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sNodepoolsNodesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**KubernetesNodes**](../models/KubernetesNodes.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sNodepoolsNodesReplacePost ```go var result = K8sNodepoolsNodesReplacePost(ctx, k8sClusterId, nodepoolId, nodeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Recreate a Kubernetes Node by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool. nodeId := "nodeId_example" // string | The unique ID of the Kubernetes node. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsNodesReplacePost(context.Background(), k8sClusterId, nodepoolId, nodeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsNodesReplacePost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | |**nodepoolId** | **string** | The unique ID of the Kubernetes node pool. | | |**nodeId** | **string** | The unique ID of the Kubernetes node. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sNodepoolsNodesReplacePostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sNodepoolsPost ```go var result KubernetesNodePool = K8sNodepoolsPost(ctx, k8sClusterId) .KubernetesNodePool(kubernetesNodePool) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Kubernetes Node Pool ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. kubernetesNodePool := *openapiclient.NewKubernetesNodePoolForPost(*openapiclient.NewKubernetesNodePoolPropertiesForPost("K8s-node-pool", "1e072e52-2ed3-492f-b6b6-c6b116907521", int32(2), "AMD_OPTERON", int32(4), int32(2048), "AUTO", "HDD", int32(100))) // KubernetesNodePoolForPost | The Kubernetes node pool to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsPost(context.Background(), k8sClusterId).KubernetesNodePool(kubernetesNodePool).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sNodepoolsPost`: KubernetesNodePool fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sNodepoolsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **kubernetesNodePool** | [**KubernetesNodePoolForPost**](../models/KubernetesNodePoolForPost.md) | The Kubernetes node pool to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**KubernetesNodePool**](../models/KubernetesNodePool.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## K8sNodepoolsPut ```go var result KubernetesNodePool = K8sNodepoolsPut(ctx, k8sClusterId, nodepoolId) .KubernetesNodePool(kubernetesNodePool) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Kubernetes Node Pool by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool. kubernetesNodePool := *openapiclient.NewKubernetesNodePoolForPut(*openapiclient.NewKubernetesNodePoolPropertiesForPut(int32(2))) // KubernetesNodePoolForPut | Details of the Kubernetes Node Pool pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsPut(context.Background(), k8sClusterId, nodepoolId).KubernetesNodePool(kubernetesNodePool).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sNodepoolsPut`: KubernetesNodePool fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | |**nodepoolId** | **string** | The unique ID of the Kubernetes node pool. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sNodepoolsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **kubernetesNodePool** | [**KubernetesNodePoolForPut**](../models/KubernetesNodePoolForPut.md) | Details of the Kubernetes Node Pool | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**KubernetesNodePool**](../models/KubernetesNodePool.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## K8sPost ```go var result KubernetesCluster = K8sPost(ctx) .KubernetesCluster(kubernetesCluster) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Kubernetes Cluster ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { kubernetesCluster := *openapiclient.NewKubernetesClusterForPost(*openapiclient.NewKubernetesClusterPropertiesForPost("k8s")) // KubernetesClusterForPost | The Kubernetes cluster to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sPost(context.Background()).KubernetesCluster(kubernetesCluster).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sPost`: KubernetesCluster fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sPost`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiK8sPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **kubernetesCluster** | [**KubernetesClusterForPost**](../models/KubernetesClusterForPost.md) | The Kubernetes cluster to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**KubernetesCluster**](../models/KubernetesCluster.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## K8sPut ```go var result KubernetesCluster = K8sPut(ctx, k8sClusterId) .KubernetesCluster(kubernetesCluster) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Kubernetes Cluster by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster. kubernetesCluster := *openapiclient.NewKubernetesClusterForPut(*openapiclient.NewKubernetesClusterPropertiesForPut("k8s")) // KubernetesClusterForPut | The modified Kubernetes cluster. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sPut(context.Background(), k8sClusterId).KubernetesCluster(kubernetesCluster).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sPut`: KubernetesCluster fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**k8sClusterId** | **string** | The unique ID of the Kubernetes cluster. | | ### Other Parameters Other parameters are passed through a pointer to a apiK8sPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **kubernetesCluster** | [**KubernetesClusterForPut**](../models/KubernetesClusterForPut.md) | The modified Kubernetes cluster. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**KubernetesCluster**](../models/KubernetesCluster.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## K8sVersionsDefaultGet ```go var result string = K8sVersionsDefaultGet(ctx) .Execute() ``` Get Default Kubernetes Version ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sVersionsDefaultGet(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sVersionsDefaultGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sVersionsDefaultGet`: string fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sVersionsDefaultGet`: %v\n", resp) } ``` ### Path Parameters This endpoint does not need any parameter. ### Other Parameters Other parameters are passed through a pointer to a apiK8sVersionsDefaultGetRequest struct via the builder pattern ### Return type **string** ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## K8sVersionsGet ```go var result []string = K8sVersionsGet(ctx) .Execute() ``` Get Kubernetes Versions ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.KubernetesApi.K8sVersionsGet(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sVersionsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `K8sVersionsGet`: []string fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sVersionsGet`: %v\n", resp) } ``` ### Path Parameters This endpoint does not need any parameter. ### Other Parameters Other parameters are passed through a pointer to a apiK8sVersionsGetRequest struct via the builder pattern ### Return type **[]string** ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/LANsApi.md000066400000000000000000001047211465267054300231540ustar00rootroot00000000000000# \LANsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersLansDelete**](LANsApi.md#DatacentersLansDelete) | **Delete** /datacenters/{datacenterId}/lans/{lanId} | Delete LANs| |[**DatacentersLansFindById**](LANsApi.md#DatacentersLansFindById) | **Get** /datacenters/{datacenterId}/lans/{lanId} | Retrieve LANs| |[**DatacentersLansGet**](LANsApi.md#DatacentersLansGet) | **Get** /datacenters/{datacenterId}/lans | List LANs| |[**DatacentersLansNicsFindById**](LANsApi.md#DatacentersLansNicsFindById) | **Get** /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId} | Retrieve attached NICs| |[**DatacentersLansNicsGet**](LANsApi.md#DatacentersLansNicsGet) | **Get** /datacenters/{datacenterId}/lans/{lanId}/nics | List LAN members| |[**DatacentersLansNicsPost**](LANsApi.md#DatacentersLansNicsPost) | **Post** /datacenters/{datacenterId}/lans/{lanId}/nics | Attach NICs| |[**DatacentersLansPatch**](LANsApi.md#DatacentersLansPatch) | **Patch** /datacenters/{datacenterId}/lans/{lanId} | Partially modify LANs| |[**DatacentersLansPost**](LANsApi.md#DatacentersLansPost) | **Post** /datacenters/{datacenterId}/lans | Create LANs| |[**DatacentersLansPut**](LANsApi.md#DatacentersLansPut) | **Put** /datacenters/{datacenterId}/lans/{lanId} | Modify LANs| ## DatacentersLansDelete ```go var result = DatacentersLansDelete(ctx, datacenterId, lanId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete LANs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. lanId := "lanId_example" // string | The unique ID of the LAN. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.LANsApi.DatacentersLansDelete(context.Background(), datacenterId, lanId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**lanId** | **string** | The unique ID of the LAN. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLansDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLansFindById ```go var result Lan = DatacentersLansFindById(ctx, datacenterId, lanId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve LANs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. lanId := "lanId_example" // string | The unique ID of the LAN. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LANsApi.DatacentersLansFindById(context.Background(), datacenterId, lanId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLansFindById`: Lan fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**lanId** | **string** | The unique ID of the LAN. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLansFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Lan**](../models/Lan.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLansGet ```go var result Lans = DatacentersLansGet(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List LANs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LANsApi.DatacentersLansGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLansGet`: Lans fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLansGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**Lans**](../models/Lans.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLansNicsFindById ```go var result Nic = DatacentersLansNicsFindById(ctx, datacenterId, lanId, nicId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve attached NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. lanId := "lanId_example" // string | The unique ID of the LAN. nicId := "nicId_example" // string | The unique ID of the NIC. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LANsApi.DatacentersLansNicsFindById(context.Background(), datacenterId, lanId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansNicsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLansNicsFindById`: Nic fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansNicsFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**lanId** | **string** | The unique ID of the LAN. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLansNicsFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Nic**](../models/Nic.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLansNicsGet ```go var result LanNics = DatacentersLansNicsGet(ctx, datacenterId, lanId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List LAN members ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. lanId := "lanId_example" // string | The unique ID of the LAN. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LANsApi.DatacentersLansNicsGet(context.Background(), datacenterId, lanId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansNicsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLansNicsGet`: LanNics fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansNicsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**lanId** | **string** | The unique ID of the LAN. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLansNicsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**LanNics**](../models/LanNics.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLansNicsPost ```go var result Nic = DatacentersLansNicsPost(ctx, datacenterId, lanId) .Nic(nic) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Attach NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. lanId := "lanId_example" // string | The unique ID of the LAN. nic := *openapiclient.NewNic(*openapiclient.NewNicProperties(int32(2))) // Nic | The NIC to be attached. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LANsApi.DatacentersLansNicsPost(context.Background(), datacenterId, lanId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansNicsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLansNicsPost`: Nic fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansNicsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**lanId** | **string** | The unique ID of the LAN. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLansNicsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **nic** | [**Nic**](../models/Nic.md) | The NIC to be attached. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Nic**](../models/Nic.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersLansPatch ```go var result Lan = DatacentersLansPatch(ctx, datacenterId, lanId) .Lan(lan) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify LANs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. lanId := "lanId_example" // string | The unique ID of the LAN. lan := *openapiclient.NewLanProperties() // LanProperties | The properties of the LAN to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LANsApi.DatacentersLansPatch(context.Background(), datacenterId, lanId).Lan(lan).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLansPatch`: Lan fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**lanId** | **string** | The unique ID of the LAN. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLansPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **lan** | [**LanProperties**](../models/LanProperties.md) | The properties of the LAN to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Lan**](../models/Lan.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersLansPost ```go var result Lan = DatacentersLansPost(ctx, datacenterId) .Lan(lan) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create LANs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. lan := *openapiclient.NewLan(*openapiclient.NewLanProperties()) // Lan | The LAN to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LANsApi.DatacentersLansPost(context.Background(), datacenterId).Lan(lan).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLansPost`: Lan fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLansPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **lan** | [**Lan**](../models/Lan.md) | The LAN to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Lan**](../models/Lan.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersLansPut ```go var result Lan = DatacentersLansPut(ctx, datacenterId, lanId) .Lan(lan) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify LANs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. lanId := "lanId_example" // string | The unique ID of the LAN. lan := *openapiclient.NewLan(*openapiclient.NewLanProperties()) // Lan | The modified LAN pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LANsApi.DatacentersLansPut(context.Background(), datacenterId, lanId).Lan(lan).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLansPut`: Lan fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**lanId** | **string** | The unique ID of the LAN. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLansPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **lan** | [**Lan**](../models/Lan.md) | The modified LAN | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Lan**](../models/Lan.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/LabelsApi.md000066400000000000000000003520421465267054300235620ustar00rootroot00000000000000# \LabelsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersLabelsDelete**](LabelsApi.md#DatacentersLabelsDelete) | **Delete** /datacenters/{datacenterId}/labels/{key} | Delete data center labels| |[**DatacentersLabelsFindByKey**](LabelsApi.md#DatacentersLabelsFindByKey) | **Get** /datacenters/{datacenterId}/labels/{key} | Retrieve data center labels| |[**DatacentersLabelsGet**](LabelsApi.md#DatacentersLabelsGet) | **Get** /datacenters/{datacenterId}/labels | List data center labels| |[**DatacentersLabelsPost**](LabelsApi.md#DatacentersLabelsPost) | **Post** /datacenters/{datacenterId}/labels | Create a Data Center Label| |[**DatacentersLabelsPut**](LabelsApi.md#DatacentersLabelsPut) | **Put** /datacenters/{datacenterId}/labels/{key} | Modify a Data Center Label by Key| |[**DatacentersServersLabelsDelete**](LabelsApi.md#DatacentersServersLabelsDelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Delete server labels| |[**DatacentersServersLabelsFindByKey**](LabelsApi.md#DatacentersServersLabelsFindByKey) | **Get** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Retrieve server labels| |[**DatacentersServersLabelsGet**](LabelsApi.md#DatacentersServersLabelsGet) | **Get** /datacenters/{datacenterId}/servers/{serverId}/labels | List server labels| |[**DatacentersServersLabelsPost**](LabelsApi.md#DatacentersServersLabelsPost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/labels | Create a Server Label| |[**DatacentersServersLabelsPut**](LabelsApi.md#DatacentersServersLabelsPut) | **Put** /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Modify a Server Label| |[**DatacentersVolumesLabelsDelete**](LabelsApi.md#DatacentersVolumesLabelsDelete) | **Delete** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Delete volume labels| |[**DatacentersVolumesLabelsFindByKey**](LabelsApi.md#DatacentersVolumesLabelsFindByKey) | **Get** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Retrieve volume labels| |[**DatacentersVolumesLabelsGet**](LabelsApi.md#DatacentersVolumesLabelsGet) | **Get** /datacenters/{datacenterId}/volumes/{volumeId}/labels | List volume labels| |[**DatacentersVolumesLabelsPost**](LabelsApi.md#DatacentersVolumesLabelsPost) | **Post** /datacenters/{datacenterId}/volumes/{volumeId}/labels | Create a Volume Label| |[**DatacentersVolumesLabelsPut**](LabelsApi.md#DatacentersVolumesLabelsPut) | **Put** /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Modify a Volume Label| |[**ImagesLabelsDelete**](LabelsApi.md#ImagesLabelsDelete) | **Delete** /images/{imageId}/labels/{key} | Delete image label| |[**ImagesLabelsFindByKey**](LabelsApi.md#ImagesLabelsFindByKey) | **Get** /images/{imageId}/labels/{key} | Retrieve image labels| |[**ImagesLabelsGet**](LabelsApi.md#ImagesLabelsGet) | **Get** /images/{imageId}/labels | List image labels| |[**ImagesLabelsPost**](LabelsApi.md#ImagesLabelsPost) | **Post** /images/{imageId}/labels | Create an Image Label| |[**ImagesLabelsPut**](LabelsApi.md#ImagesLabelsPut) | **Put** /images/{imageId}/labels/{key} | Modify an Image Label by Key| |[**IpblocksLabelsDelete**](LabelsApi.md#IpblocksLabelsDelete) | **Delete** /ipblocks/{ipblockId}/labels/{key} | Delete IP block labels| |[**IpblocksLabelsFindByKey**](LabelsApi.md#IpblocksLabelsFindByKey) | **Get** /ipblocks/{ipblockId}/labels/{key} | Retrieve IP block labels| |[**IpblocksLabelsGet**](LabelsApi.md#IpblocksLabelsGet) | **Get** /ipblocks/{ipblockId}/labels | List IP block labels| |[**IpblocksLabelsPost**](LabelsApi.md#IpblocksLabelsPost) | **Post** /ipblocks/{ipblockId}/labels | Create IP block labels| |[**IpblocksLabelsPut**](LabelsApi.md#IpblocksLabelsPut) | **Put** /ipblocks/{ipblockId}/labels/{key} | Modify a IP Block Label by ID| |[**LabelsFindByUrn**](LabelsApi.md#LabelsFindByUrn) | **Get** /labels/{labelurn} | Retrieve labels by URN| |[**LabelsGet**](LabelsApi.md#LabelsGet) | **Get** /labels | List labels | |[**SnapshotsLabelsDelete**](LabelsApi.md#SnapshotsLabelsDelete) | **Delete** /snapshots/{snapshotId}/labels/{key} | Delete snapshot labels| |[**SnapshotsLabelsFindByKey**](LabelsApi.md#SnapshotsLabelsFindByKey) | **Get** /snapshots/{snapshotId}/labels/{key} | Retrieve snapshot labels| |[**SnapshotsLabelsGet**](LabelsApi.md#SnapshotsLabelsGet) | **Get** /snapshots/{snapshotId}/labels | List snapshot labels| |[**SnapshotsLabelsPost**](LabelsApi.md#SnapshotsLabelsPost) | **Post** /snapshots/{snapshotId}/labels | Create a Snapshot Label| |[**SnapshotsLabelsPut**](LabelsApi.md#SnapshotsLabelsPut) | **Put** /snapshots/{snapshotId}/labels/{key} | Modify a Snapshot Label by ID| ## DatacentersLabelsDelete ```go var result = DatacentersLabelsDelete(ctx, datacenterId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete data center labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.LabelsApi.DatacentersLabelsDelete(context.Background(), datacenterId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersLabelsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLabelsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLabelsFindByKey ```go var result LabelResource = DatacentersLabelsFindByKey(ctx, datacenterId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve data center labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersLabelsFindByKey(context.Background(), datacenterId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersLabelsFindByKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLabelsFindByKey`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersLabelsFindByKey`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLabelsFindByKeyRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLabelsGet ```go var result LabelResources = DatacentersLabelsGet(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List data center labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersLabelsGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersLabelsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLabelsGet`: LabelResources fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersLabelsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLabelsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResources**](../models/LabelResources.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLabelsPost ```go var result LabelResource = DatacentersLabelsPost(ctx, datacenterId) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Data Center Label ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersLabelsPost(context.Background(), datacenterId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersLabelsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLabelsPost`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersLabelsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLabelsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The label to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersLabelsPut ```go var result LabelResource = DatacentersLabelsPut(ctx, datacenterId, key) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Data Center Label by Key ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. key := "key_example" // string | The label key label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersLabelsPut(context.Background(), datacenterId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersLabelsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLabelsPut`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersLabelsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLabelsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The modified label | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersLabelsDelete ```go var result = DatacentersServersLabelsDelete(ctx, datacenterId, serverId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete server labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.LabelsApi.DatacentersServersLabelsDelete(context.Background(), datacenterId, serverId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersServersLabelsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersLabelsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersLabelsFindByKey ```go var result LabelResource = DatacentersServersLabelsFindByKey(ctx, datacenterId, serverId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve server labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersServersLabelsFindByKey(context.Background(), datacenterId, serverId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersServersLabelsFindByKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersLabelsFindByKey`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersServersLabelsFindByKey`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersLabelsFindByKeyRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersLabelsGet ```go var result LabelResources = DatacentersServersLabelsGet(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List server labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersServersLabelsGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersServersLabelsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersLabelsGet`: LabelResources fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersServersLabelsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersLabelsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResources**](../models/LabelResources.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersLabelsPost ```go var result LabelResource = DatacentersServersLabelsPost(ctx, datacenterId, serverId) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Server Label ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersServersLabelsPost(context.Background(), datacenterId, serverId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersServersLabelsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersLabelsPost`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersServersLabelsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersLabelsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The label to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersLabelsPut ```go var result LabelResource = DatacentersServersLabelsPut(ctx, datacenterId, serverId, key) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Server Label ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. key := "key_example" // string | The label key label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersServersLabelsPut(context.Background(), datacenterId, serverId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersServersLabelsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersLabelsPut`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersServersLabelsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersLabelsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The modified label | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersVolumesLabelsDelete ```go var result = DatacentersVolumesLabelsDelete(ctx, datacenterId, volumeId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete volume labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.LabelsApi.DatacentersVolumesLabelsDelete(context.Background(), datacenterId, volumeId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersVolumesLabelsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesLabelsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersVolumesLabelsFindByKey ```go var result LabelResource = DatacentersVolumesLabelsFindByKey(ctx, datacenterId, volumeId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve volume labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersVolumesLabelsFindByKey(context.Background(), datacenterId, volumeId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersVolumesLabelsFindByKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersVolumesLabelsFindByKey`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersVolumesLabelsFindByKey`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesLabelsFindByKeyRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersVolumesLabelsGet ```go var result LabelResources = DatacentersVolumesLabelsGet(ctx, datacenterId, volumeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List volume labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersVolumesLabelsGet(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersVolumesLabelsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersVolumesLabelsGet`: LabelResources fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersVolumesLabelsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesLabelsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResources**](../models/LabelResources.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersVolumesLabelsPost ```go var result LabelResource = DatacentersVolumesLabelsPost(ctx, datacenterId, volumeId) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Volume Label ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersVolumesLabelsPost(context.Background(), datacenterId, volumeId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersVolumesLabelsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersVolumesLabelsPost`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersVolumesLabelsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesLabelsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The label to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersVolumesLabelsPut ```go var result LabelResource = DatacentersVolumesLabelsPut(ctx, datacenterId, volumeId, key) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Volume Label ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. key := "key_example" // string | The label key label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.DatacentersVolumesLabelsPut(context.Background(), datacenterId, volumeId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersVolumesLabelsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersVolumesLabelsPut`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersVolumesLabelsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesLabelsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The modified label | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## ImagesLabelsDelete ```go var result = ImagesLabelsDelete(ctx, imageId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete image label ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { imageId := "imageId_example" // string | The unique ID of the image. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.LabelsApi.ImagesLabelsDelete(context.Background(), imageId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.ImagesLabelsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**imageId** | **string** | The unique ID of the image. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiImagesLabelsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## ImagesLabelsFindByKey ```go var result LabelResource = ImagesLabelsFindByKey(ctx, imageId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve image labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { imageId := "imageId_example" // string | The unique ID of the image. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.ImagesLabelsFindByKey(context.Background(), imageId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.ImagesLabelsFindByKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ImagesLabelsFindByKey`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.ImagesLabelsFindByKey`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**imageId** | **string** | The unique ID of the image. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiImagesLabelsFindByKeyRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## ImagesLabelsGet ```go var result LabelResources = ImagesLabelsGet(ctx, imageId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List image labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { imageId := "imageId_example" // string | The unique ID of the image. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.ImagesLabelsGet(context.Background(), imageId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.ImagesLabelsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ImagesLabelsGet`: LabelResources fmt.Fprintf(os.Stdout, "Response from `LabelsApi.ImagesLabelsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**imageId** | **string** | The unique ID of the image. | | ### Other Parameters Other parameters are passed through a pointer to a apiImagesLabelsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResources**](../models/LabelResources.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## ImagesLabelsPost ```go var result LabelResource = ImagesLabelsPost(ctx, imageId) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create an Image Label ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { imageId := "imageId_example" // string | The unique ID of the image label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.ImagesLabelsPost(context.Background(), imageId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.ImagesLabelsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ImagesLabelsPost`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.ImagesLabelsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**imageId** | **string** | The unique ID of the image | | ### Other Parameters Other parameters are passed through a pointer to a apiImagesLabelsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The label to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## ImagesLabelsPut ```go var result LabelResource = ImagesLabelsPut(ctx, imageId, key) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify an Image Label by Key ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { imageId := "imageId_example" // string | The unique ID of the image. key := "key_example" // string | The label key label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.ImagesLabelsPut(context.Background(), imageId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.ImagesLabelsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ImagesLabelsPut`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.ImagesLabelsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**imageId** | **string** | The unique ID of the image. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiImagesLabelsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The modified label | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## IpblocksLabelsDelete ```go var result = IpblocksLabelsDelete(ctx, ipblockId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete IP block labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { ipblockId := "ipblockId_example" // string | The unique ID of the IP block. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.LabelsApi.IpblocksLabelsDelete(context.Background(), ipblockId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.IpblocksLabelsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**ipblockId** | **string** | The unique ID of the IP block. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksLabelsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## IpblocksLabelsFindByKey ```go var result LabelResource = IpblocksLabelsFindByKey(ctx, ipblockId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve IP block labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { ipblockId := "ipblockId_example" // string | The unique ID of the IP block. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.IpblocksLabelsFindByKey(context.Background(), ipblockId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.IpblocksLabelsFindByKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `IpblocksLabelsFindByKey`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.IpblocksLabelsFindByKey`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**ipblockId** | **string** | The unique ID of the IP block. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksLabelsFindByKeyRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## IpblocksLabelsGet ```go var result LabelResources = IpblocksLabelsGet(ctx, ipblockId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List IP block labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { ipblockId := "ipblockId_example" // string | The unique ID of the IP block. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.IpblocksLabelsGet(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.IpblocksLabelsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `IpblocksLabelsGet`: LabelResources fmt.Fprintf(os.Stdout, "Response from `LabelsApi.IpblocksLabelsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**ipblockId** | **string** | The unique ID of the IP block. | | ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksLabelsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResources**](../models/LabelResources.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## IpblocksLabelsPost ```go var result LabelResource = IpblocksLabelsPost(ctx, ipblockId) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create IP block labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { ipblockId := "ipblockId_example" // string | The unique ID of the IP block. label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.IpblocksLabelsPost(context.Background(), ipblockId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.IpblocksLabelsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `IpblocksLabelsPost`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.IpblocksLabelsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**ipblockId** | **string** | The unique ID of the IP block. | | ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksLabelsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The label to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## IpblocksLabelsPut ```go var result LabelResource = IpblocksLabelsPut(ctx, ipblockId, key) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a IP Block Label by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { ipblockId := "ipblockId_example" // string | The unique ID of the IP block. key := "key_example" // string | The label key label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.IpblocksLabelsPut(context.Background(), ipblockId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.IpblocksLabelsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `IpblocksLabelsPut`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.IpblocksLabelsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**ipblockId** | **string** | The unique ID of the IP block. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiIpblocksLabelsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The modified label | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## LabelsFindByUrn ```go var result Label = LabelsFindByUrn(ctx, labelurn) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve labels by URN ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { labelurn := "labelurn_example" // string | The label URN; URN is unique for each label, and consists of: urn:label::: pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.LabelsFindByUrn(context.Background(), labelurn).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.LabelsFindByUrn``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `LabelsFindByUrn`: Label fmt.Fprintf(os.Stdout, "Response from `LabelsApi.LabelsFindByUrn`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**labelurn** | **string** | The label URN; URN is unique for each label, and consists of: urn:label:<resource_type>:<resource_uuid>:<key><key> | | ### Other Parameters Other parameters are passed through a pointer to a apiLabelsFindByUrnRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Label**](../models/Label.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## LabelsGet ```go var result Labels = LabelsGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.LabelsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.LabelsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `LabelsGet`: Labels fmt.Fprintf(os.Stdout, "Response from `LabelsApi.LabelsGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiLabelsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Labels**](../models/Labels.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## SnapshotsLabelsDelete ```go var result = SnapshotsLabelsDelete(ctx, snapshotId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete snapshot labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { snapshotId := "snapshotId_example" // string | The unique ID of the snapshot. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.LabelsApi.SnapshotsLabelsDelete(context.Background(), snapshotId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.SnapshotsLabelsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**snapshotId** | **string** | The unique ID of the snapshot. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiSnapshotsLabelsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## SnapshotsLabelsFindByKey ```go var result LabelResource = SnapshotsLabelsFindByKey(ctx, snapshotId, key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve snapshot labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { snapshotId := "snapshotId_example" // string | The unique ID of the snapshot. key := "key_example" // string | The label key pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.SnapshotsLabelsFindByKey(context.Background(), snapshotId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.SnapshotsLabelsFindByKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SnapshotsLabelsFindByKey`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.SnapshotsLabelsFindByKey`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**snapshotId** | **string** | The unique ID of the snapshot. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiSnapshotsLabelsFindByKeyRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## SnapshotsLabelsGet ```go var result LabelResources = SnapshotsLabelsGet(ctx, snapshotId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List snapshot labels ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { snapshotId := "snapshotId_example" // string | The unique ID of the snapshot. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.SnapshotsLabelsGet(context.Background(), snapshotId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.SnapshotsLabelsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SnapshotsLabelsGet`: LabelResources fmt.Fprintf(os.Stdout, "Response from `LabelsApi.SnapshotsLabelsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**snapshotId** | **string** | The unique ID of the snapshot. | | ### Other Parameters Other parameters are passed through a pointer to a apiSnapshotsLabelsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResources**](../models/LabelResources.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## SnapshotsLabelsPost ```go var result LabelResource = SnapshotsLabelsPost(ctx, snapshotId) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Snapshot Label ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { snapshotId := "snapshotId_example" // string | The unique ID of the snapshot. label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.SnapshotsLabelsPost(context.Background(), snapshotId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.SnapshotsLabelsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SnapshotsLabelsPost`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.SnapshotsLabelsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**snapshotId** | **string** | The unique ID of the snapshot. | | ### Other Parameters Other parameters are passed through a pointer to a apiSnapshotsLabelsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The label to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## SnapshotsLabelsPut ```go var result LabelResource = SnapshotsLabelsPut(ctx, snapshotId, key) .Label(label) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Snapshot Label by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { snapshotId := "snapshotId_example" // string | The unique ID of the snapshot. key := "key_example" // string | The label key label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LabelsApi.SnapshotsLabelsPut(context.Background(), snapshotId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.SnapshotsLabelsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SnapshotsLabelsPut`: LabelResource fmt.Fprintf(os.Stdout, "Response from `LabelsApi.SnapshotsLabelsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**snapshotId** | **string** | The unique ID of the snapshot. | | |**key** | **string** | The label key | | ### Other Parameters Other parameters are passed through a pointer to a apiSnapshotsLabelsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **label** | [**LabelResource**](../models/LabelResource.md) | The modified label | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**LabelResource**](../models/LabelResource.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/LoadBalancersApi.md000066400000000000000000001200751465267054300250510ustar00rootroot00000000000000# \LoadBalancersApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersLoadbalancersBalancednicsDelete**](LoadBalancersApi.md#DatacentersLoadbalancersBalancednicsDelete) | **Delete** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Detach balanced NICs| |[**DatacentersLoadbalancersBalancednicsFindByNicId**](LoadBalancersApi.md#DatacentersLoadbalancersBalancednicsFindByNicId) | **Get** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} | Retrieve balanced NICs| |[**DatacentersLoadbalancersBalancednicsGet**](LoadBalancersApi.md#DatacentersLoadbalancersBalancednicsGet) | **Get** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | List balanced NICs| |[**DatacentersLoadbalancersBalancednicsPost**](LoadBalancersApi.md#DatacentersLoadbalancersBalancednicsPost) | **Post** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics | Attach balanced NICs| |[**DatacentersLoadbalancersDelete**](LoadBalancersApi.md#DatacentersLoadbalancersDelete) | **Delete** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Delete Load Balancers| |[**DatacentersLoadbalancersFindById**](LoadBalancersApi.md#DatacentersLoadbalancersFindById) | **Get** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Retrieve Load Balancers| |[**DatacentersLoadbalancersGet**](LoadBalancersApi.md#DatacentersLoadbalancersGet) | **Get** /datacenters/{datacenterId}/loadbalancers | List Load Balancers| |[**DatacentersLoadbalancersPatch**](LoadBalancersApi.md#DatacentersLoadbalancersPatch) | **Patch** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Partially modify Load Balancers| |[**DatacentersLoadbalancersPost**](LoadBalancersApi.md#DatacentersLoadbalancersPost) | **Post** /datacenters/{datacenterId}/loadbalancers | Create a Load Balancer| |[**DatacentersLoadbalancersPut**](LoadBalancersApi.md#DatacentersLoadbalancersPut) | **Put** /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} | Modify a Load Balancer by ID| ## DatacentersLoadbalancersBalancednicsDelete ```go var result = DatacentersLoadbalancersBalancednicsDelete(ctx, datacenterId, loadbalancerId, nicId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Detach balanced NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer. nicId := "nicId_example" // string | The unique ID of the NIC. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersBalancednicsDelete(context.Background(), datacenterId, loadbalancerId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersBalancednicsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**loadbalancerId** | **string** | The unique ID of the Load Balancer. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLoadbalancersBalancednicsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLoadbalancersBalancednicsFindByNicId ```go var result Nic = DatacentersLoadbalancersBalancednicsFindByNicId(ctx, datacenterId, loadbalancerId, nicId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve balanced NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer. nicId := "nicId_example" // string | The unique ID of the NIC. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersBalancednicsFindByNicId(context.Background(), datacenterId, loadbalancerId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersBalancednicsFindByNicId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLoadbalancersBalancednicsFindByNicId`: Nic fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersBalancednicsFindByNicId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**loadbalancerId** | **string** | The unique ID of the Load Balancer. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLoadbalancersBalancednicsFindByNicIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Nic**](../models/Nic.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLoadbalancersBalancednicsGet ```go var result BalancedNics = DatacentersLoadbalancersBalancednicsGet(ctx, datacenterId, loadbalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List balanced NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersBalancednicsGet(context.Background(), datacenterId, loadbalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersBalancednicsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLoadbalancersBalancednicsGet`: BalancedNics fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersBalancednicsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**loadbalancerId** | **string** | The unique ID of the Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLoadbalancersBalancednicsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**BalancedNics**](../models/BalancedNics.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLoadbalancersBalancednicsPost ```go var result Nic = DatacentersLoadbalancersBalancednicsPost(ctx, datacenterId, loadbalancerId) .Nic(nic) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Attach balanced NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer. nic := *openapiclient.NewNic(*openapiclient.NewNicProperties(int32(2))) // Nic | The NIC to be attached. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersBalancednicsPost(context.Background(), datacenterId, loadbalancerId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersBalancednicsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLoadbalancersBalancednicsPost`: Nic fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersBalancednicsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**loadbalancerId** | **string** | The unique ID of the Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLoadbalancersBalancednicsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **nic** | [**Nic**](../models/Nic.md) | The NIC to be attached. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Nic**](../models/Nic.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersLoadbalancersDelete ```go var result = DatacentersLoadbalancersDelete(ctx, datacenterId, loadbalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete Load Balancers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersDelete(context.Background(), datacenterId, loadbalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**loadbalancerId** | **string** | The unique ID of the Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLoadbalancersDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLoadbalancersFindById ```go var result Loadbalancer = DatacentersLoadbalancersFindById(ctx, datacenterId, loadbalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve Load Balancers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersFindById(context.Background(), datacenterId, loadbalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLoadbalancersFindById`: Loadbalancer fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**loadbalancerId** | **string** | The unique ID of the Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLoadbalancersFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Loadbalancer**](../models/Loadbalancer.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLoadbalancersGet ```go var result Loadbalancers = DatacentersLoadbalancersGet(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List Load Balancers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLoadbalancersGet`: Loadbalancers fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLoadbalancersGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**Loadbalancers**](../models/Loadbalancers.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersLoadbalancersPatch ```go var result Loadbalancer = DatacentersLoadbalancersPatch(ctx, datacenterId, loadbalancerId) .Loadbalancer(loadbalancer) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify Load Balancers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer. loadbalancer := *openapiclient.NewLoadbalancerProperties() // LoadbalancerProperties | The properties of the Load Balancer to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersPatch(context.Background(), datacenterId, loadbalancerId).Loadbalancer(loadbalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLoadbalancersPatch`: Loadbalancer fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**loadbalancerId** | **string** | The unique ID of the Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLoadbalancersPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **loadbalancer** | [**LoadbalancerProperties**](../models/LoadbalancerProperties.md) | The properties of the Load Balancer to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Loadbalancer**](../models/Loadbalancer.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersLoadbalancersPost ```go var result Loadbalancer = DatacentersLoadbalancersPost(ctx, datacenterId) .Loadbalancer(loadbalancer) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Load Balancer ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. loadbalancer := *openapiclient.NewLoadbalancer(*openapiclient.NewLoadbalancerProperties()) // Loadbalancer | The Load Balancer to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersPost(context.Background(), datacenterId).Loadbalancer(loadbalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLoadbalancersPost`: Loadbalancer fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLoadbalancersPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **loadbalancer** | [**Loadbalancer**](../models/Loadbalancer.md) | The Load Balancer to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Loadbalancer**](../models/Loadbalancer.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersLoadbalancersPut ```go var result Loadbalancer = DatacentersLoadbalancersPut(ctx, datacenterId, loadbalancerId) .Loadbalancer(loadbalancer) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Load Balancer by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer. loadbalancer := *openapiclient.NewLoadbalancer(*openapiclient.NewLoadbalancerProperties()) // Loadbalancer | The modified Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersPut(context.Background(), datacenterId, loadbalancerId).Loadbalancer(loadbalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersLoadbalancersPut`: Loadbalancer fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**loadbalancerId** | **string** | The unique ID of the Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersLoadbalancersPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **loadbalancer** | [**Loadbalancer**](../models/Loadbalancer.md) | The modified Load Balancer. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Loadbalancer**](../models/Loadbalancer.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/LocationsApi.md000066400000000000000000000244511465267054300243130ustar00rootroot00000000000000# \LocationsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**LocationsFindByRegionId**](LocationsApi.md#LocationsFindByRegionId) | **Get** /locations/{regionId} | Get Locations within a Region| |[**LocationsFindByRegionIdAndId**](LocationsApi.md#LocationsFindByRegionIdAndId) | **Get** /locations/{regionId}/{locationId} | Get Location by ID| |[**LocationsGet**](LocationsApi.md#LocationsGet) | **Get** /locations | Get Locations| ## LocationsFindByRegionId ```go var result Locations = LocationsFindByRegionId(ctx, regionId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Locations within a Region ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { regionId := "regionId_example" // string | The unique ID of the region. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LocationsApi.LocationsFindByRegionId(context.Background(), regionId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LocationsApi.LocationsFindByRegionId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `LocationsFindByRegionId`: Locations fmt.Fprintf(os.Stdout, "Response from `LocationsApi.LocationsFindByRegionId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**regionId** | **string** | The unique ID of the region. | | ### Other Parameters Other parameters are passed through a pointer to a apiLocationsFindByRegionIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Locations**](../models/Locations.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## LocationsFindByRegionIdAndId ```go var result Location = LocationsFindByRegionIdAndId(ctx, regionId, locationId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Location by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { regionId := "regionId_example" // string | The unique ID of the region. locationId := "locationId_example" // string | The unique ID of the location. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LocationsApi.LocationsFindByRegionIdAndId(context.Background(), regionId, locationId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LocationsApi.LocationsFindByRegionIdAndId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `LocationsFindByRegionIdAndId`: Location fmt.Fprintf(os.Stdout, "Response from `LocationsApi.LocationsFindByRegionIdAndId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**regionId** | **string** | The unique ID of the region. | | |**locationId** | **string** | The unique ID of the location. | | ### Other Parameters Other parameters are passed through a pointer to a apiLocationsFindByRegionIdAndIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Location**](../models/Location.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## LocationsGet ```go var result Locations = LocationsGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Locations ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.LocationsApi.LocationsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LocationsApi.LocationsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `LocationsGet`: Locations fmt.Fprintf(os.Stdout, "Response from `LocationsApi.LocationsGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiLocationsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Locations**](../models/Locations.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/NATGatewaysApi.md000066400000000000000000002171451465267054300245130ustar00rootroot00000000000000# \NATGatewaysApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersNatgatewaysDelete**](NATGatewaysApi.md#DatacentersNatgatewaysDelete) | **Delete** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Delete NAT Gateways| |[**DatacentersNatgatewaysFindByNatGatewayId**](NATGatewaysApi.md#DatacentersNatgatewaysFindByNatGatewayId) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Retrieve NAT Gateways| |[**DatacentersNatgatewaysFlowlogsDelete**](NATGatewaysApi.md#DatacentersNatgatewaysFlowlogsDelete) | **Delete** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Delete NAT Gateway Flow Logs| |[**DatacentersNatgatewaysFlowlogsFindByFlowLogId**](NATGatewaysApi.md#DatacentersNatgatewaysFlowlogsFindByFlowLogId) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Retrieve NAT Gateway Flow Logs| |[**DatacentersNatgatewaysFlowlogsGet**](NATGatewaysApi.md#DatacentersNatgatewaysFlowlogsGet) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | List NAT Gateway Flow Logs| |[**DatacentersNatgatewaysFlowlogsPatch**](NATGatewaysApi.md#DatacentersNatgatewaysFlowlogsPatch) | **Patch** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Partially modify NAT Gateway Flow Logs| |[**DatacentersNatgatewaysFlowlogsPost**](NATGatewaysApi.md#DatacentersNatgatewaysFlowlogsPost) | **Post** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs | Create a NAT Gateway Flow Log| |[**DatacentersNatgatewaysFlowlogsPut**](NATGatewaysApi.md#DatacentersNatgatewaysFlowlogsPut) | **Put** /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} | Modify NAT Gateway Flow Logs| |[**DatacentersNatgatewaysGet**](NATGatewaysApi.md#DatacentersNatgatewaysGet) | **Get** /datacenters/{datacenterId}/natgateways | List NAT Gateways| |[**DatacentersNatgatewaysPatch**](NATGatewaysApi.md#DatacentersNatgatewaysPatch) | **Patch** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Partially modify NAT Gateways| |[**DatacentersNatgatewaysPost**](NATGatewaysApi.md#DatacentersNatgatewaysPost) | **Post** /datacenters/{datacenterId}/natgateways | Create a NAT Gateway| |[**DatacentersNatgatewaysPut**](NATGatewaysApi.md#DatacentersNatgatewaysPut) | **Put** /datacenters/{datacenterId}/natgateways/{natGatewayId} | Modify NAT Gateways| |[**DatacentersNatgatewaysRulesDelete**](NATGatewaysApi.md#DatacentersNatgatewaysRulesDelete) | **Delete** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Delete NAT Gateway rules| |[**DatacentersNatgatewaysRulesFindByNatGatewayRuleId**](NATGatewaysApi.md#DatacentersNatgatewaysRulesFindByNatGatewayRuleId) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Retrieve NAT Gateway rules| |[**DatacentersNatgatewaysRulesGet**](NATGatewaysApi.md#DatacentersNatgatewaysRulesGet) | **Get** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | List NAT Gateway rules| |[**DatacentersNatgatewaysRulesPatch**](NATGatewaysApi.md#DatacentersNatgatewaysRulesPatch) | **Patch** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Partially Modify a NAT Gateway Rule by ID| |[**DatacentersNatgatewaysRulesPost**](NATGatewaysApi.md#DatacentersNatgatewaysRulesPost) | **Post** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules | Create a NAT Gateway Rule| |[**DatacentersNatgatewaysRulesPut**](NATGatewaysApi.md#DatacentersNatgatewaysRulesPut) | **Put** /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} | Modify a NAT Gateway Rule by ID| ## DatacentersNatgatewaysDelete ```go var result = DatacentersNatgatewaysDelete(ctx, datacenterId, natGatewayId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete NAT Gateways ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysDelete(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysFindByNatGatewayId ```go var result NatGateway = DatacentersNatgatewaysFindByNatGatewayId(ctx, datacenterId, natGatewayId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve NAT Gateways ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFindByNatGatewayId(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFindByNatGatewayId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysFindByNatGatewayId`: NatGateway fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFindByNatGatewayId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFindByNatGatewayIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NatGateway**](../models/NatGateway.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysFlowlogsDelete ```go var result = DatacentersNatgatewaysFlowlogsDelete(ctx, datacenterId, natGatewayId, flowLogId) .Pretty(pretty) .Depth(depth) .Execute() ``` Delete NAT Gateway Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsDelete(context.Background(), datacenterId, natGatewayId, flowLogId).Pretty(pretty).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | |**flowLogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFlowlogsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysFlowlogsFindByFlowLogId ```go var result FlowLog = DatacentersNatgatewaysFlowlogsFindByFlowLogId(ctx, datacenterId, natGatewayId, flowLogId) .Pretty(pretty) .Depth(depth) .Execute() ``` Retrieve NAT Gateway Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsFindByFlowLogId(context.Background(), datacenterId, natGatewayId, flowLogId).Pretty(pretty).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsFindByFlowLogId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysFlowlogsFindByFlowLogId`: FlowLog fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsFindByFlowLogId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | |**flowLogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFlowlogsFindByFlowLogIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysFlowlogsGet ```go var result FlowLogs = DatacentersNatgatewaysFlowlogsGet(ctx, datacenterId, natGatewayId) .Pretty(pretty) .Depth(depth) .Offset(offset) .Limit(limit) .Execute() ``` List NAT Gateway Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsGet(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysFlowlogsGet`: FlowLogs fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFlowlogsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**FlowLogs**](../models/FlowLogs.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysFlowlogsPatch ```go var result FlowLog = DatacentersNatgatewaysFlowlogsPatch(ctx, datacenterId, natGatewayId, flowLogId) .NatGatewayFlowLogProperties(natGatewayFlowLogProperties) .Pretty(pretty) .Depth(depth) .Execute() ``` Partially modify NAT Gateway Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log. natGatewayFlowLogProperties := *openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key") // FlowLogProperties | The properties of the Flow Log to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsPatch(context.Background(), datacenterId, natGatewayId, flowLogId).NatGatewayFlowLogProperties(natGatewayFlowLogProperties).Pretty(pretty).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysFlowlogsPatch`: FlowLog fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | |**flowLogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFlowlogsPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **natGatewayFlowLogProperties** | [**FlowLogProperties**](../models/FlowLogProperties.md) | The properties of the Flow Log to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysFlowlogsPost ```go var result FlowLog = DatacentersNatgatewaysFlowlogsPost(ctx, datacenterId, natGatewayId) .NatGatewayFlowLog(natGatewayFlowLog) .Pretty(pretty) .Depth(depth) .Execute() ``` Create a NAT Gateway Flow Log ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. natGatewayFlowLog := *openapiclient.NewFlowLog(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLog | The Flow Log to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsPost(context.Background(), datacenterId, natGatewayId).NatGatewayFlowLog(natGatewayFlowLog).Pretty(pretty).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysFlowlogsPost`: FlowLog fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFlowlogsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **natGatewayFlowLog** | [**FlowLog**](../models/FlowLog.md) | The Flow Log to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersNatgatewaysFlowlogsPut ```go var result FlowLog = DatacentersNatgatewaysFlowlogsPut(ctx, datacenterId, natGatewayId, flowLogId) .NatGatewayFlowLog(natGatewayFlowLog) .Pretty(pretty) .Depth(depth) .Execute() ``` Modify NAT Gateway Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log. natGatewayFlowLog := *openapiclient.NewFlowLogPut(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLogPut | The modified NAT Gateway Flow Log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsPut(context.Background(), datacenterId, natGatewayId, flowLogId).NatGatewayFlowLog(natGatewayFlowLog).Pretty(pretty).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysFlowlogsPut`: FlowLog fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | |**flowLogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysFlowlogsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **natGatewayFlowLog** | [**FlowLogPut**](../models/FlowLogPut.md) | The modified NAT Gateway Flow Log. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersNatgatewaysGet ```go var result NatGateways = DatacentersNatgatewaysGet(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List NAT Gateways ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysGet`: NatGateways fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NatGateways**](../models/NatGateways.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysPatch ```go var result NatGateway = DatacentersNatgatewaysPatch(ctx, datacenterId, natGatewayId) .NatGatewayProperties(natGatewayProperties) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify NAT Gateways ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. natGatewayProperties := *openapiclient.NewNatGatewayProperties("My NAT Gateway", []string{"PublicIps_example"}) // NatGatewayProperties | The properties of the NAT Gateway to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysPatch(context.Background(), datacenterId, natGatewayId).NatGatewayProperties(natGatewayProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysPatch`: NatGateway fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **natGatewayProperties** | [**NatGatewayProperties**](../models/NatGatewayProperties.md) | The properties of the NAT Gateway to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NatGateway**](../models/NatGateway.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysPost ```go var result NatGateway = DatacentersNatgatewaysPost(ctx, datacenterId) .NatGateway(natGateway) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a NAT Gateway ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGateway := *openapiclient.NewNatGateway(*openapiclient.NewNatGatewayProperties("My NAT Gateway", []string{"PublicIps_example"})) // NatGateway | The NAT Gateway to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysPost(context.Background(), datacenterId).NatGateway(natGateway).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysPost`: NatGateway fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **natGateway** | [**NatGateway**](../models/NatGateway.md) | The NAT Gateway to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NatGateway**](../models/NatGateway.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersNatgatewaysPut ```go var result NatGateway = DatacentersNatgatewaysPut(ctx, datacenterId, natGatewayId) .NatGateway(natGateway) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify NAT Gateways ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. natGateway := *openapiclient.NewNatGatewayPut(*openapiclient.NewNatGatewayProperties("My NAT Gateway", []string{"PublicIps_example"})) // NatGatewayPut | The modified NAT Gateway. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysPut(context.Background(), datacenterId, natGatewayId).NatGateway(natGateway).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysPut`: NatGateway fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **natGateway** | [**NatGatewayPut**](../models/NatGatewayPut.md) | The modified NAT Gateway. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NatGateway**](../models/NatGateway.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersNatgatewaysRulesDelete ```go var result = DatacentersNatgatewaysRulesDelete(ctx, datacenterId, natGatewayId, natGatewayRuleId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete NAT Gateway rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. natGatewayRuleId := "natGatewayRuleId_example" // string | The unique ID of the NAT Gateway rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesDelete(context.Background(), datacenterId, natGatewayId, natGatewayRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | |**natGatewayRuleId** | **string** | The unique ID of the NAT Gateway rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysRulesDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysRulesFindByNatGatewayRuleId ```go var result NatGatewayRule = DatacentersNatgatewaysRulesFindByNatGatewayRuleId(ctx, datacenterId, natGatewayId, natGatewayRuleId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve NAT Gateway rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. natGatewayRuleId := "natGatewayRuleId_example" // string | The unique ID of the NAT Gateway rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesFindByNatGatewayRuleId(context.Background(), datacenterId, natGatewayId, natGatewayRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesFindByNatGatewayRuleId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysRulesFindByNatGatewayRuleId`: NatGatewayRule fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysRulesFindByNatGatewayRuleId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | |**natGatewayRuleId** | **string** | The unique ID of the NAT Gateway rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NatGatewayRule**](../models/NatGatewayRule.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysRulesGet ```go var result NatGatewayRules = DatacentersNatgatewaysRulesGet(ctx, datacenterId, natGatewayId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List NAT Gateway rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesGet(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysRulesGet`: NatGatewayRules fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysRulesGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysRulesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NatGatewayRules**](../models/NatGatewayRules.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysRulesPatch ```go var result NatGatewayRule = DatacentersNatgatewaysRulesPatch(ctx, datacenterId, natGatewayId, natGatewayRuleId) .NatGatewayRuleProperties(natGatewayRuleProperties) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially Modify a NAT Gateway Rule by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. natGatewayRuleId := "natGatewayRuleId_example" // string | The unique ID of the NAT Gateway rule. natGatewayRuleProperties := *openapiclient.NewNatGatewayRuleProperties("My NAT Gateway rule", "10.0.1.0/24", "192.18.7.17") // NatGatewayRuleProperties | The properties of the NAT Gateway rule to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesPatch(context.Background(), datacenterId, natGatewayId, natGatewayRuleId).NatGatewayRuleProperties(natGatewayRuleProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysRulesPatch`: NatGatewayRule fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysRulesPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | |**natGatewayRuleId** | **string** | The unique ID of the NAT Gateway rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysRulesPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **natGatewayRuleProperties** | [**NatGatewayRuleProperties**](../models/NatGatewayRuleProperties.md) | The properties of the NAT Gateway rule to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NatGatewayRule**](../models/NatGatewayRule.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNatgatewaysRulesPost ```go var result NatGatewayRule = DatacentersNatgatewaysRulesPost(ctx, datacenterId, natGatewayId) .NatGatewayRule(natGatewayRule) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a NAT Gateway Rule ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. natGatewayRule := *openapiclient.NewNatGatewayRule(*openapiclient.NewNatGatewayRuleProperties("My NAT Gateway rule", "10.0.1.0/24", "192.18.7.17")) // NatGatewayRule | The NAT Gateway rule to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesPost(context.Background(), datacenterId, natGatewayId).NatGatewayRule(natGatewayRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysRulesPost`: NatGatewayRule fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysRulesPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysRulesPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **natGatewayRule** | [**NatGatewayRule**](../models/NatGatewayRule.md) | The NAT Gateway rule to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NatGatewayRule**](../models/NatGatewayRule.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersNatgatewaysRulesPut ```go var result NatGatewayRule = DatacentersNatgatewaysRulesPut(ctx, datacenterId, natGatewayId, natGatewayRuleId) .NatGatewayRule(natGatewayRule) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a NAT Gateway Rule by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway. natGatewayRuleId := "natGatewayRuleId_example" // string | The unique ID of the NAT Gateway rule. natGatewayRule := *openapiclient.NewNatGatewayRulePut(*openapiclient.NewNatGatewayRuleProperties("My NAT Gateway rule", "10.0.1.0/24", "192.18.7.17")) // NatGatewayRulePut | The modified NAT Gateway rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesPut(context.Background(), datacenterId, natGatewayId, natGatewayRuleId).NatGatewayRule(natGatewayRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNatgatewaysRulesPut`: NatGatewayRule fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysRulesPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**natGatewayId** | **string** | The unique ID of the NAT Gateway. | | |**natGatewayRuleId** | **string** | The unique ID of the NAT Gateway rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNatgatewaysRulesPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **natGatewayRule** | [**NatGatewayRulePut**](../models/NatGatewayRulePut.md) | The modified NAT Gateway rule. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NatGatewayRule**](../models/NatGatewayRule.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/NetworkInterfacesApi.md000066400000000000000000000603451465267054300260170ustar00rootroot00000000000000# \NetworkInterfacesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersServersNicsDelete**](NetworkInterfacesApi.md#DatacentersServersNicsDelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Delete NICs| |[**DatacentersServersNicsFindById**](NetworkInterfacesApi.md#DatacentersServersNicsFindById) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Retrieve NICs| |[**DatacentersServersNicsGet**](NetworkInterfacesApi.md#DatacentersServersNicsGet) | **Get** /datacenters/{datacenterId}/servers/{serverId}/nics | List NICs| |[**DatacentersServersNicsPatch**](NetworkInterfacesApi.md#DatacentersServersNicsPatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Partially modify NICs| |[**DatacentersServersNicsPost**](NetworkInterfacesApi.md#DatacentersServersNicsPost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/nics | Create a NIC| |[**DatacentersServersNicsPut**](NetworkInterfacesApi.md#DatacentersServersNicsPut) | **Put** /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} | Modify NICs| ## DatacentersServersNicsDelete ```go var result = DatacentersServersNicsDelete(ctx, datacenterId, serverId, nicId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsDelete(context.Background(), datacenterId, serverId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersNicsFindById ```go var result Nic = DatacentersServersNicsFindById(ctx, datacenterId, serverId, nicId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsFindById(context.Background(), datacenterId, serverId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsFindById`: Nic fmt.Fprintf(os.Stdout, "Response from `NetworkInterfacesApi.DatacentersServersNicsFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Nic**](../models/Nic.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersNicsGet ```go var result Nics = DatacentersServersNicsGet(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsGet`: Nics fmt.Fprintf(os.Stdout, "Response from `NetworkInterfacesApi.DatacentersServersNicsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**Nics**](../models/Nics.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersNicsPatch ```go var result Nic = DatacentersServersNicsPatch(ctx, datacenterId, serverId, nicId) .Nic(nic) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. nic := *openapiclient.NewNicProperties(int32(2)) // NicProperties | The properties of the NIC to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsPatch(context.Background(), datacenterId, serverId, nicId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsPatch`: Nic fmt.Fprintf(os.Stdout, "Response from `NetworkInterfacesApi.DatacentersServersNicsPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **nic** | [**NicProperties**](../models/NicProperties.md) | The properties of the NIC to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Nic**](../models/Nic.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersNicsPost ```go var result Nic = DatacentersServersNicsPost(ctx, datacenterId, serverId) .Nic(nic) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a NIC ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nic := *openapiclient.NewNic(*openapiclient.NewNicProperties(int32(2))) // Nic | The NIC to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsPost(context.Background(), datacenterId, serverId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsPost`: Nic fmt.Fprintf(os.Stdout, "Response from `NetworkInterfacesApi.DatacentersServersNicsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **nic** | [**Nic**](../models/Nic.md) | The NIC to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Nic**](../models/Nic.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersNicsPut ```go var result Nic = DatacentersServersNicsPut(ctx, datacenterId, serverId, nicId) .Nic(nic) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify NICs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. nicId := "nicId_example" // string | The unique ID of the NIC. nic := *openapiclient.NewNicPut(*openapiclient.NewNicProperties(int32(2))) // NicPut | The modified NIC pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsPut(context.Background(), datacenterId, serverId, nicId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersNicsPut`: Nic fmt.Fprintf(os.Stdout, "Response from `NetworkInterfacesApi.DatacentersServersNicsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**nicId** | **string** | The unique ID of the NIC. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersNicsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **nic** | [**NicPut**](../models/NicPut.md) | The modified NIC | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Nic**](../models/Nic.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/NetworkLoadBalancersApi.md000066400000000000000000002402231465267054300264210ustar00rootroot00000000000000# \NetworkLoadBalancersApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersNetworkloadbalancersDelete**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersDelete) | **Delete** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Delete Network Load Balancers| |[**DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Retrieve Network Load Balancers| |[**DatacentersNetworkloadbalancersFlowlogsDelete**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersFlowlogsDelete) | **Delete** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Delete NLB Flow Logs| |[**DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Retrieve NLB Flow Logs| |[**DatacentersNetworkloadbalancersFlowlogsGet**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersFlowlogsGet) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | List NLB Flow Logs| |[**DatacentersNetworkloadbalancersFlowlogsPatch**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersFlowlogsPatch) | **Patch** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Partially modify NLB Flow Logs| |[**DatacentersNetworkloadbalancersFlowlogsPost**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersFlowlogsPost) | **Post** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs | Create a NLB Flow Log| |[**DatacentersNetworkloadbalancersFlowlogsPut**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersFlowlogsPut) | **Put** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} | Modify NLB Flow Logs| |[**DatacentersNetworkloadbalancersForwardingrulesDelete**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersForwardingrulesDelete) | **Delete** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Delete NLB forwarding rules| |[**DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Retrieve NLB forwarding rules| |[**DatacentersNetworkloadbalancersForwardingrulesGet**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersForwardingrulesGet) | **Get** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | List NLB forwarding rules| |[**DatacentersNetworkloadbalancersForwardingrulesPatch**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersForwardingrulesPatch) | **Patch** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Partially modify NLB forwarding rules| |[**DatacentersNetworkloadbalancersForwardingrulesPost**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersForwardingrulesPost) | **Post** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules | Create a NLB Forwarding Rule| |[**DatacentersNetworkloadbalancersForwardingrulesPut**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersForwardingrulesPut) | **Put** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} | Modify NLB forwarding rules| |[**DatacentersNetworkloadbalancersGet**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersGet) | **Get** /datacenters/{datacenterId}/networkloadbalancers | List Network Load Balancers| |[**DatacentersNetworkloadbalancersPatch**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersPatch) | **Patch** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Partially modify Network Load Balancers| |[**DatacentersNetworkloadbalancersPost**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersPost) | **Post** /datacenters/{datacenterId}/networkloadbalancers | Create a Network Load Balancer| |[**DatacentersNetworkloadbalancersPut**](NetworkLoadBalancersApi.md#DatacentersNetworkloadbalancersPut) | **Put** /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} | Modify Network Load Balancers| ## DatacentersNetworkloadbalancersDelete ```go var result = DatacentersNetworkloadbalancersDelete(ctx, datacenterId, networkLoadBalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete Network Load Balancers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersDelete(context.Background(), datacenterId, networkLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId ```go var result NetworkLoadBalancer = DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId(ctx, datacenterId, networkLoadBalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve Network Load Balancers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId(context.Background(), datacenterId, networkLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId`: NetworkLoadBalancer fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NetworkLoadBalancer**](../models/NetworkLoadBalancer.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersFlowlogsDelete ```go var result = DatacentersNetworkloadbalancersFlowlogsDelete(ctx, datacenterId, networkLoadBalancerId, flowLogId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete NLB Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsDelete(context.Background(), datacenterId, networkLoadBalancerId, flowLogId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | |**flowLogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersFlowlogsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId ```go var result FlowLog = DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId(ctx, datacenterId, networkLoadBalancerId, flowLogId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve NLB Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId(context.Background(), datacenterId, networkLoadBalancerId, flowLogId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId`: FlowLog fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | |**flowLogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersFlowlogsGet ```go var result FlowLogs = DatacentersNetworkloadbalancersFlowlogsGet(ctx, datacenterId, networkLoadBalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List NLB Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsGet(context.Background(), datacenterId, networkLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersFlowlogsGet`: FlowLogs fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersFlowlogsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FlowLogs**](../models/FlowLogs.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersFlowlogsPatch ```go var result FlowLog = DatacentersNetworkloadbalancersFlowlogsPatch(ctx, datacenterId, networkLoadBalancerId, flowLogId) .NetworkLoadBalancerFlowLogProperties(networkLoadBalancerFlowLogProperties) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify NLB Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log. networkLoadBalancerFlowLogProperties := *openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key") // FlowLogProperties | The properties of the Flow Log to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPatch(context.Background(), datacenterId, networkLoadBalancerId, flowLogId).NetworkLoadBalancerFlowLogProperties(networkLoadBalancerFlowLogProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersFlowlogsPatch`: FlowLog fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | |**flowLogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersFlowlogsPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **networkLoadBalancerFlowLogProperties** | [**FlowLogProperties**](../models/FlowLogProperties.md) | The properties of the Flow Log to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersFlowlogsPost ```go var result FlowLog = DatacentersNetworkloadbalancersFlowlogsPost(ctx, datacenterId, networkLoadBalancerId) .NetworkLoadBalancerFlowLog(networkLoadBalancerFlowLog) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a NLB Flow Log ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. networkLoadBalancerFlowLog := *openapiclient.NewFlowLog(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLog | The Flow Log to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPost(context.Background(), datacenterId, networkLoadBalancerId).NetworkLoadBalancerFlowLog(networkLoadBalancerFlowLog).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersFlowlogsPost`: FlowLog fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersFlowlogsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **networkLoadBalancerFlowLog** | [**FlowLog**](../models/FlowLog.md) | The Flow Log to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersNetworkloadbalancersFlowlogsPut ```go var result FlowLog = DatacentersNetworkloadbalancersFlowlogsPut(ctx, datacenterId, networkLoadBalancerId, flowLogId) .NetworkLoadBalancerFlowLog(networkLoadBalancerFlowLog) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify NLB Flow Logs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log. networkLoadBalancerFlowLog := *openapiclient.NewFlowLogPut(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLogPut | The modified NLB Flow Log. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPut(context.Background(), datacenterId, networkLoadBalancerId, flowLogId).NetworkLoadBalancerFlowLog(networkLoadBalancerFlowLog).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersFlowlogsPut`: FlowLog fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | |**flowLogId** | **string** | The unique ID of the Flow Log. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersFlowlogsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **networkLoadBalancerFlowLog** | [**FlowLogPut**](../models/FlowLogPut.md) | The modified NLB Flow Log. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**FlowLog**](../models/FlowLog.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersNetworkloadbalancersForwardingrulesDelete ```go var result = DatacentersNetworkloadbalancersForwardingrulesDelete(ctx, datacenterId, networkLoadBalancerId, forwardingRuleId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete NLB forwarding rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesDelete(context.Background(), datacenterId, networkLoadBalancerId, forwardingRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | |**forwardingRuleId** | **string** | The unique ID of the forwarding rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersForwardingrulesDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId ```go var result NetworkLoadBalancerForwardingRule = DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId(ctx, datacenterId, networkLoadBalancerId, forwardingRuleId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve NLB forwarding rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId(context.Background(), datacenterId, networkLoadBalancerId, forwardingRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId`: NetworkLoadBalancerForwardingRule fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | |**forwardingRuleId** | **string** | The unique ID of the forwarding rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NetworkLoadBalancerForwardingRule**](../models/NetworkLoadBalancerForwardingRule.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersForwardingrulesGet ```go var result NetworkLoadBalancerForwardingRules = DatacentersNetworkloadbalancersForwardingrulesGet(ctx, datacenterId, networkLoadBalancerId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List NLB forwarding rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesGet(context.Background(), datacenterId, networkLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersForwardingrulesGet`: NetworkLoadBalancerForwardingRules fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersForwardingrulesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NetworkLoadBalancerForwardingRules**](../models/NetworkLoadBalancerForwardingRules.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersForwardingrulesPatch ```go var result NetworkLoadBalancerForwardingRule = DatacentersNetworkloadbalancersForwardingrulesPatch(ctx, datacenterId, networkLoadBalancerId, forwardingRuleId) .NetworkLoadBalancerForwardingRuleProperties(networkLoadBalancerForwardingRuleProperties) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify NLB forwarding rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule. networkLoadBalancerForwardingRuleProperties := *openapiclient.NewNetworkLoadBalancerForwardingRuleProperties("My Network Load Balancer forwarding rule", "ROUND_ROBIN", "HTTP", "81.173.1.2", int32(8080), []openapiclient.NetworkLoadBalancerForwardingRuleTarget{*openapiclient.NewNetworkLoadBalancerForwardingRuleTarget("22.231.2.2", int32(8080), int32(123))}) // NetworkLoadBalancerForwardingRuleProperties | The properties of the forwarding rule to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPatch(context.Background(), datacenterId, networkLoadBalancerId, forwardingRuleId).NetworkLoadBalancerForwardingRuleProperties(networkLoadBalancerForwardingRuleProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersForwardingrulesPatch`: NetworkLoadBalancerForwardingRule fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | |**forwardingRuleId** | **string** | The unique ID of the forwarding rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersForwardingrulesPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **networkLoadBalancerForwardingRuleProperties** | [**NetworkLoadBalancerForwardingRuleProperties**](../models/NetworkLoadBalancerForwardingRuleProperties.md) | The properties of the forwarding rule to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NetworkLoadBalancerForwardingRule**](../models/NetworkLoadBalancerForwardingRule.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersForwardingrulesPost ```go var result NetworkLoadBalancerForwardingRule = DatacentersNetworkloadbalancersForwardingrulesPost(ctx, datacenterId, networkLoadBalancerId) .NetworkLoadBalancerForwardingRule(networkLoadBalancerForwardingRule) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a NLB Forwarding Rule ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. networkLoadBalancerForwardingRule := *openapiclient.NewNetworkLoadBalancerForwardingRule(*openapiclient.NewNetworkLoadBalancerForwardingRuleProperties("My Network Load Balancer forwarding rule", "ROUND_ROBIN", "HTTP", "81.173.1.2", int32(8080), []openapiclient.NetworkLoadBalancerForwardingRuleTarget{*openapiclient.NewNetworkLoadBalancerForwardingRuleTarget("22.231.2.2", int32(8080), int32(123))})) // NetworkLoadBalancerForwardingRule | The forwarding rule to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPost(context.Background(), datacenterId, networkLoadBalancerId).NetworkLoadBalancerForwardingRule(networkLoadBalancerForwardingRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersForwardingrulesPost`: NetworkLoadBalancerForwardingRule fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersForwardingrulesPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **networkLoadBalancerForwardingRule** | [**NetworkLoadBalancerForwardingRule**](../models/NetworkLoadBalancerForwardingRule.md) | The forwarding rule to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NetworkLoadBalancerForwardingRule**](../models/NetworkLoadBalancerForwardingRule.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersNetworkloadbalancersForwardingrulesPut ```go var result NetworkLoadBalancerForwardingRule = DatacentersNetworkloadbalancersForwardingrulesPut(ctx, datacenterId, networkLoadBalancerId, forwardingRuleId) .NetworkLoadBalancerForwardingRule(networkLoadBalancerForwardingRule) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify NLB forwarding rules ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule. networkLoadBalancerForwardingRule := *openapiclient.NewNetworkLoadBalancerForwardingRulePut(*openapiclient.NewNetworkLoadBalancerForwardingRuleProperties("My Network Load Balancer forwarding rule", "ROUND_ROBIN", "HTTP", "81.173.1.2", int32(8080), []openapiclient.NetworkLoadBalancerForwardingRuleTarget{*openapiclient.NewNetworkLoadBalancerForwardingRuleTarget("22.231.2.2", int32(8080), int32(123))})) // NetworkLoadBalancerForwardingRulePut | The modified NLB forwarding rule. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPut(context.Background(), datacenterId, networkLoadBalancerId, forwardingRuleId).NetworkLoadBalancerForwardingRule(networkLoadBalancerForwardingRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersForwardingrulesPut`: NetworkLoadBalancerForwardingRule fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | |**forwardingRuleId** | **string** | The unique ID of the forwarding rule. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersForwardingrulesPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **networkLoadBalancerForwardingRule** | [**NetworkLoadBalancerForwardingRulePut**](../models/NetworkLoadBalancerForwardingRulePut.md) | The modified NLB forwarding rule. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NetworkLoadBalancerForwardingRule**](../models/NetworkLoadBalancerForwardingRule.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersNetworkloadbalancersGet ```go var result NetworkLoadBalancers = DatacentersNetworkloadbalancersGet(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List Network Load Balancers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersGet`: NetworkLoadBalancers fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**NetworkLoadBalancers**](../models/NetworkLoadBalancers.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersPatch ```go var result NetworkLoadBalancer = DatacentersNetworkloadbalancersPatch(ctx, datacenterId, networkLoadBalancerId) .NetworkLoadBalancerProperties(networkLoadBalancerProperties) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify Network Load Balancers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. networkLoadBalancerProperties := *openapiclient.NewNetworkLoadBalancerProperties("My Network Load Balancer", int32(1), int32(2)) // NetworkLoadBalancerProperties | The properties of the Network Load Balancer to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPatch(context.Background(), datacenterId, networkLoadBalancerId).NetworkLoadBalancerProperties(networkLoadBalancerProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersPatch`: NetworkLoadBalancer fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **networkLoadBalancerProperties** | [**NetworkLoadBalancerProperties**](../models/NetworkLoadBalancerProperties.md) | The properties of the Network Load Balancer to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NetworkLoadBalancer**](../models/NetworkLoadBalancer.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersNetworkloadbalancersPost ```go var result NetworkLoadBalancer = DatacentersNetworkloadbalancersPost(ctx, datacenterId) .NetworkLoadBalancer(networkLoadBalancer) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Network Load Balancer ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancer := *openapiclient.NewNetworkLoadBalancer(*openapiclient.NewNetworkLoadBalancerProperties("My Network Load Balancer", int32(1), int32(2))) // NetworkLoadBalancer | The Network Load Balancer to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPost(context.Background(), datacenterId).NetworkLoadBalancer(networkLoadBalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersPost`: NetworkLoadBalancer fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **networkLoadBalancer** | [**NetworkLoadBalancer**](../models/NetworkLoadBalancer.md) | The Network Load Balancer to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NetworkLoadBalancer**](../models/NetworkLoadBalancer.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersNetworkloadbalancersPut ```go var result NetworkLoadBalancer = DatacentersNetworkloadbalancersPut(ctx, datacenterId, networkLoadBalancerId) .NetworkLoadBalancer(networkLoadBalancer) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify Network Load Balancers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer. networkLoadBalancer := *openapiclient.NewNetworkLoadBalancerPut(*openapiclient.NewNetworkLoadBalancerProperties("My Network Load Balancer", int32(1), int32(2))) // NetworkLoadBalancerPut | The modified Network Load Balancer. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPut(context.Background(), datacenterId, networkLoadBalancerId).NetworkLoadBalancer(networkLoadBalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersNetworkloadbalancersPut`: NetworkLoadBalancer fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**networkLoadBalancerId** | **string** | The unique ID of the Network Load Balancer. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersNetworkloadbalancersPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **networkLoadBalancer** | [**NetworkLoadBalancerPut**](../models/NetworkLoadBalancerPut.md) | The modified Network Load Balancer. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**NetworkLoadBalancer**](../models/NetworkLoadBalancer.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/PrivateCrossConnectsApi.md000066400000000000000000000417301465267054300265000ustar00rootroot00000000000000# \PrivateCrossConnectsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**PccsDelete**](PrivateCrossConnectsApi.md#PccsDelete) | **Delete** /pccs/{pccId} | Delete Cross Connects| |[**PccsFindById**](PrivateCrossConnectsApi.md#PccsFindById) | **Get** /pccs/{pccId} | Retrieve a Cross Connect| |[**PccsGet**](PrivateCrossConnectsApi.md#PccsGet) | **Get** /pccs | List Cross Connects| |[**PccsPatch**](PrivateCrossConnectsApi.md#PccsPatch) | **Patch** /pccs/{pccId} | Partially modify a Cross Connects| |[**PccsPost**](PrivateCrossConnectsApi.md#PccsPost) | **Post** /pccs | Create a Cross Connect| ## PccsDelete ```go var result = PccsDelete(ctx, pccId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete Cross Connects ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pccId := "pccId_example" // string | The unique ID of the Cross Connect. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.PrivateCrossConnectsApi.PccsDelete(context.Background(), pccId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PrivateCrossConnectsApi.PccsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**pccId** | **string** | The unique ID of the Cross Connect. | | ### Other Parameters Other parameters are passed through a pointer to a apiPccsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## PccsFindById ```go var result PrivateCrossConnect = PccsFindById(ctx, pccId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve a Cross Connect ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pccId := "pccId_example" // string | The unique ID of the Cross Connect. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.PrivateCrossConnectsApi.PccsFindById(context.Background(), pccId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PrivateCrossConnectsApi.PccsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `PccsFindById`: PrivateCrossConnect fmt.Fprintf(os.Stdout, "Response from `PrivateCrossConnectsApi.PccsFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**pccId** | **string** | The unique ID of the Cross Connect. | | ### Other Parameters Other parameters are passed through a pointer to a apiPccsFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**PrivateCrossConnect**](../models/PrivateCrossConnect.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## PccsGet ```go var result PrivateCrossConnects = PccsGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List Cross Connects ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.PrivateCrossConnectsApi.PccsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PrivateCrossConnectsApi.PccsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `PccsGet`: PrivateCrossConnects fmt.Fprintf(os.Stdout, "Response from `PrivateCrossConnectsApi.PccsGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiPccsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**PrivateCrossConnects**](../models/PrivateCrossConnects.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## PccsPatch ```go var result PrivateCrossConnect = PccsPatch(ctx, pccId) .Pcc(pcc) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify a Cross Connects ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pccId := "pccId_example" // string | The unique ID of the Cross Connect. pcc := *openapiclient.NewPrivateCrossConnectProperties() // PrivateCrossConnectProperties | The properties of the Cross Connect to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.PrivateCrossConnectsApi.PccsPatch(context.Background(), pccId).Pcc(pcc).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PrivateCrossConnectsApi.PccsPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `PccsPatch`: PrivateCrossConnect fmt.Fprintf(os.Stdout, "Response from `PrivateCrossConnectsApi.PccsPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**pccId** | **string** | The unique ID of the Cross Connect. | | ### Other Parameters Other parameters are passed through a pointer to a apiPccsPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pcc** | [**PrivateCrossConnectProperties**](../models/PrivateCrossConnectProperties.md) | The properties of the Cross Connect to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**PrivateCrossConnect**](../models/PrivateCrossConnect.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## PccsPost ```go var result PrivateCrossConnect = PccsPost(ctx) .Pcc(pcc) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Cross Connect ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pcc := *openapiclient.NewPrivateCrossConnect(*openapiclient.NewPrivateCrossConnectProperties()) // PrivateCrossConnect | The Cross Connect to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.PrivateCrossConnectsApi.PccsPost(context.Background()).Pcc(pcc).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PrivateCrossConnectsApi.PccsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `PccsPost`: PrivateCrossConnect fmt.Fprintf(os.Stdout, "Response from `PrivateCrossConnectsApi.PccsPost`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiPccsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pcc** | [**PrivateCrossConnect**](../models/PrivateCrossConnect.md) | The Cross Connect to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**PrivateCrossConnect**](../models/PrivateCrossConnect.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/RequestsApi.md000066400000000000000000000416571465267054300242020ustar00rootroot00000000000000# \RequestsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**RequestsFindById**](RequestsApi.md#RequestsFindById) | **Get** /requests/{requestId} | Retrieve requests| |[**RequestsGet**](RequestsApi.md#RequestsGet) | **Get** /requests | List requests| |[**RequestsStatusGet**](RequestsApi.md#RequestsStatusGet) | **Get** /requests/{requestId}/status | Retrieve request status| ## RequestsFindById ```go var result Request = RequestsFindById(ctx, requestId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve requests ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { requestId := "requestId_example" // string | The unique ID of the request. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.RequestsApi.RequestsFindById(context.Background(), requestId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RequestsApi.RequestsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `RequestsFindById`: Request fmt.Fprintf(os.Stdout, "Response from `RequestsApi.RequestsFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**requestId** | **string** | The unique ID of the request. | | ### Other Parameters Other parameters are passed through a pointer to a apiRequestsFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Request**](../models/Request.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## RequestsGet ```go var result Requests = RequestsGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .FilterStatus(filterStatus) .FilterCreatedAfter(filterCreatedAfter) .FilterCreatedBefore(filterCreatedBefore) .FilterCreatedDate(filterCreatedDate) .FilterCreatedBy(filterCreatedBy) .FilterEtag(filterEtag) .FilterRequestStatus(filterRequestStatus) .FilterMethod(filterMethod) .FilterHeaders(filterHeaders) .FilterBody(filterBody) .FilterUrl(filterUrl) .Offset(offset) .Limit(limit) .Execute() ``` List requests ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) filterStatus := "filterStatus_example" // string | Filter the list by request status [QUEUED, RUNNING, DONE, FAILED]. Filter is not affected by the depth query parameter. (optional) filterCreatedAfter := "filterCreatedAfter_example" // string | Filter the list to only include the requests created after the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. (optional) filterCreatedBefore := "filterCreatedBefore_example" // string | Filter the list to only include the requests created before the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. (optional) filterCreatedDate := "filterCreatedDate_example" // string | Filter the list to only include the requests that contain the createdDate, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional) filterCreatedBy := "filterCreatedBy_example" // string | Filter the list to only include the requests that contain the createdBy, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional) filterEtag := "filterEtag_example" // string | Filter the list to only include the requests that contain the specified etag. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional) filterRequestStatus := "filterRequestStatus_example" // string | Filter the list to only include the requests that contain the specified requestStatus. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional) filterMethod := "filterMethod_example" // string | Filter the list to only include the requests that contain the specified method. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional) filterHeaders := "filterHeaders_example" // string | Filter the list to only include the requests that contain the specified headers. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional) filterBody := "filterBody_example" // string | Filter the list to only include the requests that contain the specified body. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional) filterUrl := "filterUrl_example" // string | Filter the list to only include the requests that contain the specified URL. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.RequestsApi.RequestsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).FilterStatus(filterStatus).FilterCreatedAfter(filterCreatedAfter).FilterCreatedBefore(filterCreatedBefore).FilterCreatedDate(filterCreatedDate).FilterCreatedBy(filterCreatedBy).FilterEtag(filterEtag).FilterRequestStatus(filterRequestStatus).FilterMethod(filterMethod).FilterHeaders(filterHeaders).FilterBody(filterBody).FilterUrl(filterUrl).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RequestsApi.RequestsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `RequestsGet`: Requests fmt.Fprintf(os.Stdout, "Response from `RequestsApi.RequestsGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiRequestsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **filterStatus** | **string** | Filter the list by request status [QUEUED, RUNNING, DONE, FAILED]. Filter is not affected by the depth query parameter. | | | **filterCreatedAfter** | **string** | Filter the list to only include the requests created after the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. | | | **filterCreatedBefore** | **string** | Filter the list to only include the requests created before the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. | | | **filterCreatedDate** | **string** | Filter the list to only include the requests that contain the createdDate, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. | | | **filterCreatedBy** | **string** | Filter the list to only include the requests that contain the createdBy, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. | | | **filterEtag** | **string** | Filter the list to only include the requests that contain the specified etag. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. | | | **filterRequestStatus** | **string** | Filter the list to only include the requests that contain the specified requestStatus. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. | | | **filterMethod** | **string** | Filter the list to only include the requests that contain the specified method. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. | | | **filterHeaders** | **string** | Filter the list to only include the requests that contain the specified headers. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. | | | **filterBody** | **string** | Filter the list to only include the requests that contain the specified body. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. | | | **filterUrl** | **string** | Filter the list to only include the requests that contain the specified URL. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**Requests**](../models/Requests.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## RequestsStatusGet ```go var result RequestStatus = RequestsStatusGet(ctx, requestId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve request status ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { requestId := "requestId_example" // string | The unique ID of the request. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.RequestsApi.RequestsStatusGet(context.Background(), requestId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RequestsApi.RequestsStatusGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `RequestsStatusGet`: RequestStatus fmt.Fprintf(os.Stdout, "Response from `RequestsApi.RequestsStatusGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**requestId** | **string** | The unique ID of the request. | | ### Other Parameters Other parameters are passed through a pointer to a apiRequestsStatusGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**RequestStatus**](../models/RequestStatus.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/ServersApi.md000066400000000000000000002503001465267054300240030ustar00rootroot00000000000000# \ServersApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersServersCdromsDelete**](ServersApi.md#DatacentersServersCdromsDelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Detach a CD-ROM by ID| |[**DatacentersServersCdromsFindById**](ServersApi.md#DatacentersServersCdromsFindById) | **Get** /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} | Get Attached CD-ROM by ID| |[**DatacentersServersCdromsGet**](ServersApi.md#DatacentersServersCdromsGet) | **Get** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Get Attached CD-ROMs | |[**DatacentersServersCdromsPost**](ServersApi.md#DatacentersServersCdromsPost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/cdroms | Attach a CD-ROM| |[**DatacentersServersDelete**](ServersApi.md#DatacentersServersDelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId} | Delete servers| |[**DatacentersServersFindById**](ServersApi.md#DatacentersServersFindById) | **Get** /datacenters/{datacenterId}/servers/{serverId} | Retrieve servers by ID| |[**DatacentersServersGet**](ServersApi.md#DatacentersServersGet) | **Get** /datacenters/{datacenterId}/servers | List servers | |[**DatacentersServersPatch**](ServersApi.md#DatacentersServersPatch) | **Patch** /datacenters/{datacenterId}/servers/{serverId} | Partially modify servers| |[**DatacentersServersPost**](ServersApi.md#DatacentersServersPost) | **Post** /datacenters/{datacenterId}/servers | Create a Server| |[**DatacentersServersPut**](ServersApi.md#DatacentersServersPut) | **Put** /datacenters/{datacenterId}/servers/{serverId} | Modify a Server by ID| |[**DatacentersServersRebootPost**](ServersApi.md#DatacentersServersRebootPost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/reboot | Reboot servers| |[**DatacentersServersRemoteConsoleGet**](ServersApi.md#DatacentersServersRemoteConsoleGet) | **Get** /datacenters/{datacenterId}/servers/{serverId}/remoteconsole | Get Remote Console link| |[**DatacentersServersResumePost**](ServersApi.md#DatacentersServersResumePost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/resume | Resume a Cube Server by ID| |[**DatacentersServersStartPost**](ServersApi.md#DatacentersServersStartPost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/start | Start an Enterprise Server by ID| |[**DatacentersServersStopPost**](ServersApi.md#DatacentersServersStopPost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/stop | Stop an Enterprise Server by ID| |[**DatacentersServersSuspendPost**](ServersApi.md#DatacentersServersSuspendPost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/suspend | Suspend a Cube Server by ID| |[**DatacentersServersTokenGet**](ServersApi.md#DatacentersServersTokenGet) | **Get** /datacenters/{datacenterId}/servers/{serverId}/token | Get JSON Web Token| |[**DatacentersServersUpgradePost**](ServersApi.md#DatacentersServersUpgradePost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/upgrade | Upgrade a Server by ID| |[**DatacentersServersVolumesDelete**](ServersApi.md#DatacentersServersVolumesDelete) | **Delete** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Detach a Volume by ID| |[**DatacentersServersVolumesFindById**](ServersApi.md#DatacentersServersVolumesFindById) | **Get** /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} | Get Attached Volume by ID| |[**DatacentersServersVolumesGet**](ServersApi.md#DatacentersServersVolumesGet) | **Get** /datacenters/{datacenterId}/servers/{serverId}/volumes | Get Attached Volumes| |[**DatacentersServersVolumesPost**](ServersApi.md#DatacentersServersVolumesPost) | **Post** /datacenters/{datacenterId}/servers/{serverId}/volumes | Attach a Volume to a Server| ## DatacentersServersCdromsDelete ```go var result = DatacentersServersCdromsDelete(ctx, datacenterId, serverId, cdromId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Detach a CD-ROM by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. cdromId := "cdromId_example" // string | The unique ID of the CD-ROM. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.ServersApi.DatacentersServersCdromsDelete(context.Background(), datacenterId, serverId, cdromId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersCdromsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**cdromId** | **string** | The unique ID of the CD-ROM. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersCdromsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersCdromsFindById ```go var result Image = DatacentersServersCdromsFindById(ctx, datacenterId, serverId, cdromId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Attached CD-ROM by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. cdromId := "cdromId_example" // string | The unique ID of the CD-ROM. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersCdromsFindById(context.Background(), datacenterId, serverId, cdromId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersCdromsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersCdromsFindById`: Image fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersCdromsFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**cdromId** | **string** | The unique ID of the CD-ROM. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersCdromsFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Image**](../models/Image.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersCdromsGet ```go var result Cdroms = DatacentersServersCdromsGet(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` Get Attached CD-ROMs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersCdromsGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersCdromsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersCdromsGet`: Cdroms fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersCdromsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersCdromsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**Cdroms**](../models/Cdroms.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersCdromsPost ```go var result Image = DatacentersServersCdromsPost(ctx, datacenterId, serverId) .Cdrom(cdrom) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Attach a CD-ROM ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. cdrom := *openapiclient.NewImage(*openapiclient.NewImageProperties("LINUX")) // Image | The CD-ROM to be attached. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersCdromsPost(context.Background(), datacenterId, serverId).Cdrom(cdrom).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersCdromsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersCdromsPost`: Image fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersCdromsPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersCdromsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **cdrom** | [**Image**](../models/Image.md) | The CD-ROM to be attached. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Image**](../models/Image.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersDelete ```go var result = DatacentersServersDelete(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .DeleteVolumes(deleteVolumes) .Execute() ``` Delete servers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) deleteVolumes := true // bool | If true, all attached storage volumes will also be deleted. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.ServersApi.DatacentersServersDelete(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).DeleteVolumes(deleteVolumes).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **deleteVolumes** | **bool** | If true, all attached storage volumes will also be deleted. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersFindById ```go var result Server = DatacentersServersFindById(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve servers by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersFindById(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersFindById`: Server fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Server**](../models/Server.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersGet ```go var result Servers = DatacentersServersGet(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List servers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersGet`: Servers fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**Servers**](../models/Servers.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersPatch ```go var result Server = DatacentersServersPatch(ctx, datacenterId, serverId) .Server(server) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify servers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. server := *openapiclient.NewServerProperties() // ServerProperties | The properties of the server to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersPatch(context.Background(), datacenterId, serverId).Server(server).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersPatch`: Server fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **server** | [**ServerProperties**](../models/ServerProperties.md) | The properties of the server to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Server**](../models/Server.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersPost ```go var result Server = DatacentersServersPost(ctx, datacenterId) .Server(server) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Server ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. server := *openapiclient.NewServer(*openapiclient.NewServerProperties()) // Server | The server to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersPost(context.Background(), datacenterId).Server(server).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersPost`: Server fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **server** | [**Server**](../models/Server.md) | The server to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Server**](../models/Server.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersPut ```go var result Server = DatacentersServersPut(ctx, datacenterId, serverId) .Server(server) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Server by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. server := *openapiclient.NewServer(*openapiclient.NewServerProperties()) // Server | The modified server pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersPut(context.Background(), datacenterId, serverId).Server(server).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersPut`: Server fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **server** | [**Server**](../models/Server.md) | The modified server | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Server**](../models/Server.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersServersRebootPost ```go var result = DatacentersServersRebootPost(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Reboot servers ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersRebootPost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersRebootPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersRebootPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersRemoteConsoleGet ```go var result RemoteConsoleUrl = DatacentersServersRemoteConsoleGet(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Remote Console link ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersRemoteConsoleGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersRemoteConsoleGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersRemoteConsoleGet`: RemoteConsoleUrl fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersRemoteConsoleGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersRemoteConsoleGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**RemoteConsoleUrl**](../models/RemoteConsoleUrl.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersResumePost ```go var result = DatacentersServersResumePost(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Resume a Cube Server by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersResumePost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersResumePost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersResumePostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersStartPost ```go var result = DatacentersServersStartPost(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Start an Enterprise Server by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersStartPost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersStartPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersStartPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersStopPost ```go var result = DatacentersServersStopPost(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Stop an Enterprise Server by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersStopPost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersStopPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersStopPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersSuspendPost ```go var result = DatacentersServersSuspendPost(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Suspend a Cube Server by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersSuspendPost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersSuspendPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersSuspendPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersTokenGet ```go var result Token = DatacentersServersTokenGet(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get JSON Web Token ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersTokenGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersTokenGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersTokenGet`: Token fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersTokenGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersTokenGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Token**](../models/Token.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersUpgradePost ```go var result = DatacentersServersUpgradePost(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Upgrade a Server by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersUpgradePost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersUpgradePost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersUpgradePostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersVolumesDelete ```go var result = DatacentersServersVolumesDelete(ctx, datacenterId, serverId, volumeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Detach a Volume by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. volumeId := "volumeId_example" // string | The unique ID of the volume. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.ServersApi.DatacentersServersVolumesDelete(context.Background(), datacenterId, serverId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersVolumesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**volumeId** | **string** | The unique ID of the volume. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersVolumesDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersVolumesFindById ```go var result Volume = DatacentersServersVolumesFindById(ctx, datacenterId, serverId, volumeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get Attached Volume by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. volumeId := "volumeId_example" // string | The unique ID of the volume. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersVolumesFindById(context.Background(), datacenterId, serverId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersVolumesFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersVolumesFindById`: Volume fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersVolumesFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | |**volumeId** | **string** | The unique ID of the volume. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersVolumesFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Volume**](../models/Volume.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersVolumesGet ```go var result AttachedVolumes = DatacentersServersVolumesGet(ctx, datacenterId, serverId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` Get Attached Volumes ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersVolumesGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersVolumesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersVolumesGet`: AttachedVolumes fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersVolumesGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersVolumesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**AttachedVolumes**](../models/AttachedVolumes.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersServersVolumesPost ```go var result Volume = DatacentersServersVolumesPost(ctx, datacenterId, serverId) .Volume(volume) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Attach a Volume to a Server ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. serverId := "serverId_example" // string | The unique ID of the server. volume := *openapiclient.NewVolume(*openapiclient.NewVolumeProperties(float32(100))) // Volume | The volume to be attached (or created and attached). pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.ServersApi.DatacentersServersVolumesPost(context.Background(), datacenterId, serverId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersVolumesPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersServersVolumesPost`: Volume fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersVolumesPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**serverId** | **string** | The unique ID of the server. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersServersVolumesPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **volume** | [**Volume**](../models/Volume.md) | The volume to be attached (or created and attached). | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Volume**](../models/Volume.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/SnapshotsApi.md000066400000000000000000000422331465267054300243400ustar00rootroot00000000000000# \SnapshotsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**SnapshotsDelete**](SnapshotsApi.md#SnapshotsDelete) | **Delete** /snapshots/{snapshotId} | Delete snapshots| |[**SnapshotsFindById**](SnapshotsApi.md#SnapshotsFindById) | **Get** /snapshots/{snapshotId} | Retrieve snapshots by ID| |[**SnapshotsGet**](SnapshotsApi.md#SnapshotsGet) | **Get** /snapshots | List snapshots| |[**SnapshotsPatch**](SnapshotsApi.md#SnapshotsPatch) | **Patch** /snapshots/{snapshotId} | Partially modify snapshots| |[**SnapshotsPut**](SnapshotsApi.md#SnapshotsPut) | **Put** /snapshots/{snapshotId} | Modify a Snapshot by ID| ## SnapshotsDelete ```go var result = SnapshotsDelete(ctx, snapshotId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete snapshots ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { snapshotId := "snapshotId_example" // string | The unique ID of the snapshot. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.SnapshotsApi.SnapshotsDelete(context.Background(), snapshotId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.SnapshotsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**snapshotId** | **string** | The unique ID of the snapshot. | | ### Other Parameters Other parameters are passed through a pointer to a apiSnapshotsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## SnapshotsFindById ```go var result Snapshot = SnapshotsFindById(ctx, snapshotId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve snapshots by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { snapshotId := "snapshotId_example" // string | The unique ID of the snapshot. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.SnapshotsApi.SnapshotsFindById(context.Background(), snapshotId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.SnapshotsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SnapshotsFindById`: Snapshot fmt.Fprintf(os.Stdout, "Response from `SnapshotsApi.SnapshotsFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**snapshotId** | **string** | The unique ID of the snapshot. | | ### Other Parameters Other parameters are passed through a pointer to a apiSnapshotsFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Snapshot**](../models/Snapshot.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## SnapshotsGet ```go var result Snapshots = SnapshotsGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List snapshots ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.SnapshotsApi.SnapshotsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.SnapshotsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SnapshotsGet`: Snapshots fmt.Fprintf(os.Stdout, "Response from `SnapshotsApi.SnapshotsGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiSnapshotsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Snapshots**](../models/Snapshots.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## SnapshotsPatch ```go var result Snapshot = SnapshotsPatch(ctx, snapshotId) .Snapshot(snapshot) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify snapshots ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { snapshotId := "snapshotId_example" // string | The unique ID of the snapshot. snapshot := *openapiclient.NewSnapshotProperties() // SnapshotProperties | The properties of the snapshot to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.SnapshotsApi.SnapshotsPatch(context.Background(), snapshotId).Snapshot(snapshot).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.SnapshotsPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SnapshotsPatch`: Snapshot fmt.Fprintf(os.Stdout, "Response from `SnapshotsApi.SnapshotsPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**snapshotId** | **string** | The unique ID of the snapshot. | | ### Other Parameters Other parameters are passed through a pointer to a apiSnapshotsPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **snapshot** | [**SnapshotProperties**](../models/SnapshotProperties.md) | The properties of the snapshot to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Snapshot**](../models/Snapshot.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## SnapshotsPut ```go var result Snapshot = SnapshotsPut(ctx, snapshotId) .Snapshot(snapshot) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Snapshot by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { snapshotId := "snapshotId_example" // string | The unique ID of the snapshot. snapshot := *openapiclient.NewSnapshot(*openapiclient.NewSnapshotProperties()) // Snapshot | The modified snapshot pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.SnapshotsApi.SnapshotsPut(context.Background(), snapshotId).Snapshot(snapshot).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.SnapshotsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SnapshotsPut`: Snapshot fmt.Fprintf(os.Stdout, "Response from `SnapshotsApi.SnapshotsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**snapshotId** | **string** | The unique ID of the snapshot. | | ### Other Parameters Other parameters are passed through a pointer to a apiSnapshotsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **snapshot** | [**Snapshot**](../models/Snapshot.md) | The modified snapshot | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Snapshot**](../models/Snapshot.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/TargetGroupsApi.md000066400000000000000000000542731465267054300250130ustar00rootroot00000000000000# \TargetGroupsApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**TargetGroupsDelete**](TargetGroupsApi.md#TargetGroupsDelete) | **Delete** /targetgroups/{targetGroupId} | Delete a Target Group by ID| |[**TargetgroupsFindByTargetGroupId**](TargetGroupsApi.md#TargetgroupsFindByTargetGroupId) | **Get** /targetgroups/{targetGroupId} | Get a Target Group by ID| |[**TargetgroupsGet**](TargetGroupsApi.md#TargetgroupsGet) | **Get** /targetgroups | Get Target Groups| |[**TargetgroupsPatch**](TargetGroupsApi.md#TargetgroupsPatch) | **Patch** /targetgroups/{targetGroupId} | Partially Modify a Target Group by ID| |[**TargetgroupsPost**](TargetGroupsApi.md#TargetgroupsPost) | **Post** /targetgroups | Create a Target Group| |[**TargetgroupsPut**](TargetGroupsApi.md#TargetgroupsPut) | **Put** /targetgroups/{targetGroupId} | Modify a Target Group by ID| ## TargetGroupsDelete ```go var result = TargetGroupsDelete(ctx, targetGroupId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete a Target Group by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { targetGroupId := "targetGroupId_example" // string | The unique ID of the target group. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.TargetGroupsApi.TargetGroupsDelete(context.Background(), targetGroupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetGroupsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**targetGroupId** | **string** | The unique ID of the target group. | | ### Other Parameters Other parameters are passed through a pointer to a apiTargetGroupsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## TargetgroupsFindByTargetGroupId ```go var result TargetGroup = TargetgroupsFindByTargetGroupId(ctx, targetGroupId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Get a Target Group by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { targetGroupId := "targetGroupId_example" // string | The unique ID of the target group. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.TargetGroupsApi.TargetgroupsFindByTargetGroupId(context.Background(), targetGroupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetgroupsFindByTargetGroupId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `TargetgroupsFindByTargetGroupId`: TargetGroup fmt.Fprintf(os.Stdout, "Response from `TargetGroupsApi.TargetgroupsFindByTargetGroupId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**targetGroupId** | **string** | The unique ID of the target group. | | ### Other Parameters Other parameters are passed through a pointer to a apiTargetgroupsFindByTargetGroupIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**TargetGroup**](../models/TargetGroup.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## TargetgroupsGet ```go var result TargetGroups = TargetgroupsGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` Get Target Groups ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (used together with offset for pagination). It must not exceed 200. (optional) (default to 100) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.TargetGroupsApi.TargetgroupsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetgroupsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `TargetgroupsGet`: TargetGroups fmt.Fprintf(os.Stdout, "Response from `TargetGroupsApi.TargetgroupsGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiTargetgroupsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (used together with <b><i>offset</i></b> for pagination). It must not exceed <b><i>200</i></b>. | [default to 100]| ### Return type [**TargetGroups**](../models/TargetGroups.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## TargetgroupsPatch ```go var result TargetGroup = TargetgroupsPatch(ctx, targetGroupId) .TargetGroupProperties(targetGroupProperties) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially Modify a Target Group by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { targetGroupId := "targetGroupId_example" // string | The unique ID of the target group. targetGroupProperties := *openapiclient.NewTargetGroupProperties("My target group", "ROUND_ROBIN", "HTTP") // TargetGroupProperties | The target group properties to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.TargetGroupsApi.TargetgroupsPatch(context.Background(), targetGroupId).TargetGroupProperties(targetGroupProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetgroupsPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `TargetgroupsPatch`: TargetGroup fmt.Fprintf(os.Stdout, "Response from `TargetGroupsApi.TargetgroupsPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**targetGroupId** | **string** | The unique ID of the target group. | | ### Other Parameters Other parameters are passed through a pointer to a apiTargetgroupsPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **targetGroupProperties** | [**TargetGroupProperties**](../models/TargetGroupProperties.md) | The target group properties to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**TargetGroup**](../models/TargetGroup.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## TargetgroupsPost ```go var result TargetGroup = TargetgroupsPost(ctx) .TargetGroup(targetGroup) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Target Group ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { targetGroup := *openapiclient.NewTargetGroup(*openapiclient.NewTargetGroupProperties("My target group", "ROUND_ROBIN", "HTTP")) // TargetGroup | The target group to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.TargetGroupsApi.TargetgroupsPost(context.Background()).TargetGroup(targetGroup).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetgroupsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `TargetgroupsPost`: TargetGroup fmt.Fprintf(os.Stdout, "Response from `TargetGroupsApi.TargetgroupsPost`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiTargetgroupsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **targetGroup** | [**TargetGroup**](../models/TargetGroup.md) | The target group to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**TargetGroup**](../models/TargetGroup.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## TargetgroupsPut ```go var result TargetGroup = TargetgroupsPut(ctx, targetGroupId) .TargetGroup(targetGroup) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Target Group by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { targetGroupId := "targetGroupId_example" // string | The unique ID of the target group. targetGroup := *openapiclient.NewTargetGroupPut(*openapiclient.NewTargetGroupProperties("My target group", "ROUND_ROBIN", "HTTP")) // TargetGroupPut | The modified target group. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.TargetGroupsApi.TargetgroupsPut(context.Background(), targetGroupId).TargetGroup(targetGroup).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetgroupsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `TargetgroupsPut`: TargetGroup fmt.Fprintf(os.Stdout, "Response from `TargetGroupsApi.TargetgroupsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**targetGroupId** | **string** | The unique ID of the target group. | | ### Other Parameters Other parameters are passed through a pointer to a apiTargetgroupsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **targetGroup** | [**TargetGroupPut**](../models/TargetGroupPut.md) | The modified target group. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**TargetGroup**](../models/TargetGroup.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/TemplatesApi.md000066400000000000000000000122141465267054300243100ustar00rootroot00000000000000# \TemplatesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**TemplatesFindById**](TemplatesApi.md#TemplatesFindById) | **Get** /templates/{templateId} | Get Cubes Template by ID| |[**TemplatesGet**](TemplatesApi.md#TemplatesGet) | **Get** /templates | Get Cubes Templates| ## TemplatesFindById ```go var result Template = TemplatesFindById(ctx, templateId) .Depth(depth) .Execute() ``` Get Cubes Template by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { templateId := "templateId_example" // string | The unique template ID. depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.TemplatesApi.TemplatesFindById(context.Background(), templateId).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `TemplatesApi.TemplatesFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `TemplatesFindById`: Template fmt.Fprintf(os.Stdout, "Response from `TemplatesApi.TemplatesFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**templateId** | **string** | The unique template ID. | | ### Other Parameters Other parameters are passed through a pointer to a apiTemplatesFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type [**Template**](../models/Template.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## TemplatesGet ```go var result Templates = TemplatesGet(ctx) .Depth(depth) .Execute() ``` Get Cubes Templates ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.TemplatesApi.TemplatesGet(context.Background()).Depth(depth).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `TemplatesApi.TemplatesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `TemplatesGet`: Templates fmt.Fprintf(os.Stdout, "Response from `TemplatesApi.TemplatesGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiTemplatesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| ### Return type [**Templates**](../models/Templates.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/UserManagementApi.md000066400000000000000000002456671465267054300253110ustar00rootroot00000000000000# \UserManagementApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**UmGroupsDelete**](UserManagementApi.md#UmGroupsDelete) | **Delete** /um/groups/{groupId} | Delete groups| |[**UmGroupsFindById**](UserManagementApi.md#UmGroupsFindById) | **Get** /um/groups/{groupId} | Retrieve groups| |[**UmGroupsGet**](UserManagementApi.md#UmGroupsGet) | **Get** /um/groups | List all groups| |[**UmGroupsPost**](UserManagementApi.md#UmGroupsPost) | **Post** /um/groups | Create groups| |[**UmGroupsPut**](UserManagementApi.md#UmGroupsPut) | **Put** /um/groups/{groupId} | Modify groups| |[**UmGroupsResourcesGet**](UserManagementApi.md#UmGroupsResourcesGet) | **Get** /um/groups/{groupId}/resources | Retrieve group resources| |[**UmGroupsSharesDelete**](UserManagementApi.md#UmGroupsSharesDelete) | **Delete** /um/groups/{groupId}/shares/{resourceId} | Remove group shares| |[**UmGroupsSharesFindByResourceId**](UserManagementApi.md#UmGroupsSharesFindByResourceId) | **Get** /um/groups/{groupId}/shares/{resourceId} | Retrieve group shares| |[**UmGroupsSharesGet**](UserManagementApi.md#UmGroupsSharesGet) | **Get** /um/groups/{groupId}/shares | List group shares | |[**UmGroupsSharesPost**](UserManagementApi.md#UmGroupsSharesPost) | **Post** /um/groups/{groupId}/shares/{resourceId} | Add group shares| |[**UmGroupsSharesPut**](UserManagementApi.md#UmGroupsSharesPut) | **Put** /um/groups/{groupId}/shares/{resourceId} | Modify group share privileges| |[**UmGroupsUsersDelete**](UserManagementApi.md#UmGroupsUsersDelete) | **Delete** /um/groups/{groupId}/users/{userId} | Remove users from groups| |[**UmGroupsUsersGet**](UserManagementApi.md#UmGroupsUsersGet) | **Get** /um/groups/{groupId}/users | List group members| |[**UmGroupsUsersPost**](UserManagementApi.md#UmGroupsUsersPost) | **Post** /um/groups/{groupId}/users | Add a Group Member| |[**UmResourcesFindByType**](UserManagementApi.md#UmResourcesFindByType) | **Get** /um/resources/{resourceType} | List resources by type| |[**UmResourcesFindByTypeAndId**](UserManagementApi.md#UmResourcesFindByTypeAndId) | **Get** /um/resources/{resourceType}/{resourceId} | Retrieve resources by type| |[**UmResourcesGet**](UserManagementApi.md#UmResourcesGet) | **Get** /um/resources | List all resources| |[**UmUsersDelete**](UserManagementApi.md#UmUsersDelete) | **Delete** /um/users/{userId} | Delete users| |[**UmUsersFindById**](UserManagementApi.md#UmUsersFindById) | **Get** /um/users/{userId} | Retrieve users| |[**UmUsersGet**](UserManagementApi.md#UmUsersGet) | **Get** /um/users | List all users | |[**UmUsersGroupsGet**](UserManagementApi.md#UmUsersGroupsGet) | **Get** /um/users/{userId}/groups | Retrieve group resources by user ID| |[**UmUsersOwnsGet**](UserManagementApi.md#UmUsersOwnsGet) | **Get** /um/users/{userId}/owns | Retrieve user resources by user ID| |[**UmUsersPost**](UserManagementApi.md#UmUsersPost) | **Post** /um/users | Create users| |[**UmUsersPut**](UserManagementApi.md#UmUsersPut) | **Put** /um/users/{userId} | Modify users| ## UmGroupsDelete ```go var result = UmGroupsDelete(ctx, groupId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete groups ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.UserManagementApi.UmGroupsDelete(context.Background(), groupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmGroupsFindById ```go var result Group = UmGroupsFindById(ctx, groupId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve groups ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsFindById(context.Background(), groupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsFindById`: Group fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Group**](../models/Group.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmGroupsGet ```go var result Groups = UmGroupsGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List all groups ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsGet`: Groups fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Groups**](../models/Groups.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmGroupsPost ```go var result Group = UmGroupsPost(ctx) .Group(group) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create groups ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { group := *openapiclient.NewGroup(*openapiclient.NewGroupProperties()) // Group | The group to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsPost(context.Background()).Group(group).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsPost`: Group fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsPost`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **group** | [**Group**](../models/Group.md) | The group to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Group**](../models/Group.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## UmGroupsPut ```go var result Group = UmGroupsPut(ctx, groupId) .Group(group) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify groups ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. group := *openapiclient.NewGroup(*openapiclient.NewGroupProperties()) // Group | The modified group. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsPut(context.Background(), groupId).Group(group).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsPut`: Group fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **group** | [**Group**](../models/Group.md) | The modified group. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Group**](../models/Group.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## UmGroupsResourcesGet ```go var result ResourceGroups = UmGroupsResourcesGet(ctx, groupId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve group resources ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsResourcesGet(context.Background(), groupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsResourcesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsResourcesGet`: ResourceGroups fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsResourcesGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsResourcesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ResourceGroups**](../models/ResourceGroups.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmGroupsSharesDelete ```go var result = UmGroupsSharesDelete(ctx, groupId, resourceId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Remove group shares ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. resourceId := "resourceId_example" // string | The unique ID of the resource. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.UserManagementApi.UmGroupsSharesDelete(context.Background(), groupId, resourceId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsSharesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | |**resourceId** | **string** | The unique ID of the resource. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsSharesDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmGroupsSharesFindByResourceId ```go var result GroupShare = UmGroupsSharesFindByResourceId(ctx, groupId, resourceId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve group shares ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. resourceId := "resourceId_example" // string | The unique ID of the resource. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsSharesFindByResourceId(context.Background(), groupId, resourceId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsSharesFindByResourceId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsSharesFindByResourceId`: GroupShare fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsSharesFindByResourceId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | |**resourceId** | **string** | The unique ID of the resource. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsSharesFindByResourceIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**GroupShare**](../models/GroupShare.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmGroupsSharesGet ```go var result GroupShares = UmGroupsSharesGet(ctx, groupId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List group shares ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsSharesGet(context.Background(), groupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsSharesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsSharesGet`: GroupShares fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsSharesGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsSharesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**GroupShares**](../models/GroupShares.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmGroupsSharesPost ```go var result GroupShare = UmGroupsSharesPost(ctx, groupId, resourceId) .Resource(resource) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Add group shares ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. resourceId := "resourceId_example" // string | The unique ID of the resource. resource := *openapiclient.NewGroupShare(*openapiclient.NewGroupShareProperties()) // GroupShare | The resource to add. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsSharesPost(context.Background(), groupId, resourceId).Resource(resource).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsSharesPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsSharesPost`: GroupShare fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsSharesPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | |**resourceId** | **string** | The unique ID of the resource. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsSharesPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **resource** | [**GroupShare**](../models/GroupShare.md) | The resource to add. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**GroupShare**](../models/GroupShare.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmGroupsSharesPut ```go var result GroupShare = UmGroupsSharesPut(ctx, groupId, resourceId) .Resource(resource) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify group share privileges ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. resourceId := "resourceId_example" // string | The unique ID of the resource. resource := *openapiclient.NewGroupShare(*openapiclient.NewGroupShareProperties()) // GroupShare | The modified resource pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsSharesPut(context.Background(), groupId, resourceId).Resource(resource).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsSharesPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsSharesPut`: GroupShare fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsSharesPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | |**resourceId** | **string** | The unique ID of the resource. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsSharesPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **resource** | [**GroupShare**](../models/GroupShare.md) | The modified resource | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**GroupShare**](../models/GroupShare.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## UmGroupsUsersDelete ```go var result = UmGroupsUsersDelete(ctx, groupId, userId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Remove users from groups ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. userId := "userId_example" // string | The unique ID of the user. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.UserManagementApi.UmGroupsUsersDelete(context.Background(), groupId, userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsUsersDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | |**userId** | **string** | The unique ID of the user. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsUsersDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmGroupsUsersGet ```go var result GroupMembers = UmGroupsUsersGet(ctx, groupId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List group members ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsUsersGet(context.Background(), groupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsUsersGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsUsersGet`: GroupMembers fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsUsersGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsUsersGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**GroupMembers**](../models/GroupMembers.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmGroupsUsersPost ```go var result User = UmGroupsUsersPost(ctx, groupId) .User(user) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Add a Group Member ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { groupId := "groupId_example" // string | The unique ID of the group. user := *openapiclient.NewUser(*openapiclient.NewUserProperties()) // User | The user to add. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmGroupsUsersPost(context.Background(), groupId).User(user).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsUsersPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmGroupsUsersPost`: User fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsUsersPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**groupId** | **string** | The unique ID of the group. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmGroupsUsersPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **user** | [**User**](../models/User.md) | The user to add. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**User**](../models/User.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## UmResourcesFindByType ```go var result Resources = UmResourcesFindByType(ctx, resourceType) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List resources by type ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { resourceType := "resourceType_example" // string | The resource type pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmResourcesFindByType(context.Background(), resourceType).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmResourcesFindByType``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmResourcesFindByType`: Resources fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmResourcesFindByType`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**resourceType** | **string** | The resource type | | ### Other Parameters Other parameters are passed through a pointer to a apiUmResourcesFindByTypeRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Resources**](../models/Resources.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmResourcesFindByTypeAndId ```go var result Resource = UmResourcesFindByTypeAndId(ctx, resourceType, resourceId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve resources by type ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { resourceType := "resourceType_example" // string | The resource type resourceId := "resourceId_example" // string | The resource ID pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmResourcesFindByTypeAndId(context.Background(), resourceType, resourceId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmResourcesFindByTypeAndId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmResourcesFindByTypeAndId`: Resource fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmResourcesFindByTypeAndId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**resourceType** | **string** | The resource type | | |**resourceId** | **string** | The resource ID | | ### Other Parameters Other parameters are passed through a pointer to a apiUmResourcesFindByTypeAndIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Resource**](../models/Resource.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmResourcesGet ```go var result Resources = UmResourcesGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List all resources ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmResourcesGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmResourcesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmResourcesGet`: Resources fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmResourcesGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiUmResourcesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Resources**](../models/Resources.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmUsersDelete ```go var result = UmUsersDelete(ctx, userId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete users ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.UserManagementApi.UmUsersDelete(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmUsersFindById ```go var result User = UmUsersFindById(ctx, userId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve users ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmUsersFindById(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersFindById`: User fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**User**](../models/User.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmUsersGet ```go var result Users = UmUsersGet(ctx) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List all users ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 100) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmUsersGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersGet`: Users fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersGet`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with <code>offset</code> for pagination). | [default to 100]| ### Return type [**Users**](../models/Users.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmUsersGroupsGet ```go var result ResourceGroups = UmUsersGroupsGet(ctx, userId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve group resources by user ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmUsersGroupsGet(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersGroupsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersGroupsGet`: ResourceGroups fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersGroupsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersGroupsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ResourceGroups**](../models/ResourceGroups.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmUsersOwnsGet ```go var result ResourcesUsers = UmUsersOwnsGet(ctx, userId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve user resources by user ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmUsersOwnsGet(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersOwnsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersOwnsGet`: ResourcesUsers fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersOwnsGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersOwnsGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**ResourcesUsers**](../models/ResourcesUsers.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmUsersPost ```go var result User = UmUsersPost(ctx) .User(user) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create users ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { user := *openapiclient.NewUserPost(*openapiclient.NewUserPropertiesPost()) // UserPost | The user to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmUsersPost(context.Background()).User(user).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersPost`: User fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersPost`: %v\n", resp) } ``` ### Path Parameters ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **user** | [**UserPost**](../models/UserPost.md) | The user to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**User**](../models/User.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## UmUsersPut ```go var result User = UmUsersPut(ctx, userId) .User(user) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify users ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. user := *openapiclient.NewUserPut(*openapiclient.NewUserPropertiesPut()) // UserPut | The modified user pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserManagementApi.UmUsersPut(context.Background(), userId).User(user).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersPut`: User fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **user** | [**UserPut**](../models/UserPut.md) | The modified user | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**User**](../models/User.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/UserS3KeysApi.md000066400000000000000000000501741465267054300243410ustar00rootroot00000000000000# \UserS3KeysApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**UmUsersS3keysDelete**](UserS3KeysApi.md#UmUsersS3keysDelete) | **Delete** /um/users/{userId}/s3keys/{keyId} | Delete S3 keys| |[**UmUsersS3keysFindByKeyId**](UserS3KeysApi.md#UmUsersS3keysFindByKeyId) | **Get** /um/users/{userId}/s3keys/{keyId} | Retrieve user S3 keys by key ID| |[**UmUsersS3keysGet**](UserS3KeysApi.md#UmUsersS3keysGet) | **Get** /um/users/{userId}/s3keys | List user S3 keys| |[**UmUsersS3keysPost**](UserS3KeysApi.md#UmUsersS3keysPost) | **Post** /um/users/{userId}/s3keys | Create user S3 keys| |[**UmUsersS3keysPut**](UserS3KeysApi.md#UmUsersS3keysPut) | **Put** /um/users/{userId}/s3keys/{keyId} | Modify a S3 Key by Key ID| |[**UmUsersS3ssourlGet**](UserS3KeysApi.md#UmUsersS3ssourlGet) | **Get** /um/users/{userId}/s3ssourl | Retrieve S3 single sign-on URLs| ## UmUsersS3keysDelete ```go var result = UmUsersS3keysDelete(ctx, userId, keyId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete S3 keys ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. keyId := "keyId_example" // string | The unique ID of the S3 key. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.UserS3KeysApi.UmUsersS3keysDelete(context.Background(), userId, keyId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3keysDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | |**keyId** | **string** | The unique ID of the S3 key. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersS3keysDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmUsersS3keysFindByKeyId ```go var result S3Key = UmUsersS3keysFindByKeyId(ctx, userId, keyId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve user S3 keys by key ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. keyId := "keyId_example" // string | The unique ID of the S3 key. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserS3KeysApi.UmUsersS3keysFindByKeyId(context.Background(), userId, keyId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3keysFindByKeyId``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersS3keysFindByKeyId`: S3Key fmt.Fprintf(os.Stdout, "Response from `UserS3KeysApi.UmUsersS3keysFindByKeyId`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | |**keyId** | **string** | The unique ID of the S3 key. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersS3keysFindByKeyIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**S3Key**](../models/S3Key.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmUsersS3keysGet ```go var result S3Keys = UmUsersS3keysGet(ctx, userId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` List user S3 keys ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserS3KeysApi.UmUsersS3keysGet(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3keysGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersS3keysGet`: S3Keys fmt.Fprintf(os.Stdout, "Response from `UserS3KeysApi.UmUsersS3keysGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersS3keysGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**S3Keys**](../models/S3Keys.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmUsersS3keysPost ```go var result S3Key = UmUsersS3keysPost(ctx, userId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create user S3 keys ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserS3KeysApi.UmUsersS3keysPost(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3keysPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersS3keysPost`: S3Key fmt.Fprintf(os.Stdout, "Response from `UserS3KeysApi.UmUsersS3keysPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersS3keysPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**S3Key**](../models/S3Key.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## UmUsersS3keysPut ```go var result S3Key = UmUsersS3keysPut(ctx, userId, keyId) .S3Key(s3Key) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a S3 Key by Key ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. keyId := "keyId_example" // string | The unique ID of the S3 key. s3Key := *openapiclient.NewS3Key(*openapiclient.NewS3KeyProperties()) // S3Key | The modified S3 key. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserS3KeysApi.UmUsersS3keysPut(context.Background(), userId, keyId).S3Key(s3Key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3keysPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersS3keysPut`: S3Key fmt.Fprintf(os.Stdout, "Response from `UserS3KeysApi.UmUsersS3keysPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | |**keyId** | **string** | The unique ID of the S3 key. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersS3keysPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **s3Key** | [**S3Key**](../models/S3Key.md) | The modified S3 key. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**S3Key**](../models/S3Key.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## UmUsersS3ssourlGet ```go var result S3ObjectStorageSSO = UmUsersS3ssourlGet(ctx, userId) .Pretty(pretty) .XContractNumber(xContractNumber) .Execute() ``` Retrieve S3 single sign-on URLs ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { userId := "userId_example" // string | The unique ID of the user. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UserS3KeysApi.UmUsersS3ssourlGet(context.Background(), userId).Pretty(pretty).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3ssourlGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UmUsersS3ssourlGet`: S3ObjectStorageSSO fmt.Fprintf(os.Stdout, "Response from `UserS3KeysApi.UmUsersS3ssourlGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**userId** | **string** | The unique ID of the user. | | ### Other Parameters Other parameters are passed through a pointer to a apiUmUsersS3ssourlGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**S3ObjectStorageSSO**](../models/S3ObjectStorageSSO.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/api/VolumesApi.md000066400000000000000000000773551465267054300240250ustar00rootroot00000000000000# \VolumesApi All URIs are relative to *https://api.ionos.com/cloudapi/v6* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**DatacentersVolumesCreateSnapshotPost**](VolumesApi.md#DatacentersVolumesCreateSnapshotPost) | **Post** /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot | Create volume snapshots| |[**DatacentersVolumesDelete**](VolumesApi.md#DatacentersVolumesDelete) | **Delete** /datacenters/{datacenterId}/volumes/{volumeId} | Delete volumes| |[**DatacentersVolumesFindById**](VolumesApi.md#DatacentersVolumesFindById) | **Get** /datacenters/{datacenterId}/volumes/{volumeId} | Retrieve volumes| |[**DatacentersVolumesGet**](VolumesApi.md#DatacentersVolumesGet) | **Get** /datacenters/{datacenterId}/volumes | List volumes| |[**DatacentersVolumesPatch**](VolumesApi.md#DatacentersVolumesPatch) | **Patch** /datacenters/{datacenterId}/volumes/{volumeId} | Partially modify volumes| |[**DatacentersVolumesPost**](VolumesApi.md#DatacentersVolumesPost) | **Post** /datacenters/{datacenterId}/volumes | Create a Volume| |[**DatacentersVolumesPut**](VolumesApi.md#DatacentersVolumesPut) | **Put** /datacenters/{datacenterId}/volumes/{volumeId} | Modify a Volume by ID| |[**DatacentersVolumesRestoreSnapshotPost**](VolumesApi.md#DatacentersVolumesRestoreSnapshotPost) | **Post** /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot | Restore volume snapshots| ## DatacentersVolumesCreateSnapshotPost ```go var result Snapshot = DatacentersVolumesCreateSnapshotPost(ctx, datacenterId, volumeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Name(name) .Description(description) .SecAuthProtection(secAuthProtection) .LicenceType(licenceType) .Execute() ``` Create volume snapshots ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) name := "name_example" // string | The name of the snapshot (optional) description := "description_example" // string | The description of the snapshot (optional) secAuthProtection := true // bool | Flag representing if extra protection is enabled on snapshot e.g. Two Factor protection etc. (optional) licenceType := "licenceType_example" // string | OS type of this Snapshot (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.VolumesApi.DatacentersVolumesCreateSnapshotPost(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Name(name).Description(description).SecAuthProtection(secAuthProtection).LicenceType(licenceType).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesCreateSnapshotPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersVolumesCreateSnapshotPost`: Snapshot fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesCreateSnapshotPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesCreateSnapshotPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **name** | **string** | The name of the snapshot | | | **description** | **string** | The description of the snapshot | | | **secAuthProtection** | **bool** | Flag representing if extra protection is enabled on snapshot e.g. Two Factor protection etc. | | | **licenceType** | **string** | OS type of this Snapshot | | ### Return type [**Snapshot**](../models/Snapshot.md) ### HTTP request headers - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json ## DatacentersVolumesDelete ```go var result = DatacentersVolumesDelete(ctx, datacenterId, volumeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Delete volumes ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resp, err := apiClient.VolumesApi.DatacentersVolumesDelete(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesDeleteRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersVolumesFindById ```go var result Volume = DatacentersVolumesFindById(ctx, datacenterId, volumeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Retrieve volumes ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.VolumesApi.DatacentersVolumesFindById(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersVolumesFindById`: Volume fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesFindById`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesFindByIdRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Volume**](../models/Volume.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersVolumesGet ```go var result Volumes = DatacentersVolumesGet(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute() ``` List volumes ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with limit for pagination). (optional) (default to 0) limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.VolumesApi.DatacentersVolumesGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersVolumesGet`: Volumes fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesGet`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesGetRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **offset** | **int32** | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). | [default to 0]| | **limit** | **int32** | The maximum number of elements to return (use together with offset for pagination). | [default to 1000]| ### Return type [**Volumes**](../models/Volumes.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## DatacentersVolumesPatch ```go var result Volume = DatacentersVolumesPatch(ctx, datacenterId, volumeId) .Volume(volume) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Partially modify volumes ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. volume := *openapiclient.NewVolumeProperties(float32(100)) // VolumeProperties | The properties of the volume to be updated. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.VolumesApi.DatacentersVolumesPatch(context.Background(), datacenterId, volumeId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersVolumesPatch`: Volume fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesPatch`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesPatchRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **volume** | [**VolumeProperties**](../models/VolumeProperties.md) | The properties of the volume to be updated. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Volume**](../models/Volume.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersVolumesPost ```go var result Volume = DatacentersVolumesPost(ctx, datacenterId) .Volume(volume) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Create a Volume ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volume := *openapiclient.NewVolume(*openapiclient.NewVolumeProperties(float32(100))) // Volume | The volume to create. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.VolumesApi.DatacentersVolumesPost(context.Background(), datacenterId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersVolumesPost`: Volume fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesPost`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **volume** | [**Volume**](../models/Volume.md) | The volume to create. | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Volume**](../models/Volume.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersVolumesPut ```go var result Volume = DatacentersVolumesPut(ctx, datacenterId, volumeId) .Volume(volume) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute() ``` Modify a Volume by ID ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. volume := *openapiclient.NewVolume(*openapiclient.NewVolumeProperties(float32(100))) // Volume | The modified volume pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.VolumesApi.DatacentersVolumesPut(context.Background(), datacenterId, volumeId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DatacentersVolumesPut`: Volume fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesPut`: %v\n", resp) } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesPutRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **volume** | [**Volume**](../models/Volume.md) | The modified volume | | | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | ### Return type [**Volume**](../models/Volume.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## DatacentersVolumesRestoreSnapshotPost ```go var result = DatacentersVolumesRestoreSnapshotPost(ctx, datacenterId, volumeId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .SnapshotId(snapshotId) .Execute() ``` Restore volume snapshots ### Example ```go package main import ( "context" "fmt" "os" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) func main() { datacenterId := "datacenterId_example" // string | The unique ID of the data center. volumeId := "volumeId_example" // string | The unique ID of the volume. pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true) depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on (optional) (default to 0) xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional) snapshotId := "snapshotId_example" // string | The unique ID of the snapshot. (optional) configuration := ionoscloud.NewConfiguration() apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.VolumesApi.DatacentersVolumesRestoreSnapshotPost(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).SnapshotId(snapshotId).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesRestoreSnapshotPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` ### Path Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**datacenterId** | **string** | The unique ID of the data center. | | |**volumeId** | **string** | The unique ID of the volume. | | ### Other Parameters Other parameters are passed through a pointer to a apiDatacentersVolumesRestoreSnapshotPostRequest struct via the builder pattern |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **pretty** | **bool** | Controls whether the response is pretty-printed (with indentations and new lines). | [default to true]| | **depth** | **int32** | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [default to 0]| | **xContractNumber** | **int32** | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | | | **snapshotId** | **string** | The unique ID of the snapshot. | | ### Return type (empty response body) ### HTTP request headers - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/json golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/000077500000000000000000000000001465267054300221105ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ApplicationLoadBalancer.md000066400000000000000000000122511465267054300271260ustar00rootroot00000000000000# ApplicationLoadBalancer ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**ApplicationLoadBalancerProperties**](ApplicationLoadBalancerProperties.md) | | | |**Entities** | Pointer to [**ApplicationLoadBalancerEntities**](ApplicationLoadBalancerEntities.md) | | [optional] | ## Methods ### NewApplicationLoadBalancer `func NewApplicationLoadBalancer(properties ApplicationLoadBalancerProperties, ) *ApplicationLoadBalancer` NewApplicationLoadBalancer instantiates a new ApplicationLoadBalancer object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancerWithDefaults `func NewApplicationLoadBalancerWithDefaults() *ApplicationLoadBalancer` NewApplicationLoadBalancerWithDefaults instantiates a new ApplicationLoadBalancer object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *ApplicationLoadBalancer) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *ApplicationLoadBalancer) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *ApplicationLoadBalancer) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *ApplicationLoadBalancer) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *ApplicationLoadBalancer) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ApplicationLoadBalancer) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ApplicationLoadBalancer) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *ApplicationLoadBalancer) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *ApplicationLoadBalancer) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *ApplicationLoadBalancer) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *ApplicationLoadBalancer) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *ApplicationLoadBalancer) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *ApplicationLoadBalancer) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *ApplicationLoadBalancer) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *ApplicationLoadBalancer) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *ApplicationLoadBalancer) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *ApplicationLoadBalancer) GetProperties() ApplicationLoadBalancerProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *ApplicationLoadBalancer) GetPropertiesOk() (*ApplicationLoadBalancerProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *ApplicationLoadBalancer) SetProperties(v ApplicationLoadBalancerProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *ApplicationLoadBalancer) GetEntities() ApplicationLoadBalancerEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *ApplicationLoadBalancer) GetEntitiesOk() (*ApplicationLoadBalancerEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *ApplicationLoadBalancer) SetEntities(v ApplicationLoadBalancerEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *ApplicationLoadBalancer) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ApplicationLoadBalancerEntities.md000066400000000000000000000037141465267054300306370ustar00rootroot00000000000000# ApplicationLoadBalancerEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Forwardingrules** | Pointer to [**ApplicationLoadBalancerForwardingRules**](ApplicationLoadBalancerForwardingRules.md) | | [optional] | ## Methods ### NewApplicationLoadBalancerEntities `func NewApplicationLoadBalancerEntities() *ApplicationLoadBalancerEntities` NewApplicationLoadBalancerEntities instantiates a new ApplicationLoadBalancerEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancerEntitiesWithDefaults `func NewApplicationLoadBalancerEntitiesWithDefaults() *ApplicationLoadBalancerEntities` NewApplicationLoadBalancerEntitiesWithDefaults instantiates a new ApplicationLoadBalancerEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetForwardingrules `func (o *ApplicationLoadBalancerEntities) GetForwardingrules() ApplicationLoadBalancerForwardingRules` GetForwardingrules returns the Forwardingrules field if non-nil, zero value otherwise. ### GetForwardingrulesOk `func (o *ApplicationLoadBalancerEntities) GetForwardingrulesOk() (*ApplicationLoadBalancerForwardingRules, bool)` GetForwardingrulesOk returns a tuple with the Forwardingrules field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetForwardingrules `func (o *ApplicationLoadBalancerEntities) SetForwardingrules(v ApplicationLoadBalancerForwardingRules)` SetForwardingrules sets Forwardingrules field to given value. ### HasForwardingrules `func (o *ApplicationLoadBalancerEntities) HasForwardingrules() bool` HasForwardingrules returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ApplicationLoadBalancerForwardingRule.md000066400000000000000000000115451465267054300320060ustar00rootroot00000000000000# ApplicationLoadBalancerForwardingRule ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**ApplicationLoadBalancerForwardingRuleProperties**](ApplicationLoadBalancerForwardingRuleProperties.md) | | | ## Methods ### NewApplicationLoadBalancerForwardingRule `func NewApplicationLoadBalancerForwardingRule(properties ApplicationLoadBalancerForwardingRuleProperties, ) *ApplicationLoadBalancerForwardingRule` NewApplicationLoadBalancerForwardingRule instantiates a new ApplicationLoadBalancerForwardingRule object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancerForwardingRuleWithDefaults `func NewApplicationLoadBalancerForwardingRuleWithDefaults() *ApplicationLoadBalancerForwardingRule` NewApplicationLoadBalancerForwardingRuleWithDefaults instantiates a new ApplicationLoadBalancerForwardingRule object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *ApplicationLoadBalancerForwardingRule) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *ApplicationLoadBalancerForwardingRule) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *ApplicationLoadBalancerForwardingRule) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *ApplicationLoadBalancerForwardingRule) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *ApplicationLoadBalancerForwardingRule) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ApplicationLoadBalancerForwardingRule) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ApplicationLoadBalancerForwardingRule) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *ApplicationLoadBalancerForwardingRule) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *ApplicationLoadBalancerForwardingRule) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *ApplicationLoadBalancerForwardingRule) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *ApplicationLoadBalancerForwardingRule) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *ApplicationLoadBalancerForwardingRule) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *ApplicationLoadBalancerForwardingRule) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *ApplicationLoadBalancerForwardingRule) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *ApplicationLoadBalancerForwardingRule) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *ApplicationLoadBalancerForwardingRule) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *ApplicationLoadBalancerForwardingRule) GetProperties() ApplicationLoadBalancerForwardingRuleProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *ApplicationLoadBalancerForwardingRule) GetPropertiesOk() (*ApplicationLoadBalancerForwardingRuleProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *ApplicationLoadBalancerForwardingRule) SetProperties(v ApplicationLoadBalancerForwardingRuleProperties)` SetProperties sets Properties field to given value. ApplicationLoadBalancerForwardingRuleProperties.md000066400000000000000000000156621465267054300340100ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/docs/models# ApplicationLoadBalancerForwardingRuleProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The name of the Application Load Balancer forwarding rule. | | |**Protocol** | **string** | The balancing protocol. | | |**ListenerIp** | **string** | The listening (inbound) IP. | | |**ListenerPort** | **int32** | The listening (inbound) port number; the valid range is 1 to 65535. | | |**ClientTimeout** | Pointer to **int32** | The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). | [optional] | |**ServerCertificates** | Pointer to **[]string** | Array of items in the collection. | [optional] | |**HttpRules** | Pointer to [**[]ApplicationLoadBalancerHttpRule**](ApplicationLoadBalancerHttpRule.md) | An array of items in the collection. The original order of rules is preserved during processing, except that rules of the 'FORWARD' type are processed after the rules with other defined actions. The relative order of the 'FORWARD' type rules is also preserved during the processing. | [optional] | ## Methods ### NewApplicationLoadBalancerForwardingRuleProperties `func NewApplicationLoadBalancerForwardingRuleProperties(name string, protocol string, listenerIp string, listenerPort int32, ) *ApplicationLoadBalancerForwardingRuleProperties` NewApplicationLoadBalancerForwardingRuleProperties instantiates a new ApplicationLoadBalancerForwardingRuleProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancerForwardingRulePropertiesWithDefaults `func NewApplicationLoadBalancerForwardingRulePropertiesWithDefaults() *ApplicationLoadBalancerForwardingRuleProperties` NewApplicationLoadBalancerForwardingRulePropertiesWithDefaults instantiates a new ApplicationLoadBalancerForwardingRuleProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *ApplicationLoadBalancerForwardingRuleProperties) SetName(v string)` SetName sets Name field to given value. ### GetProtocol `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetProtocol() string` GetProtocol returns the Protocol field if non-nil, zero value otherwise. ### GetProtocolOk `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetProtocolOk() (*string, bool)` GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProtocol `func (o *ApplicationLoadBalancerForwardingRuleProperties) SetProtocol(v string)` SetProtocol sets Protocol field to given value. ### GetListenerIp `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerIp() string` GetListenerIp returns the ListenerIp field if non-nil, zero value otherwise. ### GetListenerIpOk `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerIpOk() (*string, bool)` GetListenerIpOk returns a tuple with the ListenerIp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetListenerIp `func (o *ApplicationLoadBalancerForwardingRuleProperties) SetListenerIp(v string)` SetListenerIp sets ListenerIp field to given value. ### GetListenerPort `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerPort() int32` GetListenerPort returns the ListenerPort field if non-nil, zero value otherwise. ### GetListenerPortOk `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerPortOk() (*int32, bool)` GetListenerPortOk returns a tuple with the ListenerPort field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetListenerPort `func (o *ApplicationLoadBalancerForwardingRuleProperties) SetListenerPort(v int32)` SetListenerPort sets ListenerPort field to given value. ### GetClientTimeout `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetClientTimeout() int32` GetClientTimeout returns the ClientTimeout field if non-nil, zero value otherwise. ### GetClientTimeoutOk `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetClientTimeoutOk() (*int32, bool)` GetClientTimeoutOk returns a tuple with the ClientTimeout field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetClientTimeout `func (o *ApplicationLoadBalancerForwardingRuleProperties) SetClientTimeout(v int32)` SetClientTimeout sets ClientTimeout field to given value. ### HasClientTimeout `func (o *ApplicationLoadBalancerForwardingRuleProperties) HasClientTimeout() bool` HasClientTimeout returns a boolean if a field has been set. ### GetServerCertificates `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetServerCertificates() []string` GetServerCertificates returns the ServerCertificates field if non-nil, zero value otherwise. ### GetServerCertificatesOk `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetServerCertificatesOk() (*[]string, bool)` GetServerCertificatesOk returns a tuple with the ServerCertificates field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetServerCertificates `func (o *ApplicationLoadBalancerForwardingRuleProperties) SetServerCertificates(v []string)` SetServerCertificates sets ServerCertificates field to given value. ### HasServerCertificates `func (o *ApplicationLoadBalancerForwardingRuleProperties) HasServerCertificates() bool` HasServerCertificates returns a boolean if a field has been set. ### GetHttpRules `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetHttpRules() []ApplicationLoadBalancerHttpRule` GetHttpRules returns the HttpRules field if non-nil, zero value otherwise. ### GetHttpRulesOk `func (o *ApplicationLoadBalancerForwardingRuleProperties) GetHttpRulesOk() (*[]ApplicationLoadBalancerHttpRule, bool)` GetHttpRulesOk returns a tuple with the HttpRules field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHttpRules `func (o *ApplicationLoadBalancerForwardingRuleProperties) SetHttpRules(v []ApplicationLoadBalancerHttpRule)` SetHttpRules sets HttpRules field to given value. ### HasHttpRules `func (o *ApplicationLoadBalancerForwardingRuleProperties) HasHttpRules() bool` HasHttpRules returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ApplicationLoadBalancerForwardingRulePut.md000066400000000000000000000101351465267054300324710ustar00rootroot00000000000000# ApplicationLoadBalancerForwardingRulePut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**ApplicationLoadBalancerForwardingRuleProperties**](ApplicationLoadBalancerForwardingRuleProperties.md) | | | ## Methods ### NewApplicationLoadBalancerForwardingRulePut `func NewApplicationLoadBalancerForwardingRulePut(properties ApplicationLoadBalancerForwardingRuleProperties, ) *ApplicationLoadBalancerForwardingRulePut` NewApplicationLoadBalancerForwardingRulePut instantiates a new ApplicationLoadBalancerForwardingRulePut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancerForwardingRulePutWithDefaults `func NewApplicationLoadBalancerForwardingRulePutWithDefaults() *ApplicationLoadBalancerForwardingRulePut` NewApplicationLoadBalancerForwardingRulePutWithDefaults instantiates a new ApplicationLoadBalancerForwardingRulePut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *ApplicationLoadBalancerForwardingRulePut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *ApplicationLoadBalancerForwardingRulePut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *ApplicationLoadBalancerForwardingRulePut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *ApplicationLoadBalancerForwardingRulePut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *ApplicationLoadBalancerForwardingRulePut) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ApplicationLoadBalancerForwardingRulePut) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ApplicationLoadBalancerForwardingRulePut) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *ApplicationLoadBalancerForwardingRulePut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *ApplicationLoadBalancerForwardingRulePut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *ApplicationLoadBalancerForwardingRulePut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *ApplicationLoadBalancerForwardingRulePut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *ApplicationLoadBalancerForwardingRulePut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *ApplicationLoadBalancerForwardingRulePut) GetProperties() ApplicationLoadBalancerForwardingRuleProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *ApplicationLoadBalancerForwardingRulePut) GetPropertiesOk() (*ApplicationLoadBalancerForwardingRuleProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *ApplicationLoadBalancerForwardingRulePut) SetProperties(v ApplicationLoadBalancerForwardingRuleProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ApplicationLoadBalancerForwardingRules.md000066400000000000000000000144471465267054300321750ustar00rootroot00000000000000# ApplicationLoadBalancerForwardingRules ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]ApplicationLoadBalancerForwardingRule**](ApplicationLoadBalancerForwardingRule.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewApplicationLoadBalancerForwardingRules `func NewApplicationLoadBalancerForwardingRules() *ApplicationLoadBalancerForwardingRules` NewApplicationLoadBalancerForwardingRules instantiates a new ApplicationLoadBalancerForwardingRules object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancerForwardingRulesWithDefaults `func NewApplicationLoadBalancerForwardingRulesWithDefaults() *ApplicationLoadBalancerForwardingRules` NewApplicationLoadBalancerForwardingRulesWithDefaults instantiates a new ApplicationLoadBalancerForwardingRules object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *ApplicationLoadBalancerForwardingRules) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *ApplicationLoadBalancerForwardingRules) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *ApplicationLoadBalancerForwardingRules) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *ApplicationLoadBalancerForwardingRules) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *ApplicationLoadBalancerForwardingRules) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ApplicationLoadBalancerForwardingRules) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ApplicationLoadBalancerForwardingRules) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *ApplicationLoadBalancerForwardingRules) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *ApplicationLoadBalancerForwardingRules) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *ApplicationLoadBalancerForwardingRules) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *ApplicationLoadBalancerForwardingRules) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *ApplicationLoadBalancerForwardingRules) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *ApplicationLoadBalancerForwardingRules) GetItems() []ApplicationLoadBalancerForwardingRule` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *ApplicationLoadBalancerForwardingRules) GetItemsOk() (*[]ApplicationLoadBalancerForwardingRule, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *ApplicationLoadBalancerForwardingRules) SetItems(v []ApplicationLoadBalancerForwardingRule)` SetItems sets Items field to given value. ### HasItems `func (o *ApplicationLoadBalancerForwardingRules) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *ApplicationLoadBalancerForwardingRules) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *ApplicationLoadBalancerForwardingRules) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *ApplicationLoadBalancerForwardingRules) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *ApplicationLoadBalancerForwardingRules) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *ApplicationLoadBalancerForwardingRules) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *ApplicationLoadBalancerForwardingRules) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *ApplicationLoadBalancerForwardingRules) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *ApplicationLoadBalancerForwardingRules) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *ApplicationLoadBalancerForwardingRules) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *ApplicationLoadBalancerForwardingRules) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *ApplicationLoadBalancerForwardingRules) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *ApplicationLoadBalancerForwardingRules) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ApplicationLoadBalancerHttpRule.md000066400000000000000000000207541465267054300306250ustar00rootroot00000000000000# ApplicationLoadBalancerHttpRule ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The unique name of the Application Load Balancer HTTP rule. | | |**Type** | **string** | The HTTP rule type. | | |**TargetGroup** | Pointer to **string** | The ID of the target group; this parameter is mandatory and is valid only for 'FORWARD' actions. | [optional] | |**DropQuery** | Pointer to **bool** | Indicates whether the query part of the URI should be dropped and is valid only for 'REDIRECT' actions. Default value is 'FALSE', the redirect URI does not contain any query parameters. | [optional] | |**Location** | Pointer to **string** | The location for the redirection; this parameter is mandatory and valid only for 'REDIRECT' actions. | [optional] | |**StatusCode** | Pointer to **int32** | The status code is for 'REDIRECT' and 'STATIC' actions only. If the HTTP rule is 'REDIRECT' the valid values are: 301, 302, 303, 307, 308; default value is '301'. If the HTTP rule is 'STATIC' the valid values are from the range 200-599; default value is '503'. | [optional] | |**ResponseMessage** | Pointer to **string** | The response message of the request; this parameter is mandatory for 'STATIC' actions. | [optional] | |**ContentType** | Pointer to **string** | Specifies the content type and is valid only for 'STATIC' actions. | [optional] | |**Conditions** | Pointer to [**[]ApplicationLoadBalancerHttpRuleCondition**](ApplicationLoadBalancerHttpRuleCondition.md) | An array of items in the collection. The action will be executed only if each condition is met; the rule will always be applied if no conditions are set. | [optional] | ## Methods ### NewApplicationLoadBalancerHttpRule `func NewApplicationLoadBalancerHttpRule(name string, type_ string, ) *ApplicationLoadBalancerHttpRule` NewApplicationLoadBalancerHttpRule instantiates a new ApplicationLoadBalancerHttpRule object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancerHttpRuleWithDefaults `func NewApplicationLoadBalancerHttpRuleWithDefaults() *ApplicationLoadBalancerHttpRule` NewApplicationLoadBalancerHttpRuleWithDefaults instantiates a new ApplicationLoadBalancerHttpRule object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *ApplicationLoadBalancerHttpRule) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *ApplicationLoadBalancerHttpRule) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *ApplicationLoadBalancerHttpRule) SetName(v string)` SetName sets Name field to given value. ### GetType `func (o *ApplicationLoadBalancerHttpRule) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ApplicationLoadBalancerHttpRule) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ApplicationLoadBalancerHttpRule) SetType(v string)` SetType sets Type field to given value. ### GetTargetGroup `func (o *ApplicationLoadBalancerHttpRule) GetTargetGroup() string` GetTargetGroup returns the TargetGroup field if non-nil, zero value otherwise. ### GetTargetGroupOk `func (o *ApplicationLoadBalancerHttpRule) GetTargetGroupOk() (*string, bool)` GetTargetGroupOk returns a tuple with the TargetGroup field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTargetGroup `func (o *ApplicationLoadBalancerHttpRule) SetTargetGroup(v string)` SetTargetGroup sets TargetGroup field to given value. ### HasTargetGroup `func (o *ApplicationLoadBalancerHttpRule) HasTargetGroup() bool` HasTargetGroup returns a boolean if a field has been set. ### GetDropQuery `func (o *ApplicationLoadBalancerHttpRule) GetDropQuery() bool` GetDropQuery returns the DropQuery field if non-nil, zero value otherwise. ### GetDropQueryOk `func (o *ApplicationLoadBalancerHttpRule) GetDropQueryOk() (*bool, bool)` GetDropQueryOk returns a tuple with the DropQuery field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDropQuery `func (o *ApplicationLoadBalancerHttpRule) SetDropQuery(v bool)` SetDropQuery sets DropQuery field to given value. ### HasDropQuery `func (o *ApplicationLoadBalancerHttpRule) HasDropQuery() bool` HasDropQuery returns a boolean if a field has been set. ### GetLocation `func (o *ApplicationLoadBalancerHttpRule) GetLocation() string` GetLocation returns the Location field if non-nil, zero value otherwise. ### GetLocationOk `func (o *ApplicationLoadBalancerHttpRule) GetLocationOk() (*string, bool)` GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLocation `func (o *ApplicationLoadBalancerHttpRule) SetLocation(v string)` SetLocation sets Location field to given value. ### HasLocation `func (o *ApplicationLoadBalancerHttpRule) HasLocation() bool` HasLocation returns a boolean if a field has been set. ### GetStatusCode `func (o *ApplicationLoadBalancerHttpRule) GetStatusCode() int32` GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. ### GetStatusCodeOk `func (o *ApplicationLoadBalancerHttpRule) GetStatusCodeOk() (*int32, bool)` GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatusCode `func (o *ApplicationLoadBalancerHttpRule) SetStatusCode(v int32)` SetStatusCode sets StatusCode field to given value. ### HasStatusCode `func (o *ApplicationLoadBalancerHttpRule) HasStatusCode() bool` HasStatusCode returns a boolean if a field has been set. ### GetResponseMessage `func (o *ApplicationLoadBalancerHttpRule) GetResponseMessage() string` GetResponseMessage returns the ResponseMessage field if non-nil, zero value otherwise. ### GetResponseMessageOk `func (o *ApplicationLoadBalancerHttpRule) GetResponseMessageOk() (*string, bool)` GetResponseMessageOk returns a tuple with the ResponseMessage field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetResponseMessage `func (o *ApplicationLoadBalancerHttpRule) SetResponseMessage(v string)` SetResponseMessage sets ResponseMessage field to given value. ### HasResponseMessage `func (o *ApplicationLoadBalancerHttpRule) HasResponseMessage() bool` HasResponseMessage returns a boolean if a field has been set. ### GetContentType `func (o *ApplicationLoadBalancerHttpRule) GetContentType() string` GetContentType returns the ContentType field if non-nil, zero value otherwise. ### GetContentTypeOk `func (o *ApplicationLoadBalancerHttpRule) GetContentTypeOk() (*string, bool)` GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetContentType `func (o *ApplicationLoadBalancerHttpRule) SetContentType(v string)` SetContentType sets ContentType field to given value. ### HasContentType `func (o *ApplicationLoadBalancerHttpRule) HasContentType() bool` HasContentType returns a boolean if a field has been set. ### GetConditions `func (o *ApplicationLoadBalancerHttpRule) GetConditions() []ApplicationLoadBalancerHttpRuleCondition` GetConditions returns the Conditions field if non-nil, zero value otherwise. ### GetConditionsOk `func (o *ApplicationLoadBalancerHttpRule) GetConditionsOk() (*[]ApplicationLoadBalancerHttpRuleCondition, bool)` GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetConditions `func (o *ApplicationLoadBalancerHttpRule) SetConditions(v []ApplicationLoadBalancerHttpRuleCondition)` SetConditions sets Conditions field to given value. ### HasConditions `func (o *ApplicationLoadBalancerHttpRule) HasConditions() bool` HasConditions returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ApplicationLoadBalancerHttpRuleCondition.md000066400000000000000000000122221465267054300324630ustar00rootroot00000000000000# ApplicationLoadBalancerHttpRuleCondition ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Type** | **string** | The HTTP rule condition type. | | |**Condition** | **string** | The matching rule for the HTTP rule condition attribute; this parameter is mandatory for 'HEADER', 'PATH', 'QUERY', 'METHOD', 'HOST', and 'COOKIE' types. It must be 'null' if the type is 'SOURCE_IP'. | | |**Negate** | Pointer to **bool** | Specifies whether the condition should be negated; the default value is 'FALSE'. | [optional] | |**Key** | Pointer to **string** | The key can only be set when the HTTP rule condition type is 'COOKIES', 'HEADER', or 'QUERY'. For the type 'PATH', 'METHOD', 'HOST', or 'SOURCE_IP' the value must be 'null'. | [optional] | |**Value** | Pointer to **string** | This parameter is mandatory for the conditions 'CONTAINS', 'EQUALS', 'MATCHES', 'STARTS_WITH', 'ENDS_WITH', or if the type is 'SOURCE_IP'. Specify a valid CIDR. If the condition is 'EXISTS', the value must be 'null'. | [optional] | ## Methods ### NewApplicationLoadBalancerHttpRuleCondition `func NewApplicationLoadBalancerHttpRuleCondition(type_ string, condition string, ) *ApplicationLoadBalancerHttpRuleCondition` NewApplicationLoadBalancerHttpRuleCondition instantiates a new ApplicationLoadBalancerHttpRuleCondition object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancerHttpRuleConditionWithDefaults `func NewApplicationLoadBalancerHttpRuleConditionWithDefaults() *ApplicationLoadBalancerHttpRuleCondition` NewApplicationLoadBalancerHttpRuleConditionWithDefaults instantiates a new ApplicationLoadBalancerHttpRuleCondition object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetType `func (o *ApplicationLoadBalancerHttpRuleCondition) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ApplicationLoadBalancerHttpRuleCondition) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ApplicationLoadBalancerHttpRuleCondition) SetType(v string)` SetType sets Type field to given value. ### GetCondition `func (o *ApplicationLoadBalancerHttpRuleCondition) GetCondition() string` GetCondition returns the Condition field if non-nil, zero value otherwise. ### GetConditionOk `func (o *ApplicationLoadBalancerHttpRuleCondition) GetConditionOk() (*string, bool)` GetConditionOk returns a tuple with the Condition field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCondition `func (o *ApplicationLoadBalancerHttpRuleCondition) SetCondition(v string)` SetCondition sets Condition field to given value. ### GetNegate `func (o *ApplicationLoadBalancerHttpRuleCondition) GetNegate() bool` GetNegate returns the Negate field if non-nil, zero value otherwise. ### GetNegateOk `func (o *ApplicationLoadBalancerHttpRuleCondition) GetNegateOk() (*bool, bool)` GetNegateOk returns a tuple with the Negate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNegate `func (o *ApplicationLoadBalancerHttpRuleCondition) SetNegate(v bool)` SetNegate sets Negate field to given value. ### HasNegate `func (o *ApplicationLoadBalancerHttpRuleCondition) HasNegate() bool` HasNegate returns a boolean if a field has been set. ### GetKey `func (o *ApplicationLoadBalancerHttpRuleCondition) GetKey() string` GetKey returns the Key field if non-nil, zero value otherwise. ### GetKeyOk `func (o *ApplicationLoadBalancerHttpRuleCondition) GetKeyOk() (*string, bool)` GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetKey `func (o *ApplicationLoadBalancerHttpRuleCondition) SetKey(v string)` SetKey sets Key field to given value. ### HasKey `func (o *ApplicationLoadBalancerHttpRuleCondition) HasKey() bool` HasKey returns a boolean if a field has been set. ### GetValue `func (o *ApplicationLoadBalancerHttpRuleCondition) GetValue() string` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk `func (o *ApplicationLoadBalancerHttpRuleCondition) GetValueOk() (*string, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue `func (o *ApplicationLoadBalancerHttpRuleCondition) SetValue(v string)` SetValue sets Value field to given value. ### HasValue `func (o *ApplicationLoadBalancerHttpRuleCondition) HasValue() bool` HasValue returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ApplicationLoadBalancerProperties.md000066400000000000000000000145521465267054300312110ustar00rootroot00000000000000# ApplicationLoadBalancerProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The Application Load Balancer name. | | |**ListenerLan** | **int32** | The ID of the listening (inbound) LAN. | | |**Ips** | Pointer to **[]string** | Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the 'listenerLan' are customer-reserved public IPs for the public load balancers, and private IPs for the private load balancers. | [optional] | |**TargetLan** | **int32** | The ID of the balanced private target LAN (outbound). | | |**LbPrivateIps** | Pointer to **[]string** | Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. | [optional] | |**CentralLogging** | Pointer to **bool** | Turn logging on and off for this product. Default value is 'false'. | [optional] | |**LoggingFormat** | Pointer to **string** | Specifies the format of the logs. | [optional] | ## Methods ### NewApplicationLoadBalancerProperties `func NewApplicationLoadBalancerProperties(name string, listenerLan int32, targetLan int32, ) *ApplicationLoadBalancerProperties` NewApplicationLoadBalancerProperties instantiates a new ApplicationLoadBalancerProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancerPropertiesWithDefaults `func NewApplicationLoadBalancerPropertiesWithDefaults() *ApplicationLoadBalancerProperties` NewApplicationLoadBalancerPropertiesWithDefaults instantiates a new ApplicationLoadBalancerProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *ApplicationLoadBalancerProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *ApplicationLoadBalancerProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *ApplicationLoadBalancerProperties) SetName(v string)` SetName sets Name field to given value. ### GetListenerLan `func (o *ApplicationLoadBalancerProperties) GetListenerLan() int32` GetListenerLan returns the ListenerLan field if non-nil, zero value otherwise. ### GetListenerLanOk `func (o *ApplicationLoadBalancerProperties) GetListenerLanOk() (*int32, bool)` GetListenerLanOk returns a tuple with the ListenerLan field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetListenerLan `func (o *ApplicationLoadBalancerProperties) SetListenerLan(v int32)` SetListenerLan sets ListenerLan field to given value. ### GetIps `func (o *ApplicationLoadBalancerProperties) GetIps() []string` GetIps returns the Ips field if non-nil, zero value otherwise. ### GetIpsOk `func (o *ApplicationLoadBalancerProperties) GetIpsOk() (*[]string, bool)` GetIpsOk returns a tuple with the Ips field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIps `func (o *ApplicationLoadBalancerProperties) SetIps(v []string)` SetIps sets Ips field to given value. ### HasIps `func (o *ApplicationLoadBalancerProperties) HasIps() bool` HasIps returns a boolean if a field has been set. ### GetTargetLan `func (o *ApplicationLoadBalancerProperties) GetTargetLan() int32` GetTargetLan returns the TargetLan field if non-nil, zero value otherwise. ### GetTargetLanOk `func (o *ApplicationLoadBalancerProperties) GetTargetLanOk() (*int32, bool)` GetTargetLanOk returns a tuple with the TargetLan field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTargetLan `func (o *ApplicationLoadBalancerProperties) SetTargetLan(v int32)` SetTargetLan sets TargetLan field to given value. ### GetLbPrivateIps `func (o *ApplicationLoadBalancerProperties) GetLbPrivateIps() []string` GetLbPrivateIps returns the LbPrivateIps field if non-nil, zero value otherwise. ### GetLbPrivateIpsOk `func (o *ApplicationLoadBalancerProperties) GetLbPrivateIpsOk() (*[]string, bool)` GetLbPrivateIpsOk returns a tuple with the LbPrivateIps field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLbPrivateIps `func (o *ApplicationLoadBalancerProperties) SetLbPrivateIps(v []string)` SetLbPrivateIps sets LbPrivateIps field to given value. ### HasLbPrivateIps `func (o *ApplicationLoadBalancerProperties) HasLbPrivateIps() bool` HasLbPrivateIps returns a boolean if a field has been set. ### GetCentralLogging `func (o *ApplicationLoadBalancerProperties) GetCentralLogging() bool` GetCentralLogging returns the CentralLogging field if non-nil, zero value otherwise. ### GetCentralLoggingOk `func (o *ApplicationLoadBalancerProperties) GetCentralLoggingOk() (*bool, bool)` GetCentralLoggingOk returns a tuple with the CentralLogging field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCentralLogging `func (o *ApplicationLoadBalancerProperties) SetCentralLogging(v bool)` SetCentralLogging sets CentralLogging field to given value. ### HasCentralLogging `func (o *ApplicationLoadBalancerProperties) HasCentralLogging() bool` HasCentralLogging returns a boolean if a field has been set. ### GetLoggingFormat `func (o *ApplicationLoadBalancerProperties) GetLoggingFormat() string` GetLoggingFormat returns the LoggingFormat field if non-nil, zero value otherwise. ### GetLoggingFormatOk `func (o *ApplicationLoadBalancerProperties) GetLoggingFormatOk() (*string, bool)` GetLoggingFormatOk returns a tuple with the LoggingFormat field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLoggingFormat `func (o *ApplicationLoadBalancerProperties) SetLoggingFormat(v string)` SetLoggingFormat sets LoggingFormat field to given value. ### HasLoggingFormat `func (o *ApplicationLoadBalancerProperties) HasLoggingFormat() bool` HasLoggingFormat returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ApplicationLoadBalancerPut.md000066400000000000000000000072351465267054300276250ustar00rootroot00000000000000# ApplicationLoadBalancerPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**ApplicationLoadBalancerProperties**](ApplicationLoadBalancerProperties.md) | | | ## Methods ### NewApplicationLoadBalancerPut `func NewApplicationLoadBalancerPut(properties ApplicationLoadBalancerProperties, ) *ApplicationLoadBalancerPut` NewApplicationLoadBalancerPut instantiates a new ApplicationLoadBalancerPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancerPutWithDefaults `func NewApplicationLoadBalancerPutWithDefaults() *ApplicationLoadBalancerPut` NewApplicationLoadBalancerPutWithDefaults instantiates a new ApplicationLoadBalancerPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *ApplicationLoadBalancerPut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *ApplicationLoadBalancerPut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *ApplicationLoadBalancerPut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *ApplicationLoadBalancerPut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *ApplicationLoadBalancerPut) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ApplicationLoadBalancerPut) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ApplicationLoadBalancerPut) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *ApplicationLoadBalancerPut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *ApplicationLoadBalancerPut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *ApplicationLoadBalancerPut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *ApplicationLoadBalancerPut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *ApplicationLoadBalancerPut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *ApplicationLoadBalancerPut) GetProperties() ApplicationLoadBalancerProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *ApplicationLoadBalancerPut) GetPropertiesOk() (*ApplicationLoadBalancerProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *ApplicationLoadBalancerPut) SetProperties(v ApplicationLoadBalancerProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ApplicationLoadBalancers.md000066400000000000000000000132771465267054300273220ustar00rootroot00000000000000# ApplicationLoadBalancers ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]ApplicationLoadBalancer**](ApplicationLoadBalancer.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewApplicationLoadBalancers `func NewApplicationLoadBalancers() *ApplicationLoadBalancers` NewApplicationLoadBalancers instantiates a new ApplicationLoadBalancers object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewApplicationLoadBalancersWithDefaults `func NewApplicationLoadBalancersWithDefaults() *ApplicationLoadBalancers` NewApplicationLoadBalancersWithDefaults instantiates a new ApplicationLoadBalancers object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *ApplicationLoadBalancers) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *ApplicationLoadBalancers) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *ApplicationLoadBalancers) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *ApplicationLoadBalancers) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *ApplicationLoadBalancers) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ApplicationLoadBalancers) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ApplicationLoadBalancers) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *ApplicationLoadBalancers) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *ApplicationLoadBalancers) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *ApplicationLoadBalancers) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *ApplicationLoadBalancers) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *ApplicationLoadBalancers) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *ApplicationLoadBalancers) GetItems() []ApplicationLoadBalancer` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *ApplicationLoadBalancers) GetItemsOk() (*[]ApplicationLoadBalancer, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *ApplicationLoadBalancers) SetItems(v []ApplicationLoadBalancer)` SetItems sets Items field to given value. ### HasItems `func (o *ApplicationLoadBalancers) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *ApplicationLoadBalancers) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *ApplicationLoadBalancers) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *ApplicationLoadBalancers) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *ApplicationLoadBalancers) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *ApplicationLoadBalancers) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *ApplicationLoadBalancers) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *ApplicationLoadBalancers) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *ApplicationLoadBalancers) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *ApplicationLoadBalancers) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *ApplicationLoadBalancers) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *ApplicationLoadBalancers) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *ApplicationLoadBalancers) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/AttachedVolumes.md000066400000000000000000000124001465267054300255170ustar00rootroot00000000000000# AttachedVolumes ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Volume**](Volume.md) | Array of items in the collection. | [optional] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewAttachedVolumes `func NewAttachedVolumes() *AttachedVolumes` NewAttachedVolumes instantiates a new AttachedVolumes object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewAttachedVolumesWithDefaults `func NewAttachedVolumesWithDefaults() *AttachedVolumes` NewAttachedVolumesWithDefaults instantiates a new AttachedVolumes object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *AttachedVolumes) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *AttachedVolumes) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *AttachedVolumes) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *AttachedVolumes) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *AttachedVolumes) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *AttachedVolumes) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *AttachedVolumes) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *AttachedVolumes) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *AttachedVolumes) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *AttachedVolumes) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *AttachedVolumes) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *AttachedVolumes) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *AttachedVolumes) GetItems() []Volume` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *AttachedVolumes) GetItemsOk() (*[]Volume, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *AttachedVolumes) SetItems(v []Volume)` SetItems sets Items field to given value. ### HasItems `func (o *AttachedVolumes) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *AttachedVolumes) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *AttachedVolumes) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *AttachedVolumes) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *AttachedVolumes) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *AttachedVolumes) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *AttachedVolumes) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *AttachedVolumes) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *AttachedVolumes) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *AttachedVolumes) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *AttachedVolumes) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *AttachedVolumes) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *AttachedVolumes) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/BackupUnit.md000066400000000000000000000076351465267054300245120ustar00rootroot00000000000000# BackupUnit ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to **string** | The type of object that has been created. | [optional] [readonly] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**BackupUnitProperties**](BackupUnitProperties.md) | | | ## Methods ### NewBackupUnit `func NewBackupUnit(properties BackupUnitProperties, ) *BackupUnit` NewBackupUnit instantiates a new BackupUnit object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewBackupUnitWithDefaults `func NewBackupUnitWithDefaults() *BackupUnit` NewBackupUnitWithDefaults instantiates a new BackupUnit object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *BackupUnit) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *BackupUnit) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *BackupUnit) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *BackupUnit) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *BackupUnit) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *BackupUnit) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *BackupUnit) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *BackupUnit) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *BackupUnit) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *BackupUnit) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *BackupUnit) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *BackupUnit) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *BackupUnit) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *BackupUnit) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *BackupUnit) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *BackupUnit) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *BackupUnit) GetProperties() BackupUnitProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *BackupUnit) GetPropertiesOk() (*BackupUnitProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *BackupUnit) SetProperties(v BackupUnitProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/BackupUnitProperties.md000066400000000000000000000055021465267054300265560ustar00rootroot00000000000000# BackupUnitProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The name of the resource (alphanumeric characters only). | | |**Password** | Pointer to **string** | The password associated with that resource. | [optional] | |**Email** | Pointer to **string** | The email associated with the backup unit. Bear in mind that this email does not be the same email as of the user. | [optional] | ## Methods ### NewBackupUnitProperties `func NewBackupUnitProperties(name string, ) *BackupUnitProperties` NewBackupUnitProperties instantiates a new BackupUnitProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewBackupUnitPropertiesWithDefaults `func NewBackupUnitPropertiesWithDefaults() *BackupUnitProperties` NewBackupUnitPropertiesWithDefaults instantiates a new BackupUnitProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *BackupUnitProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *BackupUnitProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *BackupUnitProperties) SetName(v string)` SetName sets Name field to given value. ### GetPassword `func (o *BackupUnitProperties) GetPassword() string` GetPassword returns the Password field if non-nil, zero value otherwise. ### GetPasswordOk `func (o *BackupUnitProperties) GetPasswordOk() (*string, bool)` GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPassword `func (o *BackupUnitProperties) SetPassword(v string)` SetPassword sets Password field to given value. ### HasPassword `func (o *BackupUnitProperties) HasPassword() bool` HasPassword returns a boolean if a field has been set. ### GetEmail `func (o *BackupUnitProperties) GetEmail() string` GetEmail returns the Email field if non-nil, zero value otherwise. ### GetEmailOk `func (o *BackupUnitProperties) GetEmailOk() (*string, bool)` GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEmail `func (o *BackupUnitProperties) SetEmail(v string)` SetEmail sets Email field to given value. ### HasEmail `func (o *BackupUnitProperties) HasEmail() bool` HasEmail returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/BackupUnitSSO.md000066400000000000000000000026561465267054300250750ustar00rootroot00000000000000# BackupUnitSSO ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**SsoUrl** | Pointer to **string** | The backup unit single sign on url | [optional] [readonly] | ## Methods ### NewBackupUnitSSO `func NewBackupUnitSSO() *BackupUnitSSO` NewBackupUnitSSO instantiates a new BackupUnitSSO object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewBackupUnitSSOWithDefaults `func NewBackupUnitSSOWithDefaults() *BackupUnitSSO` NewBackupUnitSSOWithDefaults instantiates a new BackupUnitSSO object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetSsoUrl `func (o *BackupUnitSSO) GetSsoUrl() string` GetSsoUrl returns the SsoUrl field if non-nil, zero value otherwise. ### GetSsoUrlOk `func (o *BackupUnitSSO) GetSsoUrlOk() (*string, bool)` GetSsoUrlOk returns a tuple with the SsoUrl field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSsoUrl `func (o *BackupUnitSSO) SetSsoUrl(v string)` SetSsoUrl sets SsoUrl field to given value. ### HasSsoUrl `func (o *BackupUnitSSO) HasSsoUrl() bool` HasSsoUrl returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/BackupUnits.md000066400000000000000000000063561465267054300246740ustar00rootroot00000000000000# BackupUnits ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to **string** | The type of object that has been created. | [optional] [readonly] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]BackupUnit**](BackupUnit.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewBackupUnits `func NewBackupUnits() *BackupUnits` NewBackupUnits instantiates a new BackupUnits object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewBackupUnitsWithDefaults `func NewBackupUnitsWithDefaults() *BackupUnits` NewBackupUnitsWithDefaults instantiates a new BackupUnits object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *BackupUnits) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *BackupUnits) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *BackupUnits) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *BackupUnits) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *BackupUnits) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *BackupUnits) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *BackupUnits) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *BackupUnits) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *BackupUnits) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *BackupUnits) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *BackupUnits) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *BackupUnits) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *BackupUnits) GetItems() []BackupUnit` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *BackupUnits) GetItemsOk() (*[]BackupUnit, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *BackupUnits) SetItems(v []BackupUnit)` SetItems sets Items field to given value. ### HasItems `func (o *BackupUnits) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/BalancedNics.md000066400000000000000000000122031465267054300247360ustar00rootroot00000000000000# BalancedNics ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Nic**](Nic.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewBalancedNics `func NewBalancedNics() *BalancedNics` NewBalancedNics instantiates a new BalancedNics object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewBalancedNicsWithDefaults `func NewBalancedNicsWithDefaults() *BalancedNics` NewBalancedNicsWithDefaults instantiates a new BalancedNics object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *BalancedNics) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *BalancedNics) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *BalancedNics) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *BalancedNics) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *BalancedNics) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *BalancedNics) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *BalancedNics) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *BalancedNics) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *BalancedNics) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *BalancedNics) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *BalancedNics) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *BalancedNics) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *BalancedNics) GetItems() []Nic` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *BalancedNics) GetItemsOk() (*[]Nic, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *BalancedNics) SetItems(v []Nic)` SetItems sets Items field to given value. ### HasItems `func (o *BalancedNics) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *BalancedNics) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *BalancedNics) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *BalancedNics) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *BalancedNics) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *BalancedNics) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *BalancedNics) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *BalancedNics) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *BalancedNics) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *BalancedNics) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *BalancedNics) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *BalancedNics) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *BalancedNics) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Cdroms.md000066400000000000000000000116301465267054300236620ustar00rootroot00000000000000# Cdroms ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Image**](Image.md) | Array of items in the collection. | [optional] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewCdroms `func NewCdroms() *Cdroms` NewCdroms instantiates a new Cdroms object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewCdromsWithDefaults `func NewCdromsWithDefaults() *Cdroms` NewCdromsWithDefaults instantiates a new Cdroms object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Cdroms) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Cdroms) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Cdroms) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Cdroms) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Cdroms) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Cdroms) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Cdroms) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Cdroms) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Cdroms) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Cdroms) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Cdroms) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Cdroms) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Cdroms) GetItems() []Image` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Cdroms) GetItemsOk() (*[]Image, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Cdroms) SetItems(v []Image)` SetItems sets Items field to given value. ### HasItems `func (o *Cdroms) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *Cdroms) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *Cdroms) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *Cdroms) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *Cdroms) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *Cdroms) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *Cdroms) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *Cdroms) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *Cdroms) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *Cdroms) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *Cdroms) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *Cdroms) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *Cdroms) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ConnectableDatacenter.md000066400000000000000000000056701465267054300266520ustar00rootroot00000000000000# ConnectableDatacenter ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | Identifier of the virtual data center that can be connected to the Cross Connect. | [optional] | |**Name** | Pointer to **string** | Name of the virtual data center that can be connected to the Cross Connect. | [optional] | |**Location** | Pointer to **string** | Location of the virtual data center that can be connected to the Cross Connect. | [optional] | ## Methods ### NewConnectableDatacenter `func NewConnectableDatacenter() *ConnectableDatacenter` NewConnectableDatacenter instantiates a new ConnectableDatacenter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewConnectableDatacenterWithDefaults `func NewConnectableDatacenterWithDefaults() *ConnectableDatacenter` NewConnectableDatacenterWithDefaults instantiates a new ConnectableDatacenter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *ConnectableDatacenter) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *ConnectableDatacenter) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *ConnectableDatacenter) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *ConnectableDatacenter) HasId() bool` HasId returns a boolean if a field has been set. ### GetName `func (o *ConnectableDatacenter) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *ConnectableDatacenter) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *ConnectableDatacenter) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *ConnectableDatacenter) HasName() bool` HasName returns a boolean if a field has been set. ### GetLocation `func (o *ConnectableDatacenter) GetLocation() string` GetLocation returns the Location field if non-nil, zero value otherwise. ### GetLocationOk `func (o *ConnectableDatacenter) GetLocationOk() (*string, bool)` GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLocation `func (o *ConnectableDatacenter) SetLocation(v string)` SetLocation sets Location field to given value. ### HasLocation `func (o *ConnectableDatacenter) HasLocation() bool` HasLocation returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Contract.md000066400000000000000000000036431465267054300242150ustar00rootroot00000000000000# Contract ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Type** | Pointer to [**Type**](Type.md) | The type of the resource. | [optional] | |**Properties** | [**ContractProperties**](ContractProperties.md) | | | ## Methods ### NewContract `func NewContract(properties ContractProperties, ) *Contract` NewContract instantiates a new Contract object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewContractWithDefaults `func NewContractWithDefaults() *Contract` NewContractWithDefaults instantiates a new Contract object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetType `func (o *Contract) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Contract) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Contract) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Contract) HasType() bool` HasType returns a boolean if a field has been set. ### GetProperties `func (o *Contract) GetProperties() ContractProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Contract) GetPropertiesOk() (*ContractProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Contract) SetProperties(v ContractProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ContractProperties.md000066400000000000000000000106641465267054300262730ustar00rootroot00000000000000# ContractProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**ContractNumber** | Pointer to **int64** | The contract number. | [optional] [readonly] | |**Owner** | Pointer to **string** | The contract owner's user name. | [optional] [readonly] | |**Status** | Pointer to **string** | The contract status. | [optional] [readonly] | |**RegDomain** | Pointer to **string** | The registration domain of the contract. | [optional] [readonly] | |**ResourceLimits** | Pointer to [**ResourceLimits**](ResourceLimits.md) | | [optional] | ## Methods ### NewContractProperties `func NewContractProperties() *ContractProperties` NewContractProperties instantiates a new ContractProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewContractPropertiesWithDefaults `func NewContractPropertiesWithDefaults() *ContractProperties` NewContractPropertiesWithDefaults instantiates a new ContractProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetContractNumber `func (o *ContractProperties) GetContractNumber() int64` GetContractNumber returns the ContractNumber field if non-nil, zero value otherwise. ### GetContractNumberOk `func (o *ContractProperties) GetContractNumberOk() (*int64, bool)` GetContractNumberOk returns a tuple with the ContractNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetContractNumber `func (o *ContractProperties) SetContractNumber(v int64)` SetContractNumber sets ContractNumber field to given value. ### HasContractNumber `func (o *ContractProperties) HasContractNumber() bool` HasContractNumber returns a boolean if a field has been set. ### GetOwner `func (o *ContractProperties) GetOwner() string` GetOwner returns the Owner field if non-nil, zero value otherwise. ### GetOwnerOk `func (o *ContractProperties) GetOwnerOk() (*string, bool)` GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOwner `func (o *ContractProperties) SetOwner(v string)` SetOwner sets Owner field to given value. ### HasOwner `func (o *ContractProperties) HasOwner() bool` HasOwner returns a boolean if a field has been set. ### GetStatus `func (o *ContractProperties) GetStatus() string` GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk `func (o *ContractProperties) GetStatusOk() (*string, bool)` GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatus `func (o *ContractProperties) SetStatus(v string)` SetStatus sets Status field to given value. ### HasStatus `func (o *ContractProperties) HasStatus() bool` HasStatus returns a boolean if a field has been set. ### GetRegDomain `func (o *ContractProperties) GetRegDomain() string` GetRegDomain returns the RegDomain field if non-nil, zero value otherwise. ### GetRegDomainOk `func (o *ContractProperties) GetRegDomainOk() (*string, bool)` GetRegDomainOk returns a tuple with the RegDomain field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRegDomain `func (o *ContractProperties) SetRegDomain(v string)` SetRegDomain sets RegDomain field to given value. ### HasRegDomain `func (o *ContractProperties) HasRegDomain() bool` HasRegDomain returns a boolean if a field has been set. ### GetResourceLimits `func (o *ContractProperties) GetResourceLimits() ResourceLimits` GetResourceLimits returns the ResourceLimits field if non-nil, zero value otherwise. ### GetResourceLimitsOk `func (o *ContractProperties) GetResourceLimitsOk() (*ResourceLimits, bool)` GetResourceLimitsOk returns a tuple with the ResourceLimits field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetResourceLimits `func (o *ContractProperties) SetResourceLimits(v ResourceLimits)` SetResourceLimits sets ResourceLimits field to given value. ### HasResourceLimits `func (o *ContractProperties) HasResourceLimits() bool` HasResourceLimits returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Contracts.md000066400000000000000000000062521465267054300243770ustar00rootroot00000000000000# Contracts ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Contract**](Contract.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewContracts `func NewContracts() *Contracts` NewContracts instantiates a new Contracts object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewContractsWithDefaults `func NewContractsWithDefaults() *Contracts` NewContractsWithDefaults instantiates a new Contracts object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Contracts) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Contracts) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Contracts) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Contracts) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Contracts) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Contracts) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Contracts) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Contracts) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Contracts) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Contracts) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Contracts) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Contracts) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Contracts) GetItems() []Contract` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Contracts) GetItemsOk() (*[]Contract, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Contracts) SetItems(v []Contract)` SetItems sets Items field to given value. ### HasItems `func (o *Contracts) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/CpuArchitectureProperties.md000066400000000000000000000072741465267054300276130ustar00rootroot00000000000000# CpuArchitectureProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**CpuFamily** | Pointer to **string** | A valid CPU family name. | [optional] | |**MaxCores** | Pointer to **int32** | The maximum number of cores available. | [optional] | |**MaxRam** | Pointer to **int32** | The maximum RAM size in MB. | [optional] | |**Vendor** | Pointer to **string** | A valid CPU vendor name. | [optional] | ## Methods ### NewCpuArchitectureProperties `func NewCpuArchitectureProperties() *CpuArchitectureProperties` NewCpuArchitectureProperties instantiates a new CpuArchitectureProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewCpuArchitecturePropertiesWithDefaults `func NewCpuArchitecturePropertiesWithDefaults() *CpuArchitectureProperties` NewCpuArchitecturePropertiesWithDefaults instantiates a new CpuArchitectureProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetCpuFamily `func (o *CpuArchitectureProperties) GetCpuFamily() string` GetCpuFamily returns the CpuFamily field if non-nil, zero value otherwise. ### GetCpuFamilyOk `func (o *CpuArchitectureProperties) GetCpuFamilyOk() (*string, bool)` GetCpuFamilyOk returns a tuple with the CpuFamily field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuFamily `func (o *CpuArchitectureProperties) SetCpuFamily(v string)` SetCpuFamily sets CpuFamily field to given value. ### HasCpuFamily `func (o *CpuArchitectureProperties) HasCpuFamily() bool` HasCpuFamily returns a boolean if a field has been set. ### GetMaxCores `func (o *CpuArchitectureProperties) GetMaxCores() int32` GetMaxCores returns the MaxCores field if non-nil, zero value otherwise. ### GetMaxCoresOk `func (o *CpuArchitectureProperties) GetMaxCoresOk() (*int32, bool)` GetMaxCoresOk returns a tuple with the MaxCores field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaxCores `func (o *CpuArchitectureProperties) SetMaxCores(v int32)` SetMaxCores sets MaxCores field to given value. ### HasMaxCores `func (o *CpuArchitectureProperties) HasMaxCores() bool` HasMaxCores returns a boolean if a field has been set. ### GetMaxRam `func (o *CpuArchitectureProperties) GetMaxRam() int32` GetMaxRam returns the MaxRam field if non-nil, zero value otherwise. ### GetMaxRamOk `func (o *CpuArchitectureProperties) GetMaxRamOk() (*int32, bool)` GetMaxRamOk returns a tuple with the MaxRam field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaxRam `func (o *CpuArchitectureProperties) SetMaxRam(v int32)` SetMaxRam sets MaxRam field to given value. ### HasMaxRam `func (o *CpuArchitectureProperties) HasMaxRam() bool` HasMaxRam returns a boolean if a field has been set. ### GetVendor `func (o *CpuArchitectureProperties) GetVendor() string` GetVendor returns the Vendor field if non-nil, zero value otherwise. ### GetVendorOk `func (o *CpuArchitectureProperties) GetVendorOk() (*string, bool)` GetVendorOk returns a tuple with the Vendor field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetVendor `func (o *CpuArchitectureProperties) SetVendor(v string)` SetVendor sets Vendor field to given value. ### HasVendor `func (o *CpuArchitectureProperties) HasVendor() bool` HasVendor returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/DataCenterEntities.md000066400000000000000000000122621465267054300261540ustar00rootroot00000000000000# DataCenterEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Servers** | Pointer to [**Servers**](Servers.md) | | [optional] | |**Volumes** | Pointer to [**Volumes**](Volumes.md) | | [optional] | |**Loadbalancers** | Pointer to [**Loadbalancers**](Loadbalancers.md) | | [optional] | |**Lans** | Pointer to [**Lans**](Lans.md) | | [optional] | |**Networkloadbalancers** | Pointer to [**NetworkLoadBalancers**](NetworkLoadBalancers.md) | | [optional] | |**Natgateways** | Pointer to [**NatGateways**](NatGateways.md) | | [optional] | ## Methods ### NewDataCenterEntities `func NewDataCenterEntities() *DataCenterEntities` NewDataCenterEntities instantiates a new DataCenterEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewDataCenterEntitiesWithDefaults `func NewDataCenterEntitiesWithDefaults() *DataCenterEntities` NewDataCenterEntitiesWithDefaults instantiates a new DataCenterEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetServers `func (o *DataCenterEntities) GetServers() Servers` GetServers returns the Servers field if non-nil, zero value otherwise. ### GetServersOk `func (o *DataCenterEntities) GetServersOk() (*Servers, bool)` GetServersOk returns a tuple with the Servers field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetServers `func (o *DataCenterEntities) SetServers(v Servers)` SetServers sets Servers field to given value. ### HasServers `func (o *DataCenterEntities) HasServers() bool` HasServers returns a boolean if a field has been set. ### GetVolumes `func (o *DataCenterEntities) GetVolumes() Volumes` GetVolumes returns the Volumes field if non-nil, zero value otherwise. ### GetVolumesOk `func (o *DataCenterEntities) GetVolumesOk() (*Volumes, bool)` GetVolumesOk returns a tuple with the Volumes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetVolumes `func (o *DataCenterEntities) SetVolumes(v Volumes)` SetVolumes sets Volumes field to given value. ### HasVolumes `func (o *DataCenterEntities) HasVolumes() bool` HasVolumes returns a boolean if a field has been set. ### GetLoadbalancers `func (o *DataCenterEntities) GetLoadbalancers() Loadbalancers` GetLoadbalancers returns the Loadbalancers field if non-nil, zero value otherwise. ### GetLoadbalancersOk `func (o *DataCenterEntities) GetLoadbalancersOk() (*Loadbalancers, bool)` GetLoadbalancersOk returns a tuple with the Loadbalancers field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLoadbalancers `func (o *DataCenterEntities) SetLoadbalancers(v Loadbalancers)` SetLoadbalancers sets Loadbalancers field to given value. ### HasLoadbalancers `func (o *DataCenterEntities) HasLoadbalancers() bool` HasLoadbalancers returns a boolean if a field has been set. ### GetLans `func (o *DataCenterEntities) GetLans() Lans` GetLans returns the Lans field if non-nil, zero value otherwise. ### GetLansOk `func (o *DataCenterEntities) GetLansOk() (*Lans, bool)` GetLansOk returns a tuple with the Lans field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLans `func (o *DataCenterEntities) SetLans(v Lans)` SetLans sets Lans field to given value. ### HasLans `func (o *DataCenterEntities) HasLans() bool` HasLans returns a boolean if a field has been set. ### GetNetworkloadbalancers `func (o *DataCenterEntities) GetNetworkloadbalancers() NetworkLoadBalancers` GetNetworkloadbalancers returns the Networkloadbalancers field if non-nil, zero value otherwise. ### GetNetworkloadbalancersOk `func (o *DataCenterEntities) GetNetworkloadbalancersOk() (*NetworkLoadBalancers, bool)` GetNetworkloadbalancersOk returns a tuple with the Networkloadbalancers field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNetworkloadbalancers `func (o *DataCenterEntities) SetNetworkloadbalancers(v NetworkLoadBalancers)` SetNetworkloadbalancers sets Networkloadbalancers field to given value. ### HasNetworkloadbalancers `func (o *DataCenterEntities) HasNetworkloadbalancers() bool` HasNetworkloadbalancers returns a boolean if a field has been set. ### GetNatgateways `func (o *DataCenterEntities) GetNatgateways() NatGateways` GetNatgateways returns the Natgateways field if non-nil, zero value otherwise. ### GetNatgatewaysOk `func (o *DataCenterEntities) GetNatgatewaysOk() (*NatGateways, bool)` GetNatgatewaysOk returns a tuple with the Natgateways field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNatgateways `func (o *DataCenterEntities) SetNatgateways(v NatGateways)` SetNatgateways sets Natgateways field to given value. ### HasNatgateways `func (o *DataCenterEntities) HasNatgateways() bool` HasNatgateways returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Datacenter.md000066400000000000000000000111341465267054300245040ustar00rootroot00000000000000# Datacenter ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**DatacenterProperties**](DatacenterProperties.md) | | | |**Entities** | Pointer to [**DataCenterEntities**](DataCenterEntities.md) | | [optional] | ## Methods ### NewDatacenter `func NewDatacenter(properties DatacenterProperties, ) *Datacenter` NewDatacenter instantiates a new Datacenter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewDatacenterWithDefaults `func NewDatacenterWithDefaults() *Datacenter` NewDatacenterWithDefaults instantiates a new Datacenter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Datacenter) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Datacenter) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Datacenter) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Datacenter) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Datacenter) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Datacenter) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Datacenter) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Datacenter) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Datacenter) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Datacenter) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Datacenter) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Datacenter) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Datacenter) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Datacenter) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Datacenter) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Datacenter) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Datacenter) GetProperties() DatacenterProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Datacenter) GetPropertiesOk() (*DatacenterProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Datacenter) SetProperties(v DatacenterProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *Datacenter) GetEntities() DataCenterEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *Datacenter) GetEntitiesOk() (*DataCenterEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *Datacenter) SetEntities(v DataCenterEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *Datacenter) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/DatacenterElementMetadata.md000066400000000000000000000215201465267054300274570ustar00rootroot00000000000000# DatacenterElementMetadata ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Etag** | Pointer to **string** | Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. | [optional] [readonly] | |**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The last time the resource was created. | [optional] [readonly] | |**CreatedBy** | Pointer to **string** | The user who created the resource. | [optional] [readonly] | |**CreatedByUserId** | Pointer to **string** | The unique ID of the user who created the resource. | [optional] [readonly] | |**LastModifiedDate** | Pointer to [**time.Time**](time.Time.md) | The last time the resource was modified. | [optional] [readonly] | |**LastModifiedBy** | Pointer to **string** | The user who last modified the resource. | [optional] [readonly] | |**LastModifiedByUserId** | Pointer to **string** | The unique ID of the user who last modified the resource. | [optional] [readonly] | |**State** | Pointer to **string** | State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool. | [optional] [readonly] | ## Methods ### NewDatacenterElementMetadata `func NewDatacenterElementMetadata() *DatacenterElementMetadata` NewDatacenterElementMetadata instantiates a new DatacenterElementMetadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewDatacenterElementMetadataWithDefaults `func NewDatacenterElementMetadataWithDefaults() *DatacenterElementMetadata` NewDatacenterElementMetadataWithDefaults instantiates a new DatacenterElementMetadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetEtag `func (o *DatacenterElementMetadata) GetEtag() string` GetEtag returns the Etag field if non-nil, zero value otherwise. ### GetEtagOk `func (o *DatacenterElementMetadata) GetEtagOk() (*string, bool)` GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEtag `func (o *DatacenterElementMetadata) SetEtag(v string)` SetEtag sets Etag field to given value. ### HasEtag `func (o *DatacenterElementMetadata) HasEtag() bool` HasEtag returns a boolean if a field has been set. ### GetCreatedDate `func (o *DatacenterElementMetadata) GetCreatedDate() time.Time` GetCreatedDate returns the CreatedDate field if non-nil, zero value otherwise. ### GetCreatedDateOk `func (o *DatacenterElementMetadata) GetCreatedDateOk() (*time.Time, bool)` GetCreatedDateOk returns a tuple with the CreatedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedDate `func (o *DatacenterElementMetadata) SetCreatedDate(v time.Time)` SetCreatedDate sets CreatedDate field to given value. ### HasCreatedDate `func (o *DatacenterElementMetadata) HasCreatedDate() bool` HasCreatedDate returns a boolean if a field has been set. ### GetCreatedBy `func (o *DatacenterElementMetadata) GetCreatedBy() string` GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. ### GetCreatedByOk `func (o *DatacenterElementMetadata) GetCreatedByOk() (*string, bool)` GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedBy `func (o *DatacenterElementMetadata) SetCreatedBy(v string)` SetCreatedBy sets CreatedBy field to given value. ### HasCreatedBy `func (o *DatacenterElementMetadata) HasCreatedBy() bool` HasCreatedBy returns a boolean if a field has been set. ### GetCreatedByUserId `func (o *DatacenterElementMetadata) GetCreatedByUserId() string` GetCreatedByUserId returns the CreatedByUserId field if non-nil, zero value otherwise. ### GetCreatedByUserIdOk `func (o *DatacenterElementMetadata) GetCreatedByUserIdOk() (*string, bool)` GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedByUserId `func (o *DatacenterElementMetadata) SetCreatedByUserId(v string)` SetCreatedByUserId sets CreatedByUserId field to given value. ### HasCreatedByUserId `func (o *DatacenterElementMetadata) HasCreatedByUserId() bool` HasCreatedByUserId returns a boolean if a field has been set. ### GetLastModifiedDate `func (o *DatacenterElementMetadata) GetLastModifiedDate() time.Time` GetLastModifiedDate returns the LastModifiedDate field if non-nil, zero value otherwise. ### GetLastModifiedDateOk `func (o *DatacenterElementMetadata) GetLastModifiedDateOk() (*time.Time, bool)` GetLastModifiedDateOk returns a tuple with the LastModifiedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastModifiedDate `func (o *DatacenterElementMetadata) SetLastModifiedDate(v time.Time)` SetLastModifiedDate sets LastModifiedDate field to given value. ### HasLastModifiedDate `func (o *DatacenterElementMetadata) HasLastModifiedDate() bool` HasLastModifiedDate returns a boolean if a field has been set. ### GetLastModifiedBy `func (o *DatacenterElementMetadata) GetLastModifiedBy() string` GetLastModifiedBy returns the LastModifiedBy field if non-nil, zero value otherwise. ### GetLastModifiedByOk `func (o *DatacenterElementMetadata) GetLastModifiedByOk() (*string, bool)` GetLastModifiedByOk returns a tuple with the LastModifiedBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastModifiedBy `func (o *DatacenterElementMetadata) SetLastModifiedBy(v string)` SetLastModifiedBy sets LastModifiedBy field to given value. ### HasLastModifiedBy `func (o *DatacenterElementMetadata) HasLastModifiedBy() bool` HasLastModifiedBy returns a boolean if a field has been set. ### GetLastModifiedByUserId `func (o *DatacenterElementMetadata) GetLastModifiedByUserId() string` GetLastModifiedByUserId returns the LastModifiedByUserId field if non-nil, zero value otherwise. ### GetLastModifiedByUserIdOk `func (o *DatacenterElementMetadata) GetLastModifiedByUserIdOk() (*string, bool)` GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastModifiedByUserId `func (o *DatacenterElementMetadata) SetLastModifiedByUserId(v string)` SetLastModifiedByUserId sets LastModifiedByUserId field to given value. ### HasLastModifiedByUserId `func (o *DatacenterElementMetadata) HasLastModifiedByUserId() bool` HasLastModifiedByUserId returns a boolean if a field has been set. ### GetState `func (o *DatacenterElementMetadata) GetState() string` GetState returns the State field if non-nil, zero value otherwise. ### GetStateOk `func (o *DatacenterElementMetadata) GetStateOk() (*string, bool)` GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetState `func (o *DatacenterElementMetadata) SetState(v string)` SetState sets State field to given value. ### HasState `func (o *DatacenterElementMetadata) HasState() bool` HasState returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/DatacenterProperties.md000066400000000000000000000171451465267054300265710ustar00rootroot00000000000000# DatacenterProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**Description** | Pointer to **string** | A description for the datacenter, such as staging, production. | [optional] | |**Location** | **string** | The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests). | | |**Version** | Pointer to **int32** | The version of the data center; incremented with every change. | [optional] [readonly] | |**Features** | Pointer to **[]string** | List of features supported by the location where this data center is provisioned. | [optional] [readonly] | |**SecAuthProtection** | Pointer to **bool** | Boolean value representing if the data center requires extra protection, such as two-step verification. | [optional] | |**CpuArchitecture** | Pointer to [**[]CpuArchitectureProperties**](CpuArchitectureProperties.md) | Array of features and CPU families available in a location | [optional] [readonly] | |**Ipv6CidrBlock** | Pointer to **NullableString** | This value is either 'null' or contains an automatically-assigned /56 IPv6 CIDR block if IPv6 is enabled on this virtual data center. It can neither be changed nor removed. | [optional] [readonly] | ## Methods ### NewDatacenterProperties `func NewDatacenterProperties(location string, ) *DatacenterProperties` NewDatacenterProperties instantiates a new DatacenterProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewDatacenterPropertiesWithDefaults `func NewDatacenterPropertiesWithDefaults() *DatacenterProperties` NewDatacenterPropertiesWithDefaults instantiates a new DatacenterProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *DatacenterProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *DatacenterProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *DatacenterProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *DatacenterProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetDescription `func (o *DatacenterProperties) GetDescription() string` GetDescription returns the Description field if non-nil, zero value otherwise. ### GetDescriptionOk `func (o *DatacenterProperties) GetDescriptionOk() (*string, bool)` GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDescription `func (o *DatacenterProperties) SetDescription(v string)` SetDescription sets Description field to given value. ### HasDescription `func (o *DatacenterProperties) HasDescription() bool` HasDescription returns a boolean if a field has been set. ### GetLocation `func (o *DatacenterProperties) GetLocation() string` GetLocation returns the Location field if non-nil, zero value otherwise. ### GetLocationOk `func (o *DatacenterProperties) GetLocationOk() (*string, bool)` GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLocation `func (o *DatacenterProperties) SetLocation(v string)` SetLocation sets Location field to given value. ### GetVersion `func (o *DatacenterProperties) GetVersion() int32` GetVersion returns the Version field if non-nil, zero value otherwise. ### GetVersionOk `func (o *DatacenterProperties) GetVersionOk() (*int32, bool)` GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetVersion `func (o *DatacenterProperties) SetVersion(v int32)` SetVersion sets Version field to given value. ### HasVersion `func (o *DatacenterProperties) HasVersion() bool` HasVersion returns a boolean if a field has been set. ### GetFeatures `func (o *DatacenterProperties) GetFeatures() []string` GetFeatures returns the Features field if non-nil, zero value otherwise. ### GetFeaturesOk `func (o *DatacenterProperties) GetFeaturesOk() (*[]string, bool)` GetFeaturesOk returns a tuple with the Features field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFeatures `func (o *DatacenterProperties) SetFeatures(v []string)` SetFeatures sets Features field to given value. ### HasFeatures `func (o *DatacenterProperties) HasFeatures() bool` HasFeatures returns a boolean if a field has been set. ### GetSecAuthProtection `func (o *DatacenterProperties) GetSecAuthProtection() bool` GetSecAuthProtection returns the SecAuthProtection field if non-nil, zero value otherwise. ### GetSecAuthProtectionOk `func (o *DatacenterProperties) GetSecAuthProtectionOk() (*bool, bool)` GetSecAuthProtectionOk returns a tuple with the SecAuthProtection field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSecAuthProtection `func (o *DatacenterProperties) SetSecAuthProtection(v bool)` SetSecAuthProtection sets SecAuthProtection field to given value. ### HasSecAuthProtection `func (o *DatacenterProperties) HasSecAuthProtection() bool` HasSecAuthProtection returns a boolean if a field has been set. ### GetCpuArchitecture `func (o *DatacenterProperties) GetCpuArchitecture() []CpuArchitectureProperties` GetCpuArchitecture returns the CpuArchitecture field if non-nil, zero value otherwise. ### GetCpuArchitectureOk `func (o *DatacenterProperties) GetCpuArchitectureOk() (*[]CpuArchitectureProperties, bool)` GetCpuArchitectureOk returns a tuple with the CpuArchitecture field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuArchitecture `func (o *DatacenterProperties) SetCpuArchitecture(v []CpuArchitectureProperties)` SetCpuArchitecture sets CpuArchitecture field to given value. ### HasCpuArchitecture `func (o *DatacenterProperties) HasCpuArchitecture() bool` HasCpuArchitecture returns a boolean if a field has been set. ### GetIpv6CidrBlock `func (o *DatacenterProperties) GetIpv6CidrBlock() string` GetIpv6CidrBlock returns the Ipv6CidrBlock field if non-nil, zero value otherwise. ### GetIpv6CidrBlockOk `func (o *DatacenterProperties) GetIpv6CidrBlockOk() (*string, bool)` GetIpv6CidrBlockOk returns a tuple with the Ipv6CidrBlock field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIpv6CidrBlock `func (o *DatacenterProperties) SetIpv6CidrBlock(v string)` SetIpv6CidrBlock sets Ipv6CidrBlock field to given value. ### HasIpv6CidrBlock `func (o *DatacenterProperties) HasIpv6CidrBlock() bool` HasIpv6CidrBlock returns a boolean if a field has been set. ### SetIpv6CidrBlockNil `func (o *DatacenterProperties) SetIpv6CidrBlockNil()` SetIpv6CidrBlockNil sets the value for Ipv6CidrBlock to be marshalled as an explicit nil Alternatively Ipv6CidrBlock can be set directly to the address `&Nilstring`, which is a sentinel value that is checked when marshalling. ### UnsetIpv6CidrBlock `func (o *DatacenterProperties) UnsetIpv6CidrBlock()` golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Datacenters.md000066400000000000000000000121771465267054300246770ustar00rootroot00000000000000# Datacenters ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Datacenter**](Datacenter.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewDatacenters `func NewDatacenters() *Datacenters` NewDatacenters instantiates a new Datacenters object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewDatacentersWithDefaults `func NewDatacentersWithDefaults() *Datacenters` NewDatacentersWithDefaults instantiates a new Datacenters object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Datacenters) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Datacenters) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Datacenters) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Datacenters) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Datacenters) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Datacenters) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Datacenters) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Datacenters) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Datacenters) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Datacenters) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Datacenters) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Datacenters) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Datacenters) GetItems() []Datacenter` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Datacenters) GetItemsOk() (*[]Datacenter, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Datacenters) SetItems(v []Datacenter)` SetItems sets Items field to given value. ### HasItems `func (o *Datacenters) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *Datacenters) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *Datacenters) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *Datacenters) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *Datacenters) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *Datacenters) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *Datacenters) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *Datacenters) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *Datacenters) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *Datacenters) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *Datacenters) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *Datacenters) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *Datacenters) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Error.md000066400000000000000000000040171465267054300235250ustar00rootroot00000000000000# Error ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**HttpStatus** | Pointer to **int32** | HTTP status code of the operation. | [optional] [readonly] | |**Messages** | Pointer to [**[]ErrorMessage**](ErrorMessage.md) | | [optional] | ## Methods ### NewError `func NewError() *Error` NewError instantiates a new Error object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewErrorWithDefaults `func NewErrorWithDefaults() *Error` NewErrorWithDefaults instantiates a new Error object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetHttpStatus `func (o *Error) GetHttpStatus() int32` GetHttpStatus returns the HttpStatus field if non-nil, zero value otherwise. ### GetHttpStatusOk `func (o *Error) GetHttpStatusOk() (*int32, bool)` GetHttpStatusOk returns a tuple with the HttpStatus field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHttpStatus `func (o *Error) SetHttpStatus(v int32)` SetHttpStatus sets HttpStatus field to given value. ### HasHttpStatus `func (o *Error) HasHttpStatus() bool` HasHttpStatus returns a boolean if a field has been set. ### GetMessages `func (o *Error) GetMessages() []ErrorMessage` GetMessages returns the Messages field if non-nil, zero value otherwise. ### GetMessagesOk `func (o *Error) GetMessagesOk() (*[]ErrorMessage, bool)` GetMessagesOk returns a tuple with the Messages field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMessages `func (o *Error) SetMessages(v []ErrorMessage)` SetMessages sets Messages field to given value. ### HasMessages `func (o *Error) HasMessages() bool` HasMessages returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ErrorMessage.md000066400000000000000000000041471465267054300250360ustar00rootroot00000000000000# ErrorMessage ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**ErrorCode** | Pointer to **string** | Application internal error code. | [optional] [readonly] | |**Message** | Pointer to **string** | A human-readable message. | [optional] [readonly] | ## Methods ### NewErrorMessage `func NewErrorMessage() *ErrorMessage` NewErrorMessage instantiates a new ErrorMessage object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewErrorMessageWithDefaults `func NewErrorMessageWithDefaults() *ErrorMessage` NewErrorMessageWithDefaults instantiates a new ErrorMessage object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetErrorCode `func (o *ErrorMessage) GetErrorCode() string` GetErrorCode returns the ErrorCode field if non-nil, zero value otherwise. ### GetErrorCodeOk `func (o *ErrorMessage) GetErrorCodeOk() (*string, bool)` GetErrorCodeOk returns a tuple with the ErrorCode field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetErrorCode `func (o *ErrorMessage) SetErrorCode(v string)` SetErrorCode sets ErrorCode field to given value. ### HasErrorCode `func (o *ErrorMessage) HasErrorCode() bool` HasErrorCode returns a boolean if a field has been set. ### GetMessage `func (o *ErrorMessage) GetMessage() string` GetMessage returns the Message field if non-nil, zero value otherwise. ### GetMessageOk `func (o *ErrorMessage) GetMessageOk() (*string, bool)` GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMessage `func (o *ErrorMessage) SetMessage(v string)` SetMessage sets Message field to given value. ### HasMessage `func (o *ErrorMessage) HasMessage() bool` HasMessage returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/FirewallRule.md000066400000000000000000000077351465267054300250430ustar00rootroot00000000000000# FirewallRule ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**FirewallruleProperties**](FirewallruleProperties.md) | | | ## Methods ### NewFirewallRule `func NewFirewallRule(properties FirewallruleProperties, ) *FirewallRule` NewFirewallRule instantiates a new FirewallRule object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewFirewallRuleWithDefaults `func NewFirewallRuleWithDefaults() *FirewallRule` NewFirewallRuleWithDefaults instantiates a new FirewallRule object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *FirewallRule) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *FirewallRule) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *FirewallRule) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *FirewallRule) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *FirewallRule) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *FirewallRule) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *FirewallRule) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *FirewallRule) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *FirewallRule) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *FirewallRule) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *FirewallRule) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *FirewallRule) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *FirewallRule) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *FirewallRule) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *FirewallRule) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *FirewallRule) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *FirewallRule) GetProperties() FirewallruleProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *FirewallRule) GetPropertiesOk() (*FirewallruleProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *FirewallRule) SetProperties(v FirewallruleProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/FirewallRules.md000066400000000000000000000123271465267054300252170ustar00rootroot00000000000000# FirewallRules ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]FirewallRule**](FirewallRule.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewFirewallRules `func NewFirewallRules() *FirewallRules` NewFirewallRules instantiates a new FirewallRules object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewFirewallRulesWithDefaults `func NewFirewallRulesWithDefaults() *FirewallRules` NewFirewallRulesWithDefaults instantiates a new FirewallRules object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *FirewallRules) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *FirewallRules) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *FirewallRules) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *FirewallRules) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *FirewallRules) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *FirewallRules) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *FirewallRules) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *FirewallRules) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *FirewallRules) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *FirewallRules) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *FirewallRules) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *FirewallRules) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *FirewallRules) GetItems() []FirewallRule` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *FirewallRules) GetItemsOk() (*[]FirewallRule, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *FirewallRules) SetItems(v []FirewallRule)` SetItems sets Items field to given value. ### HasItems `func (o *FirewallRules) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *FirewallRules) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *FirewallRules) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *FirewallRules) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *FirewallRules) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *FirewallRules) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *FirewallRules) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *FirewallRules) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *FirewallRules) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *FirewallRules) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *FirewallRules) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *FirewallRules) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *FirewallRules) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/FirewallruleProperties.md000066400000000000000000000300061465267054300271430ustar00rootroot00000000000000# FirewallruleProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**Protocol** | **string** | The protocol for the rule. Property cannot be modified after it is created (disallowed in update requests). | | |**SourceMac** | Pointer to **NullableString** | Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. Value null allows traffic from any MAC address. | [optional] | |**IpVersion** | Pointer to **NullableString** | The IP version for this rule. If sourceIp or targetIp are specified, you can omit this value - the IP version will then be deduced from the IP address(es) used; if you specify it anyway, it must match the specified IP address(es). If neither sourceIp nor targetIp are specified, this rule allows traffic only for the specified IP version. If neither sourceIp, targetIp nor ipVersion are specified, this rule will only allow IPv4 traffic. | [optional] | |**SourceIp** | Pointer to **NullableString** | Only traffic originating from the respective IP address (or CIDR block) is allowed. Value null allows traffic from any IP address (according to the selected ipVersion). | [optional] | |**TargetIp** | Pointer to **NullableString** | If the target NIC has multiple IP addresses, only the traffic directed to the respective IP address (or CIDR block) of the NIC is allowed. Value null allows traffic to any target IP address (according to the selected ipVersion). | [optional] | |**IcmpCode** | Pointer to **NullableInt32** | Defines the allowed code (from 0 to 254) if protocol ICMP or ICMPv6 is chosen. Value null allows all codes. | [optional] | |**IcmpType** | Pointer to **NullableInt32** | Defines the allowed type (from 0 to 254) if the protocol ICMP or ICMPv6 is chosen. Value null allows all types. | [optional] | |**PortRangeStart** | Pointer to **int32** | Defines the start range of the allowed port (from 1 to 65535) if protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd value null to allow all ports. | [optional] | |**PortRangeEnd** | Pointer to **int32** | Defines the end range of the allowed port (from 1 to 65535) if the protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports. | [optional] | |**Type** | Pointer to **string** | The type of the firewall rule. If not specified, the default INGRESS value is used. | [optional] | ## Methods ### NewFirewallruleProperties `func NewFirewallruleProperties(protocol string, ) *FirewallruleProperties` NewFirewallruleProperties instantiates a new FirewallruleProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewFirewallrulePropertiesWithDefaults `func NewFirewallrulePropertiesWithDefaults() *FirewallruleProperties` NewFirewallrulePropertiesWithDefaults instantiates a new FirewallruleProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *FirewallruleProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *FirewallruleProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *FirewallruleProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *FirewallruleProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetProtocol `func (o *FirewallruleProperties) GetProtocol() string` GetProtocol returns the Protocol field if non-nil, zero value otherwise. ### GetProtocolOk `func (o *FirewallruleProperties) GetProtocolOk() (*string, bool)` GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProtocol `func (o *FirewallruleProperties) SetProtocol(v string)` SetProtocol sets Protocol field to given value. ### GetSourceMac `func (o *FirewallruleProperties) GetSourceMac() string` GetSourceMac returns the SourceMac field if non-nil, zero value otherwise. ### GetSourceMacOk `func (o *FirewallruleProperties) GetSourceMacOk() (*string, bool)` GetSourceMacOk returns a tuple with the SourceMac field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSourceMac `func (o *FirewallruleProperties) SetSourceMac(v string)` SetSourceMac sets SourceMac field to given value. ### HasSourceMac `func (o *FirewallruleProperties) HasSourceMac() bool` HasSourceMac returns a boolean if a field has been set. ### SetSourceMacNil `func (o *FirewallruleProperties) SetSourceMacNil()` SetSourceMacNil sets the value for SourceMac to be marshalled as an explicit nil Alternatively SourceMac can be set directly to the address `&Nilstring`, which is a sentinel value that is checked when marshalling. ### UnsetSourceMac `func (o *FirewallruleProperties) UnsetSourceMac()` ### GetIpVersion `func (o *FirewallruleProperties) GetIpVersion() string` GetIpVersion returns the IpVersion field if non-nil, zero value otherwise. ### GetIpVersionOk `func (o *FirewallruleProperties) GetIpVersionOk() (*string, bool)` GetIpVersionOk returns a tuple with the IpVersion field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIpVersion `func (o *FirewallruleProperties) SetIpVersion(v string)` SetIpVersion sets IpVersion field to given value. ### HasIpVersion `func (o *FirewallruleProperties) HasIpVersion() bool` HasIpVersion returns a boolean if a field has been set. ### SetIpVersionNil `func (o *FirewallruleProperties) SetIpVersionNil()` SetIpVersionNil sets the value for IpVersion to be marshalled as an explicit nil Alternatively IpVersion can be set directly to the address `&Nilstring`, which is a sentinel value that is checked when marshalling. ### UnsetIpVersion `func (o *FirewallruleProperties) UnsetIpVersion()` ### GetSourceIp `func (o *FirewallruleProperties) GetSourceIp() string` GetSourceIp returns the SourceIp field if non-nil, zero value otherwise. ### GetSourceIpOk `func (o *FirewallruleProperties) GetSourceIpOk() (*string, bool)` GetSourceIpOk returns a tuple with the SourceIp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSourceIp `func (o *FirewallruleProperties) SetSourceIp(v string)` SetSourceIp sets SourceIp field to given value. ### HasSourceIp `func (o *FirewallruleProperties) HasSourceIp() bool` HasSourceIp returns a boolean if a field has been set. ### SetSourceIpNil `func (o *FirewallruleProperties) SetSourceIpNil()` SetSourceIpNil sets the value for SourceIp to be marshalled as an explicit nil Alternatively SourceIp can be set directly to the address `&Nilstring`, which is a sentinel value that is checked when marshalling. ### UnsetSourceIp `func (o *FirewallruleProperties) UnsetSourceIp()` ### GetTargetIp `func (o *FirewallruleProperties) GetTargetIp() string` GetTargetIp returns the TargetIp field if non-nil, zero value otherwise. ### GetTargetIpOk `func (o *FirewallruleProperties) GetTargetIpOk() (*string, bool)` GetTargetIpOk returns a tuple with the TargetIp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTargetIp `func (o *FirewallruleProperties) SetTargetIp(v string)` SetTargetIp sets TargetIp field to given value. ### HasTargetIp `func (o *FirewallruleProperties) HasTargetIp() bool` HasTargetIp returns a boolean if a field has been set. ### SetTargetIpNil `func (o *FirewallruleProperties) SetTargetIpNil()` SetTargetIpNil sets the value for TargetIp to be marshalled as an explicit nil Alternatively TargetIp can be set directly to the address `&Nilstring`, which is a sentinel value that is checked when marshalling. ### UnsetTargetIp `func (o *FirewallruleProperties) UnsetTargetIp()` ### GetIcmpCode `func (o *FirewallruleProperties) GetIcmpCode() int32` GetIcmpCode returns the IcmpCode field if non-nil, zero value otherwise. ### GetIcmpCodeOk `func (o *FirewallruleProperties) GetIcmpCodeOk() (*int32, bool)` GetIcmpCodeOk returns a tuple with the IcmpCode field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIcmpCode `func (o *FirewallruleProperties) SetIcmpCode(v int32)` SetIcmpCode sets IcmpCode field to given value. ### HasIcmpCode `func (o *FirewallruleProperties) HasIcmpCode() bool` HasIcmpCode returns a boolean if a field has been set. ### SetIcmpCodeNil `func (o *FirewallruleProperties) SetIcmpCodeNil()` SetIcmpCodeNil sets the value for IcmpCode to be marshalled as an explicit nil Alternatively IcmpCode can be set directly to the address `&Nilint32`, which is a sentinel value that is checked when marshalling. ### UnsetIcmpCode `func (o *FirewallruleProperties) UnsetIcmpCode()` ### GetIcmpType `func (o *FirewallruleProperties) GetIcmpType() int32` GetIcmpType returns the IcmpType field if non-nil, zero value otherwise. ### GetIcmpTypeOk `func (o *FirewallruleProperties) GetIcmpTypeOk() (*int32, bool)` GetIcmpTypeOk returns a tuple with the IcmpType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIcmpType `func (o *FirewallruleProperties) SetIcmpType(v int32)` SetIcmpType sets IcmpType field to given value. ### HasIcmpType `func (o *FirewallruleProperties) HasIcmpType() bool` HasIcmpType returns a boolean if a field has been set. ### SetIcmpTypeNil `func (o *FirewallruleProperties) SetIcmpTypeNil()` SetIcmpTypeNil sets the value for IcmpType to be marshalled as an explicit nil Alternatively IcmpType can be set directly to the address `&Nilint32`, which is a sentinel value that is checked when marshalling. ### UnsetIcmpType `func (o *FirewallruleProperties) UnsetIcmpType()` ### GetPortRangeStart `func (o *FirewallruleProperties) GetPortRangeStart() int32` GetPortRangeStart returns the PortRangeStart field if non-nil, zero value otherwise. ### GetPortRangeStartOk `func (o *FirewallruleProperties) GetPortRangeStartOk() (*int32, bool)` GetPortRangeStartOk returns a tuple with the PortRangeStart field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPortRangeStart `func (o *FirewallruleProperties) SetPortRangeStart(v int32)` SetPortRangeStart sets PortRangeStart field to given value. ### HasPortRangeStart `func (o *FirewallruleProperties) HasPortRangeStart() bool` HasPortRangeStart returns a boolean if a field has been set. ### GetPortRangeEnd `func (o *FirewallruleProperties) GetPortRangeEnd() int32` GetPortRangeEnd returns the PortRangeEnd field if non-nil, zero value otherwise. ### GetPortRangeEndOk `func (o *FirewallruleProperties) GetPortRangeEndOk() (*int32, bool)` GetPortRangeEndOk returns a tuple with the PortRangeEnd field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPortRangeEnd `func (o *FirewallruleProperties) SetPortRangeEnd(v int32)` SetPortRangeEnd sets PortRangeEnd field to given value. ### HasPortRangeEnd `func (o *FirewallruleProperties) HasPortRangeEnd() bool` HasPortRangeEnd returns a boolean if a field has been set. ### GetType `func (o *FirewallruleProperties) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *FirewallruleProperties) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *FirewallruleProperties) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *FirewallruleProperties) HasType() bool` HasType returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/FlowLog.md000066400000000000000000000074551465267054300240160ustar00rootroot00000000000000# FlowLog ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**FlowLogProperties**](FlowLogProperties.md) | | | ## Methods ### NewFlowLog `func NewFlowLog(properties FlowLogProperties, ) *FlowLog` NewFlowLog instantiates a new FlowLog object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewFlowLogWithDefaults `func NewFlowLogWithDefaults() *FlowLog` NewFlowLogWithDefaults instantiates a new FlowLog object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *FlowLog) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *FlowLog) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *FlowLog) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *FlowLog) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *FlowLog) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *FlowLog) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *FlowLog) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *FlowLog) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *FlowLog) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *FlowLog) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *FlowLog) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *FlowLog) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *FlowLog) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *FlowLog) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *FlowLog) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *FlowLog) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *FlowLog) GetProperties() FlowLogProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *FlowLog) GetPropertiesOk() (*FlowLogProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *FlowLog) SetProperties(v FlowLogProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/FlowLogProperties.md000066400000000000000000000057441465267054300260720ustar00rootroot00000000000000# FlowLogProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The resource name. | | |**Action** | **string** | Specifies the traffic action pattern. | | |**Direction** | **string** | Specifies the traffic direction pattern. | | |**Bucket** | **string** | The S3 bucket name of an existing IONOS Cloud S3 bucket. | | ## Methods ### NewFlowLogProperties `func NewFlowLogProperties(name string, action string, direction string, bucket string, ) *FlowLogProperties` NewFlowLogProperties instantiates a new FlowLogProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewFlowLogPropertiesWithDefaults `func NewFlowLogPropertiesWithDefaults() *FlowLogProperties` NewFlowLogPropertiesWithDefaults instantiates a new FlowLogProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *FlowLogProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *FlowLogProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *FlowLogProperties) SetName(v string)` SetName sets Name field to given value. ### GetAction `func (o *FlowLogProperties) GetAction() string` GetAction returns the Action field if non-nil, zero value otherwise. ### GetActionOk `func (o *FlowLogProperties) GetActionOk() (*string, bool)` GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAction `func (o *FlowLogProperties) SetAction(v string)` SetAction sets Action field to given value. ### GetDirection `func (o *FlowLogProperties) GetDirection() string` GetDirection returns the Direction field if non-nil, zero value otherwise. ### GetDirectionOk `func (o *FlowLogProperties) GetDirectionOk() (*string, bool)` GetDirectionOk returns a tuple with the Direction field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDirection `func (o *FlowLogProperties) SetDirection(v string)` SetDirection sets Direction field to given value. ### GetBucket `func (o *FlowLogProperties) GetBucket() string` GetBucket returns the Bucket field if non-nil, zero value otherwise. ### GetBucketOk `func (o *FlowLogProperties) GetBucketOk() (*string, bool)` GetBucketOk returns a tuple with the Bucket field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBucket `func (o *FlowLogProperties) SetBucket(v string)` SetBucket sets Bucket field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/FlowLogPut.md000066400000000000000000000062311465267054300244760ustar00rootroot00000000000000# FlowLogPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**FlowLogProperties**](FlowLogProperties.md) | | | ## Methods ### NewFlowLogPut `func NewFlowLogPut(properties FlowLogProperties, ) *FlowLogPut` NewFlowLogPut instantiates a new FlowLogPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewFlowLogPutWithDefaults `func NewFlowLogPutWithDefaults() *FlowLogPut` NewFlowLogPutWithDefaults instantiates a new FlowLogPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *FlowLogPut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *FlowLogPut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *FlowLogPut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *FlowLogPut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *FlowLogPut) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *FlowLogPut) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *FlowLogPut) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *FlowLogPut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *FlowLogPut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *FlowLogPut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *FlowLogPut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *FlowLogPut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *FlowLogPut) GetProperties() FlowLogProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *FlowLogPut) GetPropertiesOk() (*FlowLogProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *FlowLogPut) SetProperties(v FlowLogProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/FlowLogs.md000066400000000000000000000117771465267054300242030ustar00rootroot00000000000000# FlowLogs ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]FlowLog**](FlowLog.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewFlowLogs `func NewFlowLogs() *FlowLogs` NewFlowLogs instantiates a new FlowLogs object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewFlowLogsWithDefaults `func NewFlowLogsWithDefaults() *FlowLogs` NewFlowLogsWithDefaults instantiates a new FlowLogs object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *FlowLogs) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *FlowLogs) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *FlowLogs) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *FlowLogs) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *FlowLogs) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *FlowLogs) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *FlowLogs) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *FlowLogs) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *FlowLogs) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *FlowLogs) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *FlowLogs) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *FlowLogs) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *FlowLogs) GetItems() []FlowLog` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *FlowLogs) GetItemsOk() (*[]FlowLog, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *FlowLogs) SetItems(v []FlowLog)` SetItems sets Items field to given value. ### HasItems `func (o *FlowLogs) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *FlowLogs) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *FlowLogs) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *FlowLogs) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *FlowLogs) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *FlowLogs) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *FlowLogs) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *FlowLogs) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *FlowLogs) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *FlowLogs) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *FlowLogs) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *FlowLogs) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *FlowLogs) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Group.md000066400000000000000000000072251465267054300235340ustar00rootroot00000000000000# Group ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of the resource. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**GroupProperties**](GroupProperties.md) | | | |**Entities** | Pointer to [**GroupEntities**](GroupEntities.md) | | [optional] | ## Methods ### NewGroup `func NewGroup(properties GroupProperties, ) *Group` NewGroup instantiates a new Group object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewGroupWithDefaults `func NewGroupWithDefaults() *Group` NewGroupWithDefaults instantiates a new Group object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Group) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Group) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Group) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Group) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Group) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Group) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Group) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Group) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Group) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Group) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Group) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Group) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *Group) GetProperties() GroupProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Group) GetPropertiesOk() (*GroupProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Group) SetProperties(v GroupProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *Group) GetEntities() GroupEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *Group) GetEntitiesOk() (*GroupEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *Group) SetEntities(v GroupEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *Group) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/GroupEntities.md000066400000000000000000000041531465267054300252360ustar00rootroot00000000000000# GroupEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Users** | Pointer to [**GroupMembers**](GroupMembers.md) | | [optional] | |**Resources** | Pointer to [**ResourceGroups**](ResourceGroups.md) | | [optional] | ## Methods ### NewGroupEntities `func NewGroupEntities() *GroupEntities` NewGroupEntities instantiates a new GroupEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewGroupEntitiesWithDefaults `func NewGroupEntitiesWithDefaults() *GroupEntities` NewGroupEntitiesWithDefaults instantiates a new GroupEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetUsers `func (o *GroupEntities) GetUsers() GroupMembers` GetUsers returns the Users field if non-nil, zero value otherwise. ### GetUsersOk `func (o *GroupEntities) GetUsersOk() (*GroupMembers, bool)` GetUsersOk returns a tuple with the Users field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUsers `func (o *GroupEntities) SetUsers(v GroupMembers)` SetUsers sets Users field to given value. ### HasUsers `func (o *GroupEntities) HasUsers() bool` HasUsers returns a boolean if a field has been set. ### GetResources `func (o *GroupEntities) GetResources() ResourceGroups` GetResources returns the Resources field if non-nil, zero value otherwise. ### GetResourcesOk `func (o *GroupEntities) GetResourcesOk() (*ResourceGroups, bool)` GetResourcesOk returns a tuple with the Resources field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetResources `func (o *GroupEntities) SetResources(v ResourceGroups)` SetResources sets Resources field to given value. ### HasResources `func (o *GroupEntities) HasResources() bool` HasResources returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/GroupMembers.md000066400000000000000000000063431465267054300250470ustar00rootroot00000000000000# GroupMembers ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]User**](User.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewGroupMembers `func NewGroupMembers() *GroupMembers` NewGroupMembers instantiates a new GroupMembers object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewGroupMembersWithDefaults `func NewGroupMembersWithDefaults() *GroupMembers` NewGroupMembersWithDefaults instantiates a new GroupMembers object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *GroupMembers) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *GroupMembers) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *GroupMembers) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *GroupMembers) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *GroupMembers) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *GroupMembers) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *GroupMembers) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *GroupMembers) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *GroupMembers) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *GroupMembers) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *GroupMembers) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *GroupMembers) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *GroupMembers) GetItems() []User` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *GroupMembers) GetItemsOk() (*[]User, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *GroupMembers) SetItems(v []User)` SetItems sets Items field to given value. ### HasItems `func (o *GroupMembers) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/GroupProperties.md000066400000000000000000000344171465267054300256140ustar00rootroot00000000000000# GroupProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**CreateDataCenter** | Pointer to **bool** | Create data center privilege. | [optional] | |**CreateSnapshot** | Pointer to **bool** | Create snapshot privilege. | [optional] | |**ReserveIp** | Pointer to **bool** | Reserve IP block privilege. | [optional] | |**AccessActivityLog** | Pointer to **bool** | Activity log access privilege. | [optional] | |**CreatePcc** | Pointer to **bool** | User privilege to create a cross connect. | [optional] | |**S3Privilege** | Pointer to **bool** | S3 privilege. | [optional] | |**CreateBackupUnit** | Pointer to **bool** | Create backup unit privilege. | [optional] | |**CreateInternetAccess** | Pointer to **bool** | Create internet access privilege. | [optional] | |**CreateK8sCluster** | Pointer to **bool** | Create Kubernetes cluster privilege. | [optional] | |**CreateFlowLog** | Pointer to **bool** | Create Flow Logs privilege. | [optional] | |**AccessAndManageMonitoring** | Pointer to **bool** | Privilege for a group to access and manage monitoring related functionality (access metrics, CRUD on alarms, alarm-actions etc) using Monotoring-as-a-Service (MaaS). | [optional] | |**AccessAndManageCertificates** | Pointer to **bool** | Privilege for a group to access and manage certificates. | [optional] | |**ManageDBaaS** | Pointer to **bool** | Privilege for a group to manage DBaaS related functionality. | [optional] | |**AccessAndManageDns** | Pointer to **bool** | Privilege for a group to access and manage dns records. | [optional] | |**ManageRegistry** | Pointer to **bool** | Privilege for group accessing container registry related functionality. | [optional] | |**ManageDataplatform** | Pointer to **bool** | Privilege for a group to access and manage the Data Platform. | [optional] | ## Methods ### NewGroupProperties `func NewGroupProperties() *GroupProperties` NewGroupProperties instantiates a new GroupProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewGroupPropertiesWithDefaults `func NewGroupPropertiesWithDefaults() *GroupProperties` NewGroupPropertiesWithDefaults instantiates a new GroupProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *GroupProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *GroupProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *GroupProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *GroupProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetCreateDataCenter `func (o *GroupProperties) GetCreateDataCenter() bool` GetCreateDataCenter returns the CreateDataCenter field if non-nil, zero value otherwise. ### GetCreateDataCenterOk `func (o *GroupProperties) GetCreateDataCenterOk() (*bool, bool)` GetCreateDataCenterOk returns a tuple with the CreateDataCenter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreateDataCenter `func (o *GroupProperties) SetCreateDataCenter(v bool)` SetCreateDataCenter sets CreateDataCenter field to given value. ### HasCreateDataCenter `func (o *GroupProperties) HasCreateDataCenter() bool` HasCreateDataCenter returns a boolean if a field has been set. ### GetCreateSnapshot `func (o *GroupProperties) GetCreateSnapshot() bool` GetCreateSnapshot returns the CreateSnapshot field if non-nil, zero value otherwise. ### GetCreateSnapshotOk `func (o *GroupProperties) GetCreateSnapshotOk() (*bool, bool)` GetCreateSnapshotOk returns a tuple with the CreateSnapshot field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreateSnapshot `func (o *GroupProperties) SetCreateSnapshot(v bool)` SetCreateSnapshot sets CreateSnapshot field to given value. ### HasCreateSnapshot `func (o *GroupProperties) HasCreateSnapshot() bool` HasCreateSnapshot returns a boolean if a field has been set. ### GetReserveIp `func (o *GroupProperties) GetReserveIp() bool` GetReserveIp returns the ReserveIp field if non-nil, zero value otherwise. ### GetReserveIpOk `func (o *GroupProperties) GetReserveIpOk() (*bool, bool)` GetReserveIpOk returns a tuple with the ReserveIp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetReserveIp `func (o *GroupProperties) SetReserveIp(v bool)` SetReserveIp sets ReserveIp field to given value. ### HasReserveIp `func (o *GroupProperties) HasReserveIp() bool` HasReserveIp returns a boolean if a field has been set. ### GetAccessActivityLog `func (o *GroupProperties) GetAccessActivityLog() bool` GetAccessActivityLog returns the AccessActivityLog field if non-nil, zero value otherwise. ### GetAccessActivityLogOk `func (o *GroupProperties) GetAccessActivityLogOk() (*bool, bool)` GetAccessActivityLogOk returns a tuple with the AccessActivityLog field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAccessActivityLog `func (o *GroupProperties) SetAccessActivityLog(v bool)` SetAccessActivityLog sets AccessActivityLog field to given value. ### HasAccessActivityLog `func (o *GroupProperties) HasAccessActivityLog() bool` HasAccessActivityLog returns a boolean if a field has been set. ### GetCreatePcc `func (o *GroupProperties) GetCreatePcc() bool` GetCreatePcc returns the CreatePcc field if non-nil, zero value otherwise. ### GetCreatePccOk `func (o *GroupProperties) GetCreatePccOk() (*bool, bool)` GetCreatePccOk returns a tuple with the CreatePcc field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatePcc `func (o *GroupProperties) SetCreatePcc(v bool)` SetCreatePcc sets CreatePcc field to given value. ### HasCreatePcc `func (o *GroupProperties) HasCreatePcc() bool` HasCreatePcc returns a boolean if a field has been set. ### GetS3Privilege `func (o *GroupProperties) GetS3Privilege() bool` GetS3Privilege returns the S3Privilege field if non-nil, zero value otherwise. ### GetS3PrivilegeOk `func (o *GroupProperties) GetS3PrivilegeOk() (*bool, bool)` GetS3PrivilegeOk returns a tuple with the S3Privilege field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetS3Privilege `func (o *GroupProperties) SetS3Privilege(v bool)` SetS3Privilege sets S3Privilege field to given value. ### HasS3Privilege `func (o *GroupProperties) HasS3Privilege() bool` HasS3Privilege returns a boolean if a field has been set. ### GetCreateBackupUnit `func (o *GroupProperties) GetCreateBackupUnit() bool` GetCreateBackupUnit returns the CreateBackupUnit field if non-nil, zero value otherwise. ### GetCreateBackupUnitOk `func (o *GroupProperties) GetCreateBackupUnitOk() (*bool, bool)` GetCreateBackupUnitOk returns a tuple with the CreateBackupUnit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreateBackupUnit `func (o *GroupProperties) SetCreateBackupUnit(v bool)` SetCreateBackupUnit sets CreateBackupUnit field to given value. ### HasCreateBackupUnit `func (o *GroupProperties) HasCreateBackupUnit() bool` HasCreateBackupUnit returns a boolean if a field has been set. ### GetCreateInternetAccess `func (o *GroupProperties) GetCreateInternetAccess() bool` GetCreateInternetAccess returns the CreateInternetAccess field if non-nil, zero value otherwise. ### GetCreateInternetAccessOk `func (o *GroupProperties) GetCreateInternetAccessOk() (*bool, bool)` GetCreateInternetAccessOk returns a tuple with the CreateInternetAccess field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreateInternetAccess `func (o *GroupProperties) SetCreateInternetAccess(v bool)` SetCreateInternetAccess sets CreateInternetAccess field to given value. ### HasCreateInternetAccess `func (o *GroupProperties) HasCreateInternetAccess() bool` HasCreateInternetAccess returns a boolean if a field has been set. ### GetCreateK8sCluster `func (o *GroupProperties) GetCreateK8sCluster() bool` GetCreateK8sCluster returns the CreateK8sCluster field if non-nil, zero value otherwise. ### GetCreateK8sClusterOk `func (o *GroupProperties) GetCreateK8sClusterOk() (*bool, bool)` GetCreateK8sClusterOk returns a tuple with the CreateK8sCluster field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreateK8sCluster `func (o *GroupProperties) SetCreateK8sCluster(v bool)` SetCreateK8sCluster sets CreateK8sCluster field to given value. ### HasCreateK8sCluster `func (o *GroupProperties) HasCreateK8sCluster() bool` HasCreateK8sCluster returns a boolean if a field has been set. ### GetCreateFlowLog `func (o *GroupProperties) GetCreateFlowLog() bool` GetCreateFlowLog returns the CreateFlowLog field if non-nil, zero value otherwise. ### GetCreateFlowLogOk `func (o *GroupProperties) GetCreateFlowLogOk() (*bool, bool)` GetCreateFlowLogOk returns a tuple with the CreateFlowLog field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreateFlowLog `func (o *GroupProperties) SetCreateFlowLog(v bool)` SetCreateFlowLog sets CreateFlowLog field to given value. ### HasCreateFlowLog `func (o *GroupProperties) HasCreateFlowLog() bool` HasCreateFlowLog returns a boolean if a field has been set. ### GetAccessAndManageMonitoring `func (o *GroupProperties) GetAccessAndManageMonitoring() bool` GetAccessAndManageMonitoring returns the AccessAndManageMonitoring field if non-nil, zero value otherwise. ### GetAccessAndManageMonitoringOk `func (o *GroupProperties) GetAccessAndManageMonitoringOk() (*bool, bool)` GetAccessAndManageMonitoringOk returns a tuple with the AccessAndManageMonitoring field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAccessAndManageMonitoring `func (o *GroupProperties) SetAccessAndManageMonitoring(v bool)` SetAccessAndManageMonitoring sets AccessAndManageMonitoring field to given value. ### HasAccessAndManageMonitoring `func (o *GroupProperties) HasAccessAndManageMonitoring() bool` HasAccessAndManageMonitoring returns a boolean if a field has been set. ### GetAccessAndManageCertificates `func (o *GroupProperties) GetAccessAndManageCertificates() bool` GetAccessAndManageCertificates returns the AccessAndManageCertificates field if non-nil, zero value otherwise. ### GetAccessAndManageCertificatesOk `func (o *GroupProperties) GetAccessAndManageCertificatesOk() (*bool, bool)` GetAccessAndManageCertificatesOk returns a tuple with the AccessAndManageCertificates field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAccessAndManageCertificates `func (o *GroupProperties) SetAccessAndManageCertificates(v bool)` SetAccessAndManageCertificates sets AccessAndManageCertificates field to given value. ### HasAccessAndManageCertificates `func (o *GroupProperties) HasAccessAndManageCertificates() bool` HasAccessAndManageCertificates returns a boolean if a field has been set. ### GetManageDBaaS `func (o *GroupProperties) GetManageDBaaS() bool` GetManageDBaaS returns the ManageDBaaS field if non-nil, zero value otherwise. ### GetManageDBaaSOk `func (o *GroupProperties) GetManageDBaaSOk() (*bool, bool)` GetManageDBaaSOk returns a tuple with the ManageDBaaS field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetManageDBaaS `func (o *GroupProperties) SetManageDBaaS(v bool)` SetManageDBaaS sets ManageDBaaS field to given value. ### HasManageDBaaS `func (o *GroupProperties) HasManageDBaaS() bool` HasManageDBaaS returns a boolean if a field has been set. ### GetAccessAndManageDns `func (o *GroupProperties) GetAccessAndManageDns() bool` GetAccessAndManageDns returns the AccessAndManageDns field if non-nil, zero value otherwise. ### GetAccessAndManageDnsOk `func (o *GroupProperties) GetAccessAndManageDnsOk() (*bool, bool)` GetAccessAndManageDnsOk returns a tuple with the AccessAndManageDns field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAccessAndManageDns `func (o *GroupProperties) SetAccessAndManageDns(v bool)` SetAccessAndManageDns sets AccessAndManageDns field to given value. ### HasAccessAndManageDns `func (o *GroupProperties) HasAccessAndManageDns() bool` HasAccessAndManageDns returns a boolean if a field has been set. ### GetManageRegistry `func (o *GroupProperties) GetManageRegistry() bool` GetManageRegistry returns the ManageRegistry field if non-nil, zero value otherwise. ### GetManageRegistryOk `func (o *GroupProperties) GetManageRegistryOk() (*bool, bool)` GetManageRegistryOk returns a tuple with the ManageRegistry field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetManageRegistry `func (o *GroupProperties) SetManageRegistry(v bool)` SetManageRegistry sets ManageRegistry field to given value. ### HasManageRegistry `func (o *GroupProperties) HasManageRegistry() bool` HasManageRegistry returns a boolean if a field has been set. ### GetManageDataplatform `func (o *GroupProperties) GetManageDataplatform() bool` GetManageDataplatform returns the ManageDataplatform field if non-nil, zero value otherwise. ### GetManageDataplatformOk `func (o *GroupProperties) GetManageDataplatformOk() (*bool, bool)` GetManageDataplatformOk returns a tuple with the ManageDataplatform field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetManageDataplatform `func (o *GroupProperties) SetManageDataplatform(v bool)` SetManageDataplatform sets ManageDataplatform field to given value. ### HasManageDataplatform `func (o *GroupProperties) HasManageDataplatform() bool` HasManageDataplatform returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/GroupShare.md000066400000000000000000000062321465267054300245140ustar00rootroot00000000000000# GroupShare ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | resource as generic type | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**GroupShareProperties**](GroupShareProperties.md) | | | ## Methods ### NewGroupShare `func NewGroupShare(properties GroupShareProperties, ) *GroupShare` NewGroupShare instantiates a new GroupShare object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewGroupShareWithDefaults `func NewGroupShareWithDefaults() *GroupShare` NewGroupShareWithDefaults instantiates a new GroupShare object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *GroupShare) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *GroupShare) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *GroupShare) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *GroupShare) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *GroupShare) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *GroupShare) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *GroupShare) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *GroupShare) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *GroupShare) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *GroupShare) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *GroupShare) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *GroupShare) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *GroupShare) GetProperties() GroupShareProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *GroupShare) GetPropertiesOk() (*GroupShareProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *GroupShare) SetProperties(v GroupShareProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/GroupShareProperties.md000066400000000000000000000046111465267054300265700ustar00rootroot00000000000000# GroupShareProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**EditPrivilege** | Pointer to **bool** | edit privilege on a resource | [optional] | |**SharePrivilege** | Pointer to **bool** | share privilege on a resource | [optional] | ## Methods ### NewGroupShareProperties `func NewGroupShareProperties() *GroupShareProperties` NewGroupShareProperties instantiates a new GroupShareProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewGroupSharePropertiesWithDefaults `func NewGroupSharePropertiesWithDefaults() *GroupShareProperties` NewGroupSharePropertiesWithDefaults instantiates a new GroupShareProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetEditPrivilege `func (o *GroupShareProperties) GetEditPrivilege() bool` GetEditPrivilege returns the EditPrivilege field if non-nil, zero value otherwise. ### GetEditPrivilegeOk `func (o *GroupShareProperties) GetEditPrivilegeOk() (*bool, bool)` GetEditPrivilegeOk returns a tuple with the EditPrivilege field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEditPrivilege `func (o *GroupShareProperties) SetEditPrivilege(v bool)` SetEditPrivilege sets EditPrivilege field to given value. ### HasEditPrivilege `func (o *GroupShareProperties) HasEditPrivilege() bool` HasEditPrivilege returns a boolean if a field has been set. ### GetSharePrivilege `func (o *GroupShareProperties) GetSharePrivilege() bool` GetSharePrivilege returns the SharePrivilege field if non-nil, zero value otherwise. ### GetSharePrivilegeOk `func (o *GroupShareProperties) GetSharePrivilegeOk() (*bool, bool)` GetSharePrivilegeOk returns a tuple with the SharePrivilege field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSharePrivilege `func (o *GroupShareProperties) SetSharePrivilege(v bool)` SetSharePrivilege sets SharePrivilege field to given value. ### HasSharePrivilege `func (o *GroupShareProperties) HasSharePrivilege() bool` HasSharePrivilege returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/GroupShares.md000066400000000000000000000063601465267054300247010ustar00rootroot00000000000000# GroupShares ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | Share representing groups and resource relationship | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]GroupShare**](GroupShare.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewGroupShares `func NewGroupShares() *GroupShares` NewGroupShares instantiates a new GroupShares object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewGroupSharesWithDefaults `func NewGroupSharesWithDefaults() *GroupShares` NewGroupSharesWithDefaults instantiates a new GroupShares object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *GroupShares) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *GroupShares) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *GroupShares) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *GroupShares) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *GroupShares) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *GroupShares) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *GroupShares) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *GroupShares) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *GroupShares) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *GroupShares) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *GroupShares) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *GroupShares) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *GroupShares) GetItems() []GroupShare` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *GroupShares) GetItemsOk() (*[]GroupShare, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *GroupShares) SetItems(v []GroupShare)` SetItems sets Items field to given value. ### HasItems `func (o *GroupShares) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/GroupUsers.md000066400000000000000000000062421465267054300245540ustar00rootroot00000000000000# GroupUsers ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of the resource. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Group**](Group.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewGroupUsers `func NewGroupUsers() *GroupUsers` NewGroupUsers instantiates a new GroupUsers object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewGroupUsersWithDefaults `func NewGroupUsersWithDefaults() *GroupUsers` NewGroupUsersWithDefaults instantiates a new GroupUsers object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *GroupUsers) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *GroupUsers) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *GroupUsers) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *GroupUsers) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *GroupUsers) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *GroupUsers) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *GroupUsers) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *GroupUsers) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *GroupUsers) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *GroupUsers) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *GroupUsers) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *GroupUsers) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *GroupUsers) GetItems() []Group` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *GroupUsers) GetItemsOk() (*[]Group, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *GroupUsers) SetItems(v []Group)` SetItems sets Items field to given value. ### HasItems `func (o *GroupUsers) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Groups.md000066400000000000000000000060661465267054300237210ustar00rootroot00000000000000# Groups ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of the resource. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Group**](Group.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewGroups `func NewGroups() *Groups` NewGroups instantiates a new Groups object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewGroupsWithDefaults `func NewGroupsWithDefaults() *Groups` NewGroupsWithDefaults instantiates a new Groups object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Groups) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Groups) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Groups) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Groups) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Groups) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Groups) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Groups) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Groups) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Groups) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Groups) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Groups) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Groups) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Groups) GetItems() []Group` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Groups) GetItemsOk() (*[]Group, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Groups) SetItems(v []Group)` SetItems sets Items field to given value. ### HasItems `func (o *Groups) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/IPFailover.md000066400000000000000000000036021465267054300244330ustar00rootroot00000000000000# IPFailover ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Ip** | Pointer to **string** | | [optional] | |**NicUuid** | Pointer to **string** | | [optional] | ## Methods ### NewIPFailover `func NewIPFailover() *IPFailover` NewIPFailover instantiates a new IPFailover object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewIPFailoverWithDefaults `func NewIPFailoverWithDefaults() *IPFailover` NewIPFailoverWithDefaults instantiates a new IPFailover object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetIp `func (o *IPFailover) GetIp() string` GetIp returns the Ip field if non-nil, zero value otherwise. ### GetIpOk `func (o *IPFailover) GetIpOk() (*string, bool)` GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIp `func (o *IPFailover) SetIp(v string)` SetIp sets Ip field to given value. ### HasIp `func (o *IPFailover) HasIp() bool` HasIp returns a boolean if a field has been set. ### GetNicUuid `func (o *IPFailover) GetNicUuid() string` GetNicUuid returns the NicUuid field if non-nil, zero value otherwise. ### GetNicUuidOk `func (o *IPFailover) GetNicUuidOk() (*string, bool)` GetNicUuidOk returns a tuple with the NicUuid field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNicUuid `func (o *IPFailover) SetNicUuid(v string)` SetNicUuid sets NicUuid field to given value. ### HasNicUuid `func (o *IPFailover) HasNicUuid() bool` HasNicUuid returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Image.md000066400000000000000000000073411465267054300234610ustar00rootroot00000000000000# Image ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**ImageProperties**](ImageProperties.md) | | | ## Methods ### NewImage `func NewImage(properties ImageProperties, ) *Image` NewImage instantiates a new Image object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewImageWithDefaults `func NewImageWithDefaults() *Image` NewImageWithDefaults instantiates a new Image object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Image) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Image) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Image) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Image) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Image) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Image) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Image) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Image) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Image) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Image) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Image) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Image) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Image) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Image) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Image) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Image) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Image) GetProperties() ImageProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Image) GetPropertiesOk() (*ImageProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Image) SetProperties(v ImageProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ImageProperties.md000066400000000000000000000370501465267054300255360ustar00rootroot00000000000000# ImageProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The resource name. | [optional] | |**Description** | Pointer to **string** | Human-readable description. | [optional] | |**Location** | Pointer to **string** | The location of this image/snapshot. | [optional] [readonly] | |**Size** | Pointer to **float32** | The image size in GB. | [optional] [readonly] | |**CpuHotPlug** | Pointer to **bool** | Hot-plug capable CPU (no reboot required). | [optional] | |**CpuHotUnplug** | Pointer to **bool** | Hot-unplug capable CPU (no reboot required). | [optional] | |**RamHotPlug** | Pointer to **bool** | Hot-plug capable RAM (no reboot required). | [optional] | |**RamHotUnplug** | Pointer to **bool** | Hot-unplug capable RAM (no reboot required). | [optional] | |**NicHotPlug** | Pointer to **bool** | Hot-plug capable NIC (no reboot required). | [optional] | |**NicHotUnplug** | Pointer to **bool** | Hot-unplug capable NIC (no reboot required). | [optional] | |**DiscVirtioHotPlug** | Pointer to **bool** | Hot-plug capable Virt-IO drive (no reboot required). | [optional] | |**DiscVirtioHotUnplug** | Pointer to **bool** | Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. | [optional] | |**DiscScsiHotPlug** | Pointer to **bool** | Hot-plug capable SCSI drive (no reboot required). | [optional] | |**DiscScsiHotUnplug** | Pointer to **bool** | Hot-unplug capable SCSI drive (no reboot required). Not supported with Windows VMs. | [optional] | |**ExposeSerial** | Pointer to **bool** | If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior | [optional] [default to false]| |**LicenceType** | **string** | The OS type of this image. | | |**ImageType** | Pointer to **string** | The image type. | [optional] [readonly] | |**Public** | Pointer to **bool** | Indicates whether the image is part of a public repository. | [optional] [readonly] | |**ImageAliases** | Pointer to **[]string** | List of image aliases mapped for this image | [optional] [readonly] | |**CloudInit** | Pointer to **string** | Cloud init compatibility. | [optional] | ## Methods ### NewImageProperties `func NewImageProperties(licenceType string, ) *ImageProperties` NewImageProperties instantiates a new ImageProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewImagePropertiesWithDefaults `func NewImagePropertiesWithDefaults() *ImageProperties` NewImagePropertiesWithDefaults instantiates a new ImageProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *ImageProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *ImageProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *ImageProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *ImageProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetDescription `func (o *ImageProperties) GetDescription() string` GetDescription returns the Description field if non-nil, zero value otherwise. ### GetDescriptionOk `func (o *ImageProperties) GetDescriptionOk() (*string, bool)` GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDescription `func (o *ImageProperties) SetDescription(v string)` SetDescription sets Description field to given value. ### HasDescription `func (o *ImageProperties) HasDescription() bool` HasDescription returns a boolean if a field has been set. ### GetLocation `func (o *ImageProperties) GetLocation() string` GetLocation returns the Location field if non-nil, zero value otherwise. ### GetLocationOk `func (o *ImageProperties) GetLocationOk() (*string, bool)` GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLocation `func (o *ImageProperties) SetLocation(v string)` SetLocation sets Location field to given value. ### HasLocation `func (o *ImageProperties) HasLocation() bool` HasLocation returns a boolean if a field has been set. ### GetSize `func (o *ImageProperties) GetSize() float32` GetSize returns the Size field if non-nil, zero value otherwise. ### GetSizeOk `func (o *ImageProperties) GetSizeOk() (*float32, bool)` GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSize `func (o *ImageProperties) SetSize(v float32)` SetSize sets Size field to given value. ### HasSize `func (o *ImageProperties) HasSize() bool` HasSize returns a boolean if a field has been set. ### GetCpuHotPlug `func (o *ImageProperties) GetCpuHotPlug() bool` GetCpuHotPlug returns the CpuHotPlug field if non-nil, zero value otherwise. ### GetCpuHotPlugOk `func (o *ImageProperties) GetCpuHotPlugOk() (*bool, bool)` GetCpuHotPlugOk returns a tuple with the CpuHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuHotPlug `func (o *ImageProperties) SetCpuHotPlug(v bool)` SetCpuHotPlug sets CpuHotPlug field to given value. ### HasCpuHotPlug `func (o *ImageProperties) HasCpuHotPlug() bool` HasCpuHotPlug returns a boolean if a field has been set. ### GetCpuHotUnplug `func (o *ImageProperties) GetCpuHotUnplug() bool` GetCpuHotUnplug returns the CpuHotUnplug field if non-nil, zero value otherwise. ### GetCpuHotUnplugOk `func (o *ImageProperties) GetCpuHotUnplugOk() (*bool, bool)` GetCpuHotUnplugOk returns a tuple with the CpuHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuHotUnplug `func (o *ImageProperties) SetCpuHotUnplug(v bool)` SetCpuHotUnplug sets CpuHotUnplug field to given value. ### HasCpuHotUnplug `func (o *ImageProperties) HasCpuHotUnplug() bool` HasCpuHotUnplug returns a boolean if a field has been set. ### GetRamHotPlug `func (o *ImageProperties) GetRamHotPlug() bool` GetRamHotPlug returns the RamHotPlug field if non-nil, zero value otherwise. ### GetRamHotPlugOk `func (o *ImageProperties) GetRamHotPlugOk() (*bool, bool)` GetRamHotPlugOk returns a tuple with the RamHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRamHotPlug `func (o *ImageProperties) SetRamHotPlug(v bool)` SetRamHotPlug sets RamHotPlug field to given value. ### HasRamHotPlug `func (o *ImageProperties) HasRamHotPlug() bool` HasRamHotPlug returns a boolean if a field has been set. ### GetRamHotUnplug `func (o *ImageProperties) GetRamHotUnplug() bool` GetRamHotUnplug returns the RamHotUnplug field if non-nil, zero value otherwise. ### GetRamHotUnplugOk `func (o *ImageProperties) GetRamHotUnplugOk() (*bool, bool)` GetRamHotUnplugOk returns a tuple with the RamHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRamHotUnplug `func (o *ImageProperties) SetRamHotUnplug(v bool)` SetRamHotUnplug sets RamHotUnplug field to given value. ### HasRamHotUnplug `func (o *ImageProperties) HasRamHotUnplug() bool` HasRamHotUnplug returns a boolean if a field has been set. ### GetNicHotPlug `func (o *ImageProperties) GetNicHotPlug() bool` GetNicHotPlug returns the NicHotPlug field if non-nil, zero value otherwise. ### GetNicHotPlugOk `func (o *ImageProperties) GetNicHotPlugOk() (*bool, bool)` GetNicHotPlugOk returns a tuple with the NicHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNicHotPlug `func (o *ImageProperties) SetNicHotPlug(v bool)` SetNicHotPlug sets NicHotPlug field to given value. ### HasNicHotPlug `func (o *ImageProperties) HasNicHotPlug() bool` HasNicHotPlug returns a boolean if a field has been set. ### GetNicHotUnplug `func (o *ImageProperties) GetNicHotUnplug() bool` GetNicHotUnplug returns the NicHotUnplug field if non-nil, zero value otherwise. ### GetNicHotUnplugOk `func (o *ImageProperties) GetNicHotUnplugOk() (*bool, bool)` GetNicHotUnplugOk returns a tuple with the NicHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNicHotUnplug `func (o *ImageProperties) SetNicHotUnplug(v bool)` SetNicHotUnplug sets NicHotUnplug field to given value. ### HasNicHotUnplug `func (o *ImageProperties) HasNicHotUnplug() bool` HasNicHotUnplug returns a boolean if a field has been set. ### GetDiscVirtioHotPlug `func (o *ImageProperties) GetDiscVirtioHotPlug() bool` GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field if non-nil, zero value otherwise. ### GetDiscVirtioHotPlugOk `func (o *ImageProperties) GetDiscVirtioHotPlugOk() (*bool, bool)` GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDiscVirtioHotPlug `func (o *ImageProperties) SetDiscVirtioHotPlug(v bool)` SetDiscVirtioHotPlug sets DiscVirtioHotPlug field to given value. ### HasDiscVirtioHotPlug `func (o *ImageProperties) HasDiscVirtioHotPlug() bool` HasDiscVirtioHotPlug returns a boolean if a field has been set. ### GetDiscVirtioHotUnplug `func (o *ImageProperties) GetDiscVirtioHotUnplug() bool` GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field if non-nil, zero value otherwise. ### GetDiscVirtioHotUnplugOk `func (o *ImageProperties) GetDiscVirtioHotUnplugOk() (*bool, bool)` GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDiscVirtioHotUnplug `func (o *ImageProperties) SetDiscVirtioHotUnplug(v bool)` SetDiscVirtioHotUnplug sets DiscVirtioHotUnplug field to given value. ### HasDiscVirtioHotUnplug `func (o *ImageProperties) HasDiscVirtioHotUnplug() bool` HasDiscVirtioHotUnplug returns a boolean if a field has been set. ### GetDiscScsiHotPlug `func (o *ImageProperties) GetDiscScsiHotPlug() bool` GetDiscScsiHotPlug returns the DiscScsiHotPlug field if non-nil, zero value otherwise. ### GetDiscScsiHotPlugOk `func (o *ImageProperties) GetDiscScsiHotPlugOk() (*bool, bool)` GetDiscScsiHotPlugOk returns a tuple with the DiscScsiHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDiscScsiHotPlug `func (o *ImageProperties) SetDiscScsiHotPlug(v bool)` SetDiscScsiHotPlug sets DiscScsiHotPlug field to given value. ### HasDiscScsiHotPlug `func (o *ImageProperties) HasDiscScsiHotPlug() bool` HasDiscScsiHotPlug returns a boolean if a field has been set. ### GetDiscScsiHotUnplug `func (o *ImageProperties) GetDiscScsiHotUnplug() bool` GetDiscScsiHotUnplug returns the DiscScsiHotUnplug field if non-nil, zero value otherwise. ### GetDiscScsiHotUnplugOk `func (o *ImageProperties) GetDiscScsiHotUnplugOk() (*bool, bool)` GetDiscScsiHotUnplugOk returns a tuple with the DiscScsiHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDiscScsiHotUnplug `func (o *ImageProperties) SetDiscScsiHotUnplug(v bool)` SetDiscScsiHotUnplug sets DiscScsiHotUnplug field to given value. ### HasDiscScsiHotUnplug `func (o *ImageProperties) HasDiscScsiHotUnplug() bool` HasDiscScsiHotUnplug returns a boolean if a field has been set. ### GetExposeSerial `func (o *ImageProperties) GetExposeSerial() bool` GetExposeSerial returns the ExposeSerial field if non-nil, zero value otherwise. ### GetExposeSerialOk `func (o *ImageProperties) GetExposeSerialOk() (*bool, bool)` GetExposeSerialOk returns a tuple with the ExposeSerial field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExposeSerial `func (o *ImageProperties) SetExposeSerial(v bool)` SetExposeSerial sets ExposeSerial field to given value. ### HasExposeSerial `func (o *ImageProperties) HasExposeSerial() bool` HasExposeSerial returns a boolean if a field has been set. ### GetLicenceType `func (o *ImageProperties) GetLicenceType() string` GetLicenceType returns the LicenceType field if non-nil, zero value otherwise. ### GetLicenceTypeOk `func (o *ImageProperties) GetLicenceTypeOk() (*string, bool)` GetLicenceTypeOk returns a tuple with the LicenceType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLicenceType `func (o *ImageProperties) SetLicenceType(v string)` SetLicenceType sets LicenceType field to given value. ### GetImageType `func (o *ImageProperties) GetImageType() string` GetImageType returns the ImageType field if non-nil, zero value otherwise. ### GetImageTypeOk `func (o *ImageProperties) GetImageTypeOk() (*string, bool)` GetImageTypeOk returns a tuple with the ImageType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetImageType `func (o *ImageProperties) SetImageType(v string)` SetImageType sets ImageType field to given value. ### HasImageType `func (o *ImageProperties) HasImageType() bool` HasImageType returns a boolean if a field has been set. ### GetPublic `func (o *ImageProperties) GetPublic() bool` GetPublic returns the Public field if non-nil, zero value otherwise. ### GetPublicOk `func (o *ImageProperties) GetPublicOk() (*bool, bool)` GetPublicOk returns a tuple with the Public field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublic `func (o *ImageProperties) SetPublic(v bool)` SetPublic sets Public field to given value. ### HasPublic `func (o *ImageProperties) HasPublic() bool` HasPublic returns a boolean if a field has been set. ### GetImageAliases `func (o *ImageProperties) GetImageAliases() []string` GetImageAliases returns the ImageAliases field if non-nil, zero value otherwise. ### GetImageAliasesOk `func (o *ImageProperties) GetImageAliasesOk() (*[]string, bool)` GetImageAliasesOk returns a tuple with the ImageAliases field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetImageAliases `func (o *ImageProperties) SetImageAliases(v []string)` SetImageAliases sets ImageAliases field to given value. ### HasImageAliases `func (o *ImageProperties) HasImageAliases() bool` HasImageAliases returns a boolean if a field has been set. ### GetCloudInit `func (o *ImageProperties) GetCloudInit() string` GetCloudInit returns the CloudInit field if non-nil, zero value otherwise. ### GetCloudInitOk `func (o *ImageProperties) GetCloudInitOk() (*string, bool)` GetCloudInitOk returns a tuple with the CloudInit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCloudInit `func (o *ImageProperties) SetCloudInit(v string)` SetCloudInit sets CloudInit field to given value. ### HasCloudInit `func (o *ImageProperties) HasCloudInit() bool` HasCloudInit returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Images.md000066400000000000000000000061121465267054300236370ustar00rootroot00000000000000# Images ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Image**](Image.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewImages `func NewImages() *Images` NewImages instantiates a new Images object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewImagesWithDefaults `func NewImagesWithDefaults() *Images` NewImagesWithDefaults instantiates a new Images object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Images) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Images) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Images) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Images) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Images) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Images) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Images) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Images) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Images) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Images) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Images) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Images) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Images) GetItems() []Image` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Images) GetItemsOk() (*[]Image, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Images) SetItems(v []Image)` SetItems sets Items field to given value. ### HasItems `func (o *Images) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Info.md000066400000000000000000000046501465267054300233320ustar00rootroot00000000000000# Info ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Href** | Pointer to **string** | The API entry point. | [optional] [readonly] | |**Name** | Pointer to **string** | The API name. | [optional] [readonly] | |**Version** | Pointer to **string** | The API version. | [optional] [readonly] | ## Methods ### NewInfo `func NewInfo() *Info` NewInfo instantiates a new Info object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewInfoWithDefaults `func NewInfoWithDefaults() *Info` NewInfoWithDefaults instantiates a new Info object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetHref `func (o *Info) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Info) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Info) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Info) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetName `func (o *Info) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *Info) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *Info) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *Info) HasName() bool` HasName returns a boolean if a field has been set. ### GetVersion `func (o *Info) GetVersion() string` GetVersion returns the Version field if non-nil, zero value otherwise. ### GetVersionOk `func (o *Info) GetVersionOk() (*string, bool)` GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetVersion `func (o *Info) SetVersion(v string)` SetVersion sets Version field to given value. ### HasVersion `func (o *Info) HasVersion() bool` HasVersion returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/IpBlock.md000066400000000000000000000074511465267054300237640ustar00rootroot00000000000000# IpBlock ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**IpBlockProperties**](IpBlockProperties.md) | | | ## Methods ### NewIpBlock `func NewIpBlock(properties IpBlockProperties, ) *IpBlock` NewIpBlock instantiates a new IpBlock object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewIpBlockWithDefaults `func NewIpBlockWithDefaults() *IpBlock` NewIpBlockWithDefaults instantiates a new IpBlock object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *IpBlock) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *IpBlock) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *IpBlock) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *IpBlock) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *IpBlock) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *IpBlock) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *IpBlock) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *IpBlock) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *IpBlock) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *IpBlock) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *IpBlock) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *IpBlock) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *IpBlock) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *IpBlock) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *IpBlock) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *IpBlock) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *IpBlock) GetProperties() IpBlockProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *IpBlock) GetPropertiesOk() (*IpBlockProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *IpBlock) SetProperties(v IpBlockProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/IpBlockProperties.md000066400000000000000000000100011465267054300260220ustar00rootroot00000000000000# IpBlockProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Ips** | Pointer to **[]string** | Collection of IPs, associated with the IP Block. | [optional] [readonly] | |**Location** | **string** | Location of that IP block. Property cannot be modified after it is created (disallowed in update requests). | | |**Size** | **int32** | The size of the IP block. | | |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**IpConsumers** | Pointer to [**[]IpConsumer**](IpConsumer.md) | Read-Only attribute. Lists consumption detail for an individual IP | [optional] [readonly] | ## Methods ### NewIpBlockProperties `func NewIpBlockProperties(location string, size int32, ) *IpBlockProperties` NewIpBlockProperties instantiates a new IpBlockProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewIpBlockPropertiesWithDefaults `func NewIpBlockPropertiesWithDefaults() *IpBlockProperties` NewIpBlockPropertiesWithDefaults instantiates a new IpBlockProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetIps `func (o *IpBlockProperties) GetIps() []string` GetIps returns the Ips field if non-nil, zero value otherwise. ### GetIpsOk `func (o *IpBlockProperties) GetIpsOk() (*[]string, bool)` GetIpsOk returns a tuple with the Ips field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIps `func (o *IpBlockProperties) SetIps(v []string)` SetIps sets Ips field to given value. ### HasIps `func (o *IpBlockProperties) HasIps() bool` HasIps returns a boolean if a field has been set. ### GetLocation `func (o *IpBlockProperties) GetLocation() string` GetLocation returns the Location field if non-nil, zero value otherwise. ### GetLocationOk `func (o *IpBlockProperties) GetLocationOk() (*string, bool)` GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLocation `func (o *IpBlockProperties) SetLocation(v string)` SetLocation sets Location field to given value. ### GetSize `func (o *IpBlockProperties) GetSize() int32` GetSize returns the Size field if non-nil, zero value otherwise. ### GetSizeOk `func (o *IpBlockProperties) GetSizeOk() (*int32, bool)` GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSize `func (o *IpBlockProperties) SetSize(v int32)` SetSize sets Size field to given value. ### GetName `func (o *IpBlockProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *IpBlockProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *IpBlockProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *IpBlockProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetIpConsumers `func (o *IpBlockProperties) GetIpConsumers() []IpConsumer` GetIpConsumers returns the IpConsumers field if non-nil, zero value otherwise. ### GetIpConsumersOk `func (o *IpBlockProperties) GetIpConsumersOk() (*[]IpConsumer, bool)` GetIpConsumersOk returns a tuple with the IpConsumers field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIpConsumers `func (o *IpBlockProperties) SetIpConsumers(v []IpConsumer)` SetIpConsumers sets IpConsumers field to given value. ### HasIpConsumers `func (o *IpBlockProperties) HasIpConsumers() bool` HasIpConsumers returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/IpBlocks.md000066400000000000000000000121471465267054300241450ustar00rootroot00000000000000# IpBlocks ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]IpBlock**](IpBlock.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset, specified in the request (if not is specified, 0 is used by default). | [optional] | |**Limit** | Pointer to **float32** | The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewIpBlocks `func NewIpBlocks() *IpBlocks` NewIpBlocks instantiates a new IpBlocks object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewIpBlocksWithDefaults `func NewIpBlocksWithDefaults() *IpBlocks` NewIpBlocksWithDefaults instantiates a new IpBlocks object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *IpBlocks) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *IpBlocks) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *IpBlocks) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *IpBlocks) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *IpBlocks) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *IpBlocks) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *IpBlocks) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *IpBlocks) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *IpBlocks) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *IpBlocks) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *IpBlocks) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *IpBlocks) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *IpBlocks) GetItems() []IpBlock` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *IpBlocks) GetItemsOk() (*[]IpBlock, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *IpBlocks) SetItems(v []IpBlock)` SetItems sets Items field to given value. ### HasItems `func (o *IpBlocks) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *IpBlocks) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *IpBlocks) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *IpBlocks) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *IpBlocks) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *IpBlocks) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *IpBlocks) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *IpBlocks) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *IpBlocks) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *IpBlocks) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *IpBlocks) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *IpBlocks) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *IpBlocks) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/IpConsumer.md000066400000000000000000000150241465267054300245200ustar00rootroot00000000000000# IpConsumer ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Ip** | Pointer to **string** | | [optional] | |**Mac** | Pointer to **string** | | [optional] | |**NicId** | Pointer to **string** | | [optional] | |**ServerId** | Pointer to **string** | | [optional] | |**ServerName** | Pointer to **string** | | [optional] | |**DatacenterId** | Pointer to **string** | | [optional] | |**DatacenterName** | Pointer to **string** | | [optional] | |**K8sNodePoolUuid** | Pointer to **string** | | [optional] | |**K8sClusterUuid** | Pointer to **string** | | [optional] | ## Methods ### NewIpConsumer `func NewIpConsumer() *IpConsumer` NewIpConsumer instantiates a new IpConsumer object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewIpConsumerWithDefaults `func NewIpConsumerWithDefaults() *IpConsumer` NewIpConsumerWithDefaults instantiates a new IpConsumer object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetIp `func (o *IpConsumer) GetIp() string` GetIp returns the Ip field if non-nil, zero value otherwise. ### GetIpOk `func (o *IpConsumer) GetIpOk() (*string, bool)` GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIp `func (o *IpConsumer) SetIp(v string)` SetIp sets Ip field to given value. ### HasIp `func (o *IpConsumer) HasIp() bool` HasIp returns a boolean if a field has been set. ### GetMac `func (o *IpConsumer) GetMac() string` GetMac returns the Mac field if non-nil, zero value otherwise. ### GetMacOk `func (o *IpConsumer) GetMacOk() (*string, bool)` GetMacOk returns a tuple with the Mac field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMac `func (o *IpConsumer) SetMac(v string)` SetMac sets Mac field to given value. ### HasMac `func (o *IpConsumer) HasMac() bool` HasMac returns a boolean if a field has been set. ### GetNicId `func (o *IpConsumer) GetNicId() string` GetNicId returns the NicId field if non-nil, zero value otherwise. ### GetNicIdOk `func (o *IpConsumer) GetNicIdOk() (*string, bool)` GetNicIdOk returns a tuple with the NicId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNicId `func (o *IpConsumer) SetNicId(v string)` SetNicId sets NicId field to given value. ### HasNicId `func (o *IpConsumer) HasNicId() bool` HasNicId returns a boolean if a field has been set. ### GetServerId `func (o *IpConsumer) GetServerId() string` GetServerId returns the ServerId field if non-nil, zero value otherwise. ### GetServerIdOk `func (o *IpConsumer) GetServerIdOk() (*string, bool)` GetServerIdOk returns a tuple with the ServerId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetServerId `func (o *IpConsumer) SetServerId(v string)` SetServerId sets ServerId field to given value. ### HasServerId `func (o *IpConsumer) HasServerId() bool` HasServerId returns a boolean if a field has been set. ### GetServerName `func (o *IpConsumer) GetServerName() string` GetServerName returns the ServerName field if non-nil, zero value otherwise. ### GetServerNameOk `func (o *IpConsumer) GetServerNameOk() (*string, bool)` GetServerNameOk returns a tuple with the ServerName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetServerName `func (o *IpConsumer) SetServerName(v string)` SetServerName sets ServerName field to given value. ### HasServerName `func (o *IpConsumer) HasServerName() bool` HasServerName returns a boolean if a field has been set. ### GetDatacenterId `func (o *IpConsumer) GetDatacenterId() string` GetDatacenterId returns the DatacenterId field if non-nil, zero value otherwise. ### GetDatacenterIdOk `func (o *IpConsumer) GetDatacenterIdOk() (*string, bool)` GetDatacenterIdOk returns a tuple with the DatacenterId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDatacenterId `func (o *IpConsumer) SetDatacenterId(v string)` SetDatacenterId sets DatacenterId field to given value. ### HasDatacenterId `func (o *IpConsumer) HasDatacenterId() bool` HasDatacenterId returns a boolean if a field has been set. ### GetDatacenterName `func (o *IpConsumer) GetDatacenterName() string` GetDatacenterName returns the DatacenterName field if non-nil, zero value otherwise. ### GetDatacenterNameOk `func (o *IpConsumer) GetDatacenterNameOk() (*string, bool)` GetDatacenterNameOk returns a tuple with the DatacenterName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDatacenterName `func (o *IpConsumer) SetDatacenterName(v string)` SetDatacenterName sets DatacenterName field to given value. ### HasDatacenterName `func (o *IpConsumer) HasDatacenterName() bool` HasDatacenterName returns a boolean if a field has been set. ### GetK8sNodePoolUuid `func (o *IpConsumer) GetK8sNodePoolUuid() string` GetK8sNodePoolUuid returns the K8sNodePoolUuid field if non-nil, zero value otherwise. ### GetK8sNodePoolUuidOk `func (o *IpConsumer) GetK8sNodePoolUuidOk() (*string, bool)` GetK8sNodePoolUuidOk returns a tuple with the K8sNodePoolUuid field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sNodePoolUuid `func (o *IpConsumer) SetK8sNodePoolUuid(v string)` SetK8sNodePoolUuid sets K8sNodePoolUuid field to given value. ### HasK8sNodePoolUuid `func (o *IpConsumer) HasK8sNodePoolUuid() bool` HasK8sNodePoolUuid returns a boolean if a field has been set. ### GetK8sClusterUuid `func (o *IpConsumer) GetK8sClusterUuid() string` GetK8sClusterUuid returns the K8sClusterUuid field if non-nil, zero value otherwise. ### GetK8sClusterUuidOk `func (o *IpConsumer) GetK8sClusterUuidOk() (*string, bool)` GetK8sClusterUuidOk returns a tuple with the K8sClusterUuid field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sClusterUuid `func (o *IpConsumer) SetK8sClusterUuid(v string)` SetK8sClusterUuid sets K8sClusterUuid field to given value. ### HasK8sClusterUuid `func (o *IpConsumer) HasK8sClusterUuid() bool` HasK8sClusterUuid returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesAutoScaling.md000066400000000000000000000045631465267054300267030ustar00rootroot00000000000000# KubernetesAutoScaling ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**MinNodeCount** | **int32** | The minimum number of working nodes that the managed node pool can scale must be >= 1 and >= nodeCount. Required if autoScaling is specified. | | |**MaxNodeCount** | **int32** | The maximum number of worker nodes that the managed node pool can scale in. Must be >= minNodeCount and must be >= nodeCount. Required if autoScaling is specified. | | ## Methods ### NewKubernetesAutoScaling `func NewKubernetesAutoScaling(minNodeCount int32, maxNodeCount int32, ) *KubernetesAutoScaling` NewKubernetesAutoScaling instantiates a new KubernetesAutoScaling object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesAutoScalingWithDefaults `func NewKubernetesAutoScalingWithDefaults() *KubernetesAutoScaling` NewKubernetesAutoScalingWithDefaults instantiates a new KubernetesAutoScaling object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetMinNodeCount `func (o *KubernetesAutoScaling) GetMinNodeCount() int32` GetMinNodeCount returns the MinNodeCount field if non-nil, zero value otherwise. ### GetMinNodeCountOk `func (o *KubernetesAutoScaling) GetMinNodeCountOk() (*int32, bool)` GetMinNodeCountOk returns a tuple with the MinNodeCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMinNodeCount `func (o *KubernetesAutoScaling) SetMinNodeCount(v int32)` SetMinNodeCount sets MinNodeCount field to given value. ### GetMaxNodeCount `func (o *KubernetesAutoScaling) GetMaxNodeCount() int32` GetMaxNodeCount returns the MaxNodeCount field if non-nil, zero value otherwise. ### GetMaxNodeCountOk `func (o *KubernetesAutoScaling) GetMaxNodeCountOk() (*int32, bool)` GetMaxNodeCountOk returns a tuple with the MaxNodeCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaxNodeCount `func (o *KubernetesAutoScaling) SetMaxNodeCount(v int32)` SetMaxNodeCount sets MaxNodeCount field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesCluster.md000066400000000000000000000116041465267054300261050ustar00rootroot00000000000000# KubernetesCluster ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource unique identifier. | [optional] [readonly] | |**Type** | Pointer to **string** | The object type. | [optional] [readonly] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**KubernetesClusterProperties**](KubernetesClusterProperties.md) | | | |**Entities** | Pointer to [**KubernetesClusterEntities**](KubernetesClusterEntities.md) | | [optional] | ## Methods ### NewKubernetesCluster `func NewKubernetesCluster(properties KubernetesClusterProperties, ) *KubernetesCluster` NewKubernetesCluster instantiates a new KubernetesCluster object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesClusterWithDefaults `func NewKubernetesClusterWithDefaults() *KubernetesCluster` NewKubernetesClusterWithDefaults instantiates a new KubernetesCluster object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *KubernetesCluster) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesCluster) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesCluster) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *KubernetesCluster) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *KubernetesCluster) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *KubernetesCluster) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *KubernetesCluster) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *KubernetesCluster) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *KubernetesCluster) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *KubernetesCluster) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *KubernetesCluster) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *KubernetesCluster) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *KubernetesCluster) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *KubernetesCluster) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *KubernetesCluster) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *KubernetesCluster) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *KubernetesCluster) GetProperties() KubernetesClusterProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *KubernetesCluster) GetPropertiesOk() (*KubernetesClusterProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *KubernetesCluster) SetProperties(v KubernetesClusterProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *KubernetesCluster) GetEntities() KubernetesClusterEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *KubernetesCluster) GetEntitiesOk() (*KubernetesClusterEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *KubernetesCluster) SetEntities(v KubernetesClusterEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *KubernetesCluster) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesClusterEntities.md000066400000000000000000000032631465267054300276140ustar00rootroot00000000000000# KubernetesClusterEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Nodepools** | Pointer to [**KubernetesNodePools**](KubernetesNodePools.md) | | [optional] | ## Methods ### NewKubernetesClusterEntities `func NewKubernetesClusterEntities() *KubernetesClusterEntities` NewKubernetesClusterEntities instantiates a new KubernetesClusterEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesClusterEntitiesWithDefaults `func NewKubernetesClusterEntitiesWithDefaults() *KubernetesClusterEntities` NewKubernetesClusterEntitiesWithDefaults instantiates a new KubernetesClusterEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetNodepools `func (o *KubernetesClusterEntities) GetNodepools() KubernetesNodePools` GetNodepools returns the Nodepools field if non-nil, zero value otherwise. ### GetNodepoolsOk `func (o *KubernetesClusterEntities) GetNodepoolsOk() (*KubernetesNodePools, bool)` GetNodepoolsOk returns a tuple with the Nodepools field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNodepools `func (o *KubernetesClusterEntities) SetNodepools(v KubernetesNodePools)` SetNodepools sets Nodepools field to given value. ### HasNodepools `func (o *KubernetesClusterEntities) HasNodepools() bool` HasNodepools returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesClusterForPost.md000066400000000000000000000122341465267054300274220ustar00rootroot00000000000000# KubernetesClusterForPost ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource unique identifier. | [optional] [readonly] | |**Type** | Pointer to **string** | The object type. | [optional] [readonly] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**KubernetesClusterPropertiesForPost**](KubernetesClusterPropertiesForPost.md) | | | |**Entities** | Pointer to [**KubernetesClusterEntities**](KubernetesClusterEntities.md) | | [optional] | ## Methods ### NewKubernetesClusterForPost `func NewKubernetesClusterForPost(properties KubernetesClusterPropertiesForPost, ) *KubernetesClusterForPost` NewKubernetesClusterForPost instantiates a new KubernetesClusterForPost object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesClusterForPostWithDefaults `func NewKubernetesClusterForPostWithDefaults() *KubernetesClusterForPost` NewKubernetesClusterForPostWithDefaults instantiates a new KubernetesClusterForPost object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *KubernetesClusterForPost) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesClusterForPost) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesClusterForPost) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *KubernetesClusterForPost) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *KubernetesClusterForPost) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *KubernetesClusterForPost) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *KubernetesClusterForPost) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *KubernetesClusterForPost) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *KubernetesClusterForPost) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *KubernetesClusterForPost) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *KubernetesClusterForPost) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *KubernetesClusterForPost) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *KubernetesClusterForPost) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *KubernetesClusterForPost) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *KubernetesClusterForPost) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *KubernetesClusterForPost) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *KubernetesClusterForPost) GetProperties() KubernetesClusterPropertiesForPost` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *KubernetesClusterForPost) GetPropertiesOk() (*KubernetesClusterPropertiesForPost, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *KubernetesClusterForPost) SetProperties(v KubernetesClusterPropertiesForPost)` SetProperties sets Properties field to given value. ### GetEntities `func (o *KubernetesClusterForPost) GetEntities() KubernetesClusterEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *KubernetesClusterForPost) GetEntitiesOk() (*KubernetesClusterEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *KubernetesClusterForPost) SetEntities(v KubernetesClusterEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *KubernetesClusterForPost) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesClusterForPut.md000066400000000000000000000121711465267054300272450ustar00rootroot00000000000000# KubernetesClusterForPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to **string** | The type of object. | [optional] [readonly] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**KubernetesClusterPropertiesForPut**](KubernetesClusterPropertiesForPut.md) | | | |**Entities** | Pointer to [**KubernetesClusterEntities**](KubernetesClusterEntities.md) | | [optional] | ## Methods ### NewKubernetesClusterForPut `func NewKubernetesClusterForPut(properties KubernetesClusterPropertiesForPut, ) *KubernetesClusterForPut` NewKubernetesClusterForPut instantiates a new KubernetesClusterForPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesClusterForPutWithDefaults `func NewKubernetesClusterForPutWithDefaults() *KubernetesClusterForPut` NewKubernetesClusterForPutWithDefaults instantiates a new KubernetesClusterForPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *KubernetesClusterForPut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesClusterForPut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesClusterForPut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *KubernetesClusterForPut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *KubernetesClusterForPut) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *KubernetesClusterForPut) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *KubernetesClusterForPut) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *KubernetesClusterForPut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *KubernetesClusterForPut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *KubernetesClusterForPut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *KubernetesClusterForPut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *KubernetesClusterForPut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *KubernetesClusterForPut) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *KubernetesClusterForPut) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *KubernetesClusterForPut) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *KubernetesClusterForPut) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *KubernetesClusterForPut) GetProperties() KubernetesClusterPropertiesForPut` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *KubernetesClusterForPut) GetPropertiesOk() (*KubernetesClusterPropertiesForPut, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *KubernetesClusterForPut) SetProperties(v KubernetesClusterPropertiesForPut)` SetProperties sets Properties field to given value. ### GetEntities `func (o *KubernetesClusterForPut) GetEntities() KubernetesClusterEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *KubernetesClusterForPut) GetEntitiesOk() (*KubernetesClusterEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *KubernetesClusterForPut) SetEntities(v KubernetesClusterEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *KubernetesClusterForPut) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesClusterProperties.md000066400000000000000000000260741465267054300301710ustar00rootroot00000000000000# KubernetesClusterProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. | | |**K8sVersion** | Pointer to **string** | The Kubernetes version the cluster is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. | [optional] | |**MaintenanceWindow** | Pointer to [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | |**AvailableUpgradeVersions** | Pointer to **[]string** | List of available versions for upgrading the cluster | [optional] | |**ViableNodePoolVersions** | Pointer to **[]string** | List of versions that may be used for node pools under this cluster | [optional] | |**Public** | Pointer to **bool** | The indicator if the cluster is public or private. Be aware that setting it to false is currently in beta phase. | [optional] [default to true]| |**Location** | Pointer to **string** | The location of the cluster if the cluster is private. This property is immutable. The location must be enabled for your contract or you must have a Datacenter within that location. This attribute is mandatory if the cluster is private. | [optional] | |**NatGatewayIp** | Pointer to **string** | The nat gateway IP of the cluster if the cluster is private. This property is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private. | [optional] | |**NodeSubnet** | Pointer to **string** | The node subnet of the cluster, if the cluster is private. This property is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length. | [optional] | |**ApiSubnetAllowList** | Pointer to **[]string** | Access to the K8s API server is restricted to these CIDRs. Traffic, internal to the cluster, is not affected by this restriction. If no allowlist is specified, access is not restricted. If an IP without subnet mask is provided, the default value is used: 32 for IPv4 and 128 for IPv6. | [optional] | |**S3Buckets** | Pointer to [**[]S3Bucket**](S3Bucket.md) | List of S3 bucket configured for K8s usage. For now it contains only an S3 bucket used to store K8s API audit logs | [optional] | ## Methods ### NewKubernetesClusterProperties `func NewKubernetesClusterProperties(name string, ) *KubernetesClusterProperties` NewKubernetesClusterProperties instantiates a new KubernetesClusterProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesClusterPropertiesWithDefaults `func NewKubernetesClusterPropertiesWithDefaults() *KubernetesClusterProperties` NewKubernetesClusterPropertiesWithDefaults instantiates a new KubernetesClusterProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *KubernetesClusterProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *KubernetesClusterProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *KubernetesClusterProperties) SetName(v string)` SetName sets Name field to given value. ### GetK8sVersion `func (o *KubernetesClusterProperties) GetK8sVersion() string` GetK8sVersion returns the K8sVersion field if non-nil, zero value otherwise. ### GetK8sVersionOk `func (o *KubernetesClusterProperties) GetK8sVersionOk() (*string, bool)` GetK8sVersionOk returns a tuple with the K8sVersion field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sVersion `func (o *KubernetesClusterProperties) SetK8sVersion(v string)` SetK8sVersion sets K8sVersion field to given value. ### HasK8sVersion `func (o *KubernetesClusterProperties) HasK8sVersion() bool` HasK8sVersion returns a boolean if a field has been set. ### GetMaintenanceWindow `func (o *KubernetesClusterProperties) GetMaintenanceWindow() KubernetesMaintenanceWindow` GetMaintenanceWindow returns the MaintenanceWindow field if non-nil, zero value otherwise. ### GetMaintenanceWindowOk `func (o *KubernetesClusterProperties) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool)` GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaintenanceWindow `func (o *KubernetesClusterProperties) SetMaintenanceWindow(v KubernetesMaintenanceWindow)` SetMaintenanceWindow sets MaintenanceWindow field to given value. ### HasMaintenanceWindow `func (o *KubernetesClusterProperties) HasMaintenanceWindow() bool` HasMaintenanceWindow returns a boolean if a field has been set. ### GetAvailableUpgradeVersions `func (o *KubernetesClusterProperties) GetAvailableUpgradeVersions() []string` GetAvailableUpgradeVersions returns the AvailableUpgradeVersions field if non-nil, zero value otherwise. ### GetAvailableUpgradeVersionsOk `func (o *KubernetesClusterProperties) GetAvailableUpgradeVersionsOk() (*[]string, bool)` GetAvailableUpgradeVersionsOk returns a tuple with the AvailableUpgradeVersions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAvailableUpgradeVersions `func (o *KubernetesClusterProperties) SetAvailableUpgradeVersions(v []string)` SetAvailableUpgradeVersions sets AvailableUpgradeVersions field to given value. ### HasAvailableUpgradeVersions `func (o *KubernetesClusterProperties) HasAvailableUpgradeVersions() bool` HasAvailableUpgradeVersions returns a boolean if a field has been set. ### GetViableNodePoolVersions `func (o *KubernetesClusterProperties) GetViableNodePoolVersions() []string` GetViableNodePoolVersions returns the ViableNodePoolVersions field if non-nil, zero value otherwise. ### GetViableNodePoolVersionsOk `func (o *KubernetesClusterProperties) GetViableNodePoolVersionsOk() (*[]string, bool)` GetViableNodePoolVersionsOk returns a tuple with the ViableNodePoolVersions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetViableNodePoolVersions `func (o *KubernetesClusterProperties) SetViableNodePoolVersions(v []string)` SetViableNodePoolVersions sets ViableNodePoolVersions field to given value. ### HasViableNodePoolVersions `func (o *KubernetesClusterProperties) HasViableNodePoolVersions() bool` HasViableNodePoolVersions returns a boolean if a field has been set. ### GetPublic `func (o *KubernetesClusterProperties) GetPublic() bool` GetPublic returns the Public field if non-nil, zero value otherwise. ### GetPublicOk `func (o *KubernetesClusterProperties) GetPublicOk() (*bool, bool)` GetPublicOk returns a tuple with the Public field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublic `func (o *KubernetesClusterProperties) SetPublic(v bool)` SetPublic sets Public field to given value. ### HasPublic `func (o *KubernetesClusterProperties) HasPublic() bool` HasPublic returns a boolean if a field has been set. ### GetLocation `func (o *KubernetesClusterProperties) GetLocation() string` GetLocation returns the Location field if non-nil, zero value otherwise. ### GetLocationOk `func (o *KubernetesClusterProperties) GetLocationOk() (*string, bool)` GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLocation `func (o *KubernetesClusterProperties) SetLocation(v string)` SetLocation sets Location field to given value. ### HasLocation `func (o *KubernetesClusterProperties) HasLocation() bool` HasLocation returns a boolean if a field has been set. ### GetNatGatewayIp `func (o *KubernetesClusterProperties) GetNatGatewayIp() string` GetNatGatewayIp returns the NatGatewayIp field if non-nil, zero value otherwise. ### GetNatGatewayIpOk `func (o *KubernetesClusterProperties) GetNatGatewayIpOk() (*string, bool)` GetNatGatewayIpOk returns a tuple with the NatGatewayIp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNatGatewayIp `func (o *KubernetesClusterProperties) SetNatGatewayIp(v string)` SetNatGatewayIp sets NatGatewayIp field to given value. ### HasNatGatewayIp `func (o *KubernetesClusterProperties) HasNatGatewayIp() bool` HasNatGatewayIp returns a boolean if a field has been set. ### GetNodeSubnet `func (o *KubernetesClusterProperties) GetNodeSubnet() string` GetNodeSubnet returns the NodeSubnet field if non-nil, zero value otherwise. ### GetNodeSubnetOk `func (o *KubernetesClusterProperties) GetNodeSubnetOk() (*string, bool)` GetNodeSubnetOk returns a tuple with the NodeSubnet field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNodeSubnet `func (o *KubernetesClusterProperties) SetNodeSubnet(v string)` SetNodeSubnet sets NodeSubnet field to given value. ### HasNodeSubnet `func (o *KubernetesClusterProperties) HasNodeSubnet() bool` HasNodeSubnet returns a boolean if a field has been set. ### GetApiSubnetAllowList `func (o *KubernetesClusterProperties) GetApiSubnetAllowList() []string` GetApiSubnetAllowList returns the ApiSubnetAllowList field if non-nil, zero value otherwise. ### GetApiSubnetAllowListOk `func (o *KubernetesClusterProperties) GetApiSubnetAllowListOk() (*[]string, bool)` GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetApiSubnetAllowList `func (o *KubernetesClusterProperties) SetApiSubnetAllowList(v []string)` SetApiSubnetAllowList sets ApiSubnetAllowList field to given value. ### HasApiSubnetAllowList `func (o *KubernetesClusterProperties) HasApiSubnetAllowList() bool` HasApiSubnetAllowList returns a boolean if a field has been set. ### GetS3Buckets `func (o *KubernetesClusterProperties) GetS3Buckets() []S3Bucket` GetS3Buckets returns the S3Buckets field if non-nil, zero value otherwise. ### GetS3BucketsOk `func (o *KubernetesClusterProperties) GetS3BucketsOk() (*[]S3Bucket, bool)` GetS3BucketsOk returns a tuple with the S3Buckets field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetS3Buckets `func (o *KubernetesClusterProperties) SetS3Buckets(v []S3Bucket)` SetS3Buckets sets S3Buckets field to given value. ### HasS3Buckets `func (o *KubernetesClusterProperties) HasS3Buckets() bool` HasS3Buckets returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesClusterPropertiesForPost.md000066400000000000000000000225621465267054300315040ustar00rootroot00000000000000# KubernetesClusterPropertiesForPost ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. | | |**K8sVersion** | Pointer to **string** | The Kubernetes version that the cluster is running. This limits which Kubernetes versions can run in a cluster's node pools. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. | [optional] | |**MaintenanceWindow** | Pointer to [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | |**Public** | Pointer to **bool** | The indicator whether the cluster is public or private. Note that the status FALSE is still in the beta phase. | [optional] [default to true]| |**Location** | Pointer to **string** | This attribute is mandatory if the cluster is private and optional if the cluster is public. The location must be enabled for your contract, or you must have a data center at that location. This property is not adjustable. | [optional] | |**NatGatewayIp** | Pointer to **string** | The nat gateway IP of the cluster if the cluster is private. This property is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private. | [optional] | |**NodeSubnet** | Pointer to **string** | The node subnet of the cluster, if the cluster is private. This property is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length. | [optional] | |**ApiSubnetAllowList** | Pointer to **[]string** | Access to the K8s API server is restricted to these CIDRs. Intra-cluster traffic is not affected by this restriction. If no AllowList is specified, access is not limited. If an IP is specified without a subnet mask, the default value is 32 for IPv4 and 128 for IPv6. | [optional] | |**S3Buckets** | Pointer to [**[]S3Bucket**](S3Bucket.md) | List of S3 buckets configured for K8s usage. At the moment, it contains only one S3 bucket that is used to store K8s API audit logs. | [optional] | ## Methods ### NewKubernetesClusterPropertiesForPost `func NewKubernetesClusterPropertiesForPost(name string, ) *KubernetesClusterPropertiesForPost` NewKubernetesClusterPropertiesForPost instantiates a new KubernetesClusterPropertiesForPost object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesClusterPropertiesForPostWithDefaults `func NewKubernetesClusterPropertiesForPostWithDefaults() *KubernetesClusterPropertiesForPost` NewKubernetesClusterPropertiesForPostWithDefaults instantiates a new KubernetesClusterPropertiesForPost object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *KubernetesClusterPropertiesForPost) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *KubernetesClusterPropertiesForPost) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *KubernetesClusterPropertiesForPost) SetName(v string)` SetName sets Name field to given value. ### GetK8sVersion `func (o *KubernetesClusterPropertiesForPost) GetK8sVersion() string` GetK8sVersion returns the K8sVersion field if non-nil, zero value otherwise. ### GetK8sVersionOk `func (o *KubernetesClusterPropertiesForPost) GetK8sVersionOk() (*string, bool)` GetK8sVersionOk returns a tuple with the K8sVersion field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sVersion `func (o *KubernetesClusterPropertiesForPost) SetK8sVersion(v string)` SetK8sVersion sets K8sVersion field to given value. ### HasK8sVersion `func (o *KubernetesClusterPropertiesForPost) HasK8sVersion() bool` HasK8sVersion returns a boolean if a field has been set. ### GetMaintenanceWindow `func (o *KubernetesClusterPropertiesForPost) GetMaintenanceWindow() KubernetesMaintenanceWindow` GetMaintenanceWindow returns the MaintenanceWindow field if non-nil, zero value otherwise. ### GetMaintenanceWindowOk `func (o *KubernetesClusterPropertiesForPost) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool)` GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaintenanceWindow `func (o *KubernetesClusterPropertiesForPost) SetMaintenanceWindow(v KubernetesMaintenanceWindow)` SetMaintenanceWindow sets MaintenanceWindow field to given value. ### HasMaintenanceWindow `func (o *KubernetesClusterPropertiesForPost) HasMaintenanceWindow() bool` HasMaintenanceWindow returns a boolean if a field has been set. ### GetPublic `func (o *KubernetesClusterPropertiesForPost) GetPublic() bool` GetPublic returns the Public field if non-nil, zero value otherwise. ### GetPublicOk `func (o *KubernetesClusterPropertiesForPost) GetPublicOk() (*bool, bool)` GetPublicOk returns a tuple with the Public field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublic `func (o *KubernetesClusterPropertiesForPost) SetPublic(v bool)` SetPublic sets Public field to given value. ### HasPublic `func (o *KubernetesClusterPropertiesForPost) HasPublic() bool` HasPublic returns a boolean if a field has been set. ### GetLocation `func (o *KubernetesClusterPropertiesForPost) GetLocation() string` GetLocation returns the Location field if non-nil, zero value otherwise. ### GetLocationOk `func (o *KubernetesClusterPropertiesForPost) GetLocationOk() (*string, bool)` GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLocation `func (o *KubernetesClusterPropertiesForPost) SetLocation(v string)` SetLocation sets Location field to given value. ### HasLocation `func (o *KubernetesClusterPropertiesForPost) HasLocation() bool` HasLocation returns a boolean if a field has been set. ### GetNatGatewayIp `func (o *KubernetesClusterPropertiesForPost) GetNatGatewayIp() string` GetNatGatewayIp returns the NatGatewayIp field if non-nil, zero value otherwise. ### GetNatGatewayIpOk `func (o *KubernetesClusterPropertiesForPost) GetNatGatewayIpOk() (*string, bool)` GetNatGatewayIpOk returns a tuple with the NatGatewayIp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNatGatewayIp `func (o *KubernetesClusterPropertiesForPost) SetNatGatewayIp(v string)` SetNatGatewayIp sets NatGatewayIp field to given value. ### HasNatGatewayIp `func (o *KubernetesClusterPropertiesForPost) HasNatGatewayIp() bool` HasNatGatewayIp returns a boolean if a field has been set. ### GetNodeSubnet `func (o *KubernetesClusterPropertiesForPost) GetNodeSubnet() string` GetNodeSubnet returns the NodeSubnet field if non-nil, zero value otherwise. ### GetNodeSubnetOk `func (o *KubernetesClusterPropertiesForPost) GetNodeSubnetOk() (*string, bool)` GetNodeSubnetOk returns a tuple with the NodeSubnet field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNodeSubnet `func (o *KubernetesClusterPropertiesForPost) SetNodeSubnet(v string)` SetNodeSubnet sets NodeSubnet field to given value. ### HasNodeSubnet `func (o *KubernetesClusterPropertiesForPost) HasNodeSubnet() bool` HasNodeSubnet returns a boolean if a field has been set. ### GetApiSubnetAllowList `func (o *KubernetesClusterPropertiesForPost) GetApiSubnetAllowList() []string` GetApiSubnetAllowList returns the ApiSubnetAllowList field if non-nil, zero value otherwise. ### GetApiSubnetAllowListOk `func (o *KubernetesClusterPropertiesForPost) GetApiSubnetAllowListOk() (*[]string, bool)` GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetApiSubnetAllowList `func (o *KubernetesClusterPropertiesForPost) SetApiSubnetAllowList(v []string)` SetApiSubnetAllowList sets ApiSubnetAllowList field to given value. ### HasApiSubnetAllowList `func (o *KubernetesClusterPropertiesForPost) HasApiSubnetAllowList() bool` HasApiSubnetAllowList returns a boolean if a field has been set. ### GetS3Buckets `func (o *KubernetesClusterPropertiesForPost) GetS3Buckets() []S3Bucket` GetS3Buckets returns the S3Buckets field if non-nil, zero value otherwise. ### GetS3BucketsOk `func (o *KubernetesClusterPropertiesForPost) GetS3BucketsOk() (*[]S3Bucket, bool)` GetS3BucketsOk returns a tuple with the S3Buckets field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetS3Buckets `func (o *KubernetesClusterPropertiesForPost) SetS3Buckets(v []S3Bucket)` SetS3Buckets sets S3Buckets field to given value. ### HasS3Buckets `func (o *KubernetesClusterPropertiesForPost) HasS3Buckets() bool` HasS3Buckets returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesClusterPropertiesForPut.md000066400000000000000000000132771465267054300313320ustar00rootroot00000000000000# KubernetesClusterPropertiesForPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. | | |**K8sVersion** | Pointer to **string** | The Kubernetes version that the cluster is running. This limits which Kubernetes versions can run in a cluster's node pools. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. | [optional] | |**MaintenanceWindow** | Pointer to [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | |**ApiSubnetAllowList** | Pointer to **[]string** | Access to the K8s API server is restricted to these CIDRs. Intra-cluster traffic is not affected by this restriction. If no AllowList is specified, access is not limited. If an IP is specified without a subnet mask, the default value is 32 for IPv4 and 128 for IPv6. | [optional] | |**S3Buckets** | Pointer to [**[]S3Bucket**](S3Bucket.md) | List of S3 buckets configured for K8s usage. At the moment, it contains only one S3 bucket that is used to store K8s API audit logs. | [optional] | ## Methods ### NewKubernetesClusterPropertiesForPut `func NewKubernetesClusterPropertiesForPut(name string, ) *KubernetesClusterPropertiesForPut` NewKubernetesClusterPropertiesForPut instantiates a new KubernetesClusterPropertiesForPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesClusterPropertiesForPutWithDefaults `func NewKubernetesClusterPropertiesForPutWithDefaults() *KubernetesClusterPropertiesForPut` NewKubernetesClusterPropertiesForPutWithDefaults instantiates a new KubernetesClusterPropertiesForPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *KubernetesClusterPropertiesForPut) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *KubernetesClusterPropertiesForPut) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *KubernetesClusterPropertiesForPut) SetName(v string)` SetName sets Name field to given value. ### GetK8sVersion `func (o *KubernetesClusterPropertiesForPut) GetK8sVersion() string` GetK8sVersion returns the K8sVersion field if non-nil, zero value otherwise. ### GetK8sVersionOk `func (o *KubernetesClusterPropertiesForPut) GetK8sVersionOk() (*string, bool)` GetK8sVersionOk returns a tuple with the K8sVersion field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sVersion `func (o *KubernetesClusterPropertiesForPut) SetK8sVersion(v string)` SetK8sVersion sets K8sVersion field to given value. ### HasK8sVersion `func (o *KubernetesClusterPropertiesForPut) HasK8sVersion() bool` HasK8sVersion returns a boolean if a field has been set. ### GetMaintenanceWindow `func (o *KubernetesClusterPropertiesForPut) GetMaintenanceWindow() KubernetesMaintenanceWindow` GetMaintenanceWindow returns the MaintenanceWindow field if non-nil, zero value otherwise. ### GetMaintenanceWindowOk `func (o *KubernetesClusterPropertiesForPut) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool)` GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaintenanceWindow `func (o *KubernetesClusterPropertiesForPut) SetMaintenanceWindow(v KubernetesMaintenanceWindow)` SetMaintenanceWindow sets MaintenanceWindow field to given value. ### HasMaintenanceWindow `func (o *KubernetesClusterPropertiesForPut) HasMaintenanceWindow() bool` HasMaintenanceWindow returns a boolean if a field has been set. ### GetApiSubnetAllowList `func (o *KubernetesClusterPropertiesForPut) GetApiSubnetAllowList() []string` GetApiSubnetAllowList returns the ApiSubnetAllowList field if non-nil, zero value otherwise. ### GetApiSubnetAllowListOk `func (o *KubernetesClusterPropertiesForPut) GetApiSubnetAllowListOk() (*[]string, bool)` GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetApiSubnetAllowList `func (o *KubernetesClusterPropertiesForPut) SetApiSubnetAllowList(v []string)` SetApiSubnetAllowList sets ApiSubnetAllowList field to given value. ### HasApiSubnetAllowList `func (o *KubernetesClusterPropertiesForPut) HasApiSubnetAllowList() bool` HasApiSubnetAllowList returns a boolean if a field has been set. ### GetS3Buckets `func (o *KubernetesClusterPropertiesForPut) GetS3Buckets() []S3Bucket` GetS3Buckets returns the S3Buckets field if non-nil, zero value otherwise. ### GetS3BucketsOk `func (o *KubernetesClusterPropertiesForPut) GetS3BucketsOk() (*[]S3Bucket, bool)` GetS3BucketsOk returns a tuple with the S3Buckets field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetS3Buckets `func (o *KubernetesClusterPropertiesForPut) SetS3Buckets(v []S3Bucket)` SetS3Buckets sets S3Buckets field to given value. ### HasS3Buckets `func (o *KubernetesClusterPropertiesForPut) HasS3Buckets() bool` HasS3Buckets returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesClusters.md000066400000000000000000000067731465267054300263030ustar00rootroot00000000000000# KubernetesClusters ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The unique representation of the K8s cluster as a resource collection. | [optional] [readonly] | |**Type** | Pointer to **string** | The resource type within a collection. | [optional] [readonly] | |**Href** | Pointer to **string** | The URL to the collection representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]KubernetesCluster**](KubernetesCluster.md) | Array of K8s clusters in the collection. | [optional] [readonly] | ## Methods ### NewKubernetesClusters `func NewKubernetesClusters() *KubernetesClusters` NewKubernetesClusters instantiates a new KubernetesClusters object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesClustersWithDefaults `func NewKubernetesClustersWithDefaults() *KubernetesClusters` NewKubernetesClustersWithDefaults instantiates a new KubernetesClusters object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *KubernetesClusters) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesClusters) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesClusters) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *KubernetesClusters) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *KubernetesClusters) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *KubernetesClusters) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *KubernetesClusters) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *KubernetesClusters) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *KubernetesClusters) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *KubernetesClusters) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *KubernetesClusters) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *KubernetesClusters) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *KubernetesClusters) GetItems() []KubernetesCluster` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *KubernetesClusters) GetItemsOk() (*[]KubernetesCluster, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *KubernetesClusters) SetItems(v []KubernetesCluster)` SetItems sets Items field to given value. ### HasItems `func (o *KubernetesClusters) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesMaintenanceWindow.md000066400000000000000000000043271465267054300301020ustar00rootroot00000000000000# KubernetesMaintenanceWindow ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**DayOfTheWeek** | **string** | The weekday for a maintenance window. | | |**Time** | **string** | The time to use for a maintenance window. Accepted formats are: HH:mm:ss; HH:mm:ss\"Z\"; HH:mm:ssZ. This time may vary by 15 minutes. | | ## Methods ### NewKubernetesMaintenanceWindow `func NewKubernetesMaintenanceWindow(dayOfTheWeek string, time string, ) *KubernetesMaintenanceWindow` NewKubernetesMaintenanceWindow instantiates a new KubernetesMaintenanceWindow object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesMaintenanceWindowWithDefaults `func NewKubernetesMaintenanceWindowWithDefaults() *KubernetesMaintenanceWindow` NewKubernetesMaintenanceWindowWithDefaults instantiates a new KubernetesMaintenanceWindow object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetDayOfTheWeek `func (o *KubernetesMaintenanceWindow) GetDayOfTheWeek() string` GetDayOfTheWeek returns the DayOfTheWeek field if non-nil, zero value otherwise. ### GetDayOfTheWeekOk `func (o *KubernetesMaintenanceWindow) GetDayOfTheWeekOk() (*string, bool)` GetDayOfTheWeekOk returns a tuple with the DayOfTheWeek field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDayOfTheWeek `func (o *KubernetesMaintenanceWindow) SetDayOfTheWeek(v string)` SetDayOfTheWeek sets DayOfTheWeek field to given value. ### GetTime `func (o *KubernetesMaintenanceWindow) GetTime() string` GetTime returns the Time field if non-nil, zero value otherwise. ### GetTimeOk `func (o *KubernetesMaintenanceWindow) GetTimeOk() (*string, bool)` GetTimeOk returns a tuple with the Time field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTime `func (o *KubernetesMaintenanceWindow) SetTime(v string)` SetTime sets Time field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNode.md000066400000000000000000000100111465267054300253400ustar00rootroot00000000000000# KubernetesNode ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to **string** | The object type. | [optional] [readonly] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**KubernetesNodeMetadata**](KubernetesNodeMetadata.md) | | [optional] | |**Properties** | [**KubernetesNodeProperties**](KubernetesNodeProperties.md) | | | ## Methods ### NewKubernetesNode `func NewKubernetesNode(properties KubernetesNodeProperties, ) *KubernetesNode` NewKubernetesNode instantiates a new KubernetesNode object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodeWithDefaults `func NewKubernetesNodeWithDefaults() *KubernetesNode` NewKubernetesNodeWithDefaults instantiates a new KubernetesNode object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *KubernetesNode) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesNode) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesNode) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *KubernetesNode) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *KubernetesNode) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *KubernetesNode) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *KubernetesNode) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *KubernetesNode) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *KubernetesNode) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *KubernetesNode) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *KubernetesNode) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *KubernetesNode) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *KubernetesNode) GetMetadata() KubernetesNodeMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *KubernetesNode) GetMetadataOk() (*KubernetesNodeMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *KubernetesNode) SetMetadata(v KubernetesNodeMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *KubernetesNode) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *KubernetesNode) GetProperties() KubernetesNodeProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *KubernetesNode) GetPropertiesOk() (*KubernetesNodeProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *KubernetesNode) SetProperties(v KubernetesNodeProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodeMetadata.md000066400000000000000000000120151465267054300270070ustar00rootroot00000000000000# KubernetesNodeMetadata ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Etag** | Pointer to **string** | The resource entity tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity tags are also added as 'ETag' response headers to requests that do not use the 'depth' parameter. | [optional] [readonly] | |**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The date the resource was created. | [optional] [readonly] | |**LastModifiedDate** | Pointer to [**time.Time**](time.Time.md) | The date the resource was last modified. | [optional] [readonly] | |**State** | Pointer to **string** | The resource state. | [optional] [readonly] | |**LastSoftwareUpdatedDate** | Pointer to [**time.Time**](time.Time.md) | The date when the software on the node was last updated. | [optional] [readonly] | ## Methods ### NewKubernetesNodeMetadata `func NewKubernetesNodeMetadata() *KubernetesNodeMetadata` NewKubernetesNodeMetadata instantiates a new KubernetesNodeMetadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodeMetadataWithDefaults `func NewKubernetesNodeMetadataWithDefaults() *KubernetesNodeMetadata` NewKubernetesNodeMetadataWithDefaults instantiates a new KubernetesNodeMetadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetEtag `func (o *KubernetesNodeMetadata) GetEtag() string` GetEtag returns the Etag field if non-nil, zero value otherwise. ### GetEtagOk `func (o *KubernetesNodeMetadata) GetEtagOk() (*string, bool)` GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEtag `func (o *KubernetesNodeMetadata) SetEtag(v string)` SetEtag sets Etag field to given value. ### HasEtag `func (o *KubernetesNodeMetadata) HasEtag() bool` HasEtag returns a boolean if a field has been set. ### GetCreatedDate `func (o *KubernetesNodeMetadata) GetCreatedDate() time.Time` GetCreatedDate returns the CreatedDate field if non-nil, zero value otherwise. ### GetCreatedDateOk `func (o *KubernetesNodeMetadata) GetCreatedDateOk() (*time.Time, bool)` GetCreatedDateOk returns a tuple with the CreatedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedDate `func (o *KubernetesNodeMetadata) SetCreatedDate(v time.Time)` SetCreatedDate sets CreatedDate field to given value. ### HasCreatedDate `func (o *KubernetesNodeMetadata) HasCreatedDate() bool` HasCreatedDate returns a boolean if a field has been set. ### GetLastModifiedDate `func (o *KubernetesNodeMetadata) GetLastModifiedDate() time.Time` GetLastModifiedDate returns the LastModifiedDate field if non-nil, zero value otherwise. ### GetLastModifiedDateOk `func (o *KubernetesNodeMetadata) GetLastModifiedDateOk() (*time.Time, bool)` GetLastModifiedDateOk returns a tuple with the LastModifiedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastModifiedDate `func (o *KubernetesNodeMetadata) SetLastModifiedDate(v time.Time)` SetLastModifiedDate sets LastModifiedDate field to given value. ### HasLastModifiedDate `func (o *KubernetesNodeMetadata) HasLastModifiedDate() bool` HasLastModifiedDate returns a boolean if a field has been set. ### GetState `func (o *KubernetesNodeMetadata) GetState() string` GetState returns the State field if non-nil, zero value otherwise. ### GetStateOk `func (o *KubernetesNodeMetadata) GetStateOk() (*string, bool)` GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetState `func (o *KubernetesNodeMetadata) SetState(v string)` SetState sets State field to given value. ### HasState `func (o *KubernetesNodeMetadata) HasState() bool` HasState returns a boolean if a field has been set. ### GetLastSoftwareUpdatedDate `func (o *KubernetesNodeMetadata) GetLastSoftwareUpdatedDate() time.Time` GetLastSoftwareUpdatedDate returns the LastSoftwareUpdatedDate field if non-nil, zero value otherwise. ### GetLastSoftwareUpdatedDateOk `func (o *KubernetesNodeMetadata) GetLastSoftwareUpdatedDateOk() (*time.Time, bool)` GetLastSoftwareUpdatedDateOk returns a tuple with the LastSoftwareUpdatedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastSoftwareUpdatedDate `func (o *KubernetesNodeMetadata) SetLastSoftwareUpdatedDate(v time.Time)` SetLastSoftwareUpdatedDate sets LastSoftwareUpdatedDate field to given value. ### HasLastSoftwareUpdatedDate `func (o *KubernetesNodeMetadata) HasLastSoftwareUpdatedDate() bool` HasLastSoftwareUpdatedDate returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodePool.md000066400000000000000000000102501465267054300261770ustar00rootroot00000000000000# KubernetesNodePool ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to **string** | The object type. | [optional] [readonly] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**KubernetesNodePoolProperties**](KubernetesNodePoolProperties.md) | | | ## Methods ### NewKubernetesNodePool `func NewKubernetesNodePool(properties KubernetesNodePoolProperties, ) *KubernetesNodePool` NewKubernetesNodePool instantiates a new KubernetesNodePool object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodePoolWithDefaults `func NewKubernetesNodePoolWithDefaults() *KubernetesNodePool` NewKubernetesNodePoolWithDefaults instantiates a new KubernetesNodePool object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *KubernetesNodePool) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesNodePool) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesNodePool) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *KubernetesNodePool) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *KubernetesNodePool) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *KubernetesNodePool) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *KubernetesNodePool) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *KubernetesNodePool) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *KubernetesNodePool) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *KubernetesNodePool) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *KubernetesNodePool) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *KubernetesNodePool) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *KubernetesNodePool) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *KubernetesNodePool) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *KubernetesNodePool) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *KubernetesNodePool) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *KubernetesNodePool) GetProperties() KubernetesNodePoolProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *KubernetesNodePool) GetPropertiesOk() (*KubernetesNodePoolProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *KubernetesNodePool) SetProperties(v KubernetesNodePoolProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodePoolForPost.md000066400000000000000000000106441465267054300275230ustar00rootroot00000000000000# KubernetesNodePoolForPost ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to **string** | The object type. | [optional] [readonly] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**KubernetesNodePoolPropertiesForPost**](KubernetesNodePoolPropertiesForPost.md) | | | ## Methods ### NewKubernetesNodePoolForPost `func NewKubernetesNodePoolForPost(properties KubernetesNodePoolPropertiesForPost, ) *KubernetesNodePoolForPost` NewKubernetesNodePoolForPost instantiates a new KubernetesNodePoolForPost object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodePoolForPostWithDefaults `func NewKubernetesNodePoolForPostWithDefaults() *KubernetesNodePoolForPost` NewKubernetesNodePoolForPostWithDefaults instantiates a new KubernetesNodePoolForPost object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *KubernetesNodePoolForPost) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesNodePoolForPost) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesNodePoolForPost) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *KubernetesNodePoolForPost) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *KubernetesNodePoolForPost) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *KubernetesNodePoolForPost) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *KubernetesNodePoolForPost) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *KubernetesNodePoolForPost) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *KubernetesNodePoolForPost) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *KubernetesNodePoolForPost) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *KubernetesNodePoolForPost) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *KubernetesNodePoolForPost) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *KubernetesNodePoolForPost) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *KubernetesNodePoolForPost) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *KubernetesNodePoolForPost) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *KubernetesNodePoolForPost) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *KubernetesNodePoolForPost) GetProperties() KubernetesNodePoolPropertiesForPost` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *KubernetesNodePoolForPost) GetPropertiesOk() (*KubernetesNodePoolPropertiesForPost, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *KubernetesNodePoolForPost) SetProperties(v KubernetesNodePoolPropertiesForPost)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodePoolForPut.md000066400000000000000000000106001465267054300273360ustar00rootroot00000000000000# KubernetesNodePoolForPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to **string** | The object type. | [optional] [readonly] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**KubernetesNodePoolPropertiesForPut**](KubernetesNodePoolPropertiesForPut.md) | | | ## Methods ### NewKubernetesNodePoolForPut `func NewKubernetesNodePoolForPut(properties KubernetesNodePoolPropertiesForPut, ) *KubernetesNodePoolForPut` NewKubernetesNodePoolForPut instantiates a new KubernetesNodePoolForPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodePoolForPutWithDefaults `func NewKubernetesNodePoolForPutWithDefaults() *KubernetesNodePoolForPut` NewKubernetesNodePoolForPutWithDefaults instantiates a new KubernetesNodePoolForPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *KubernetesNodePoolForPut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesNodePoolForPut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesNodePoolForPut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *KubernetesNodePoolForPut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *KubernetesNodePoolForPut) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *KubernetesNodePoolForPut) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *KubernetesNodePoolForPut) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *KubernetesNodePoolForPut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *KubernetesNodePoolForPut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *KubernetesNodePoolForPut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *KubernetesNodePoolForPut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *KubernetesNodePoolForPut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *KubernetesNodePoolForPut) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *KubernetesNodePoolForPut) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *KubernetesNodePoolForPut) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *KubernetesNodePoolForPut) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *KubernetesNodePoolForPut) GetProperties() KubernetesNodePoolPropertiesForPut` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *KubernetesNodePoolForPut) GetPropertiesOk() (*KubernetesNodePoolPropertiesForPut, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *KubernetesNodePoolForPut) SetProperties(v KubernetesNodePoolPropertiesForPut)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodePoolLan.md000066400000000000000000000072151465267054300266410ustar00rootroot00000000000000# KubernetesNodePoolLan ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**DatacenterId** | Pointer to **string** | The datacenter ID, requires system privileges, for internal usage only | [optional] | |**Id** | **int32** | The LAN ID of an existing LAN at the related data center | | |**Dhcp** | Pointer to **bool** | Specifies whether the Kubernetes node pool LAN reserves an IP with DHCP. | [optional] | |**Routes** | Pointer to [**[]KubernetesNodePoolLanRoutes**](KubernetesNodePoolLanRoutes.md) | The array of additional LANs attached to worker nodes. | [optional] | ## Methods ### NewKubernetesNodePoolLan `func NewKubernetesNodePoolLan(id int32, ) *KubernetesNodePoolLan` NewKubernetesNodePoolLan instantiates a new KubernetesNodePoolLan object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodePoolLanWithDefaults `func NewKubernetesNodePoolLanWithDefaults() *KubernetesNodePoolLan` NewKubernetesNodePoolLanWithDefaults instantiates a new KubernetesNodePoolLan object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetDatacenterId `func (o *KubernetesNodePoolLan) GetDatacenterId() string` GetDatacenterId returns the DatacenterId field if non-nil, zero value otherwise. ### GetDatacenterIdOk `func (o *KubernetesNodePoolLan) GetDatacenterIdOk() (*string, bool)` GetDatacenterIdOk returns a tuple with the DatacenterId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDatacenterId `func (o *KubernetesNodePoolLan) SetDatacenterId(v string)` SetDatacenterId sets DatacenterId field to given value. ### HasDatacenterId `func (o *KubernetesNodePoolLan) HasDatacenterId() bool` HasDatacenterId returns a boolean if a field has been set. ### GetId `func (o *KubernetesNodePoolLan) GetId() int32` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesNodePoolLan) GetIdOk() (*int32, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesNodePoolLan) SetId(v int32)` SetId sets Id field to given value. ### GetDhcp `func (o *KubernetesNodePoolLan) GetDhcp() bool` GetDhcp returns the Dhcp field if non-nil, zero value otherwise. ### GetDhcpOk `func (o *KubernetesNodePoolLan) GetDhcpOk() (*bool, bool)` GetDhcpOk returns a tuple with the Dhcp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDhcp `func (o *KubernetesNodePoolLan) SetDhcp(v bool)` SetDhcp sets Dhcp field to given value. ### HasDhcp `func (o *KubernetesNodePoolLan) HasDhcp() bool` HasDhcp returns a boolean if a field has been set. ### GetRoutes `func (o *KubernetesNodePoolLan) GetRoutes() []KubernetesNodePoolLanRoutes` GetRoutes returns the Routes field if non-nil, zero value otherwise. ### GetRoutesOk `func (o *KubernetesNodePoolLan) GetRoutesOk() (*[]KubernetesNodePoolLanRoutes, bool)` GetRoutesOk returns a tuple with the Routes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRoutes `func (o *KubernetesNodePoolLan) SetRoutes(v []KubernetesNodePoolLanRoutes)` SetRoutes sets Routes field to given value. ### HasRoutes `func (o *KubernetesNodePoolLan) HasRoutes() bool` HasRoutes returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodePoolLanRoutes.md000066400000000000000000000046141465267054300300430ustar00rootroot00000000000000# KubernetesNodePoolLanRoutes ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Network** | Pointer to **string** | IPv4 or IPv6 CIDR to be routed via the interface. | [optional] | |**GatewayIp** | Pointer to **string** | IPv4 or IPv6 Gateway IP for the route. | [optional] | ## Methods ### NewKubernetesNodePoolLanRoutes `func NewKubernetesNodePoolLanRoutes() *KubernetesNodePoolLanRoutes` NewKubernetesNodePoolLanRoutes instantiates a new KubernetesNodePoolLanRoutes object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodePoolLanRoutesWithDefaults `func NewKubernetesNodePoolLanRoutesWithDefaults() *KubernetesNodePoolLanRoutes` NewKubernetesNodePoolLanRoutesWithDefaults instantiates a new KubernetesNodePoolLanRoutes object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetNetwork `func (o *KubernetesNodePoolLanRoutes) GetNetwork() string` GetNetwork returns the Network field if non-nil, zero value otherwise. ### GetNetworkOk `func (o *KubernetesNodePoolLanRoutes) GetNetworkOk() (*string, bool)` GetNetworkOk returns a tuple with the Network field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNetwork `func (o *KubernetesNodePoolLanRoutes) SetNetwork(v string)` SetNetwork sets Network field to given value. ### HasNetwork `func (o *KubernetesNodePoolLanRoutes) HasNetwork() bool` HasNetwork returns a boolean if a field has been set. ### GetGatewayIp `func (o *KubernetesNodePoolLanRoutes) GetGatewayIp() string` GetGatewayIp returns the GatewayIp field if non-nil, zero value otherwise. ### GetGatewayIpOk `func (o *KubernetesNodePoolLanRoutes) GetGatewayIpOk() (*string, bool)` GetGatewayIpOk returns a tuple with the GatewayIp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGatewayIp `func (o *KubernetesNodePoolLanRoutes) SetGatewayIp(v string)` SetGatewayIp sets GatewayIp field to given value. ### HasGatewayIp `func (o *KubernetesNodePoolLanRoutes) HasGatewayIp() bool` HasGatewayIp returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodePoolProperties.md000066400000000000000000000343231465267054300302630ustar00rootroot00000000000000# KubernetesNodePoolProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. | | |**DatacenterId** | **string** | The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. | | |**NodeCount** | **int32** | The number of worker nodes of the node pool. | | |**CpuFamily** | **string** | The CPU type for the nodes. | | |**CoresCount** | **int32** | The total number of cores for the nodes. | | |**RamSize** | **int32** | The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. | | |**AvailabilityZone** | **string** | The availability zone in which the target VM should be provisioned. | | |**StorageType** | **string** | The storage type for the nodes. | | |**StorageSize** | **int32** | The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. | | |**K8sVersion** | Pointer to **string** | The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. | [optional] | |**MaintenanceWindow** | Pointer to [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | |**AutoScaling** | Pointer to [**KubernetesAutoScaling**](KubernetesAutoScaling.md) | | [optional] | |**Lans** | Pointer to [**[]KubernetesNodePoolLan**](KubernetesNodePoolLan.md) | The array of existing private LANs to attach to worker nodes. | [optional] | |**Labels** | Pointer to **map[string]string** | The labels attached to the node pool. | [optional] | |**Annotations** | Pointer to **map[string]string** | The annotations attached to the node pool. | [optional] | |**PublicIps** | Pointer to **[]string** | Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. | [optional] | |**AvailableUpgradeVersions** | Pointer to **[]string** | The list of available versions for upgrading the node pool. | [optional] | ## Methods ### NewKubernetesNodePoolProperties `func NewKubernetesNodePoolProperties(name string, datacenterId string, nodeCount int32, cpuFamily string, coresCount int32, ramSize int32, availabilityZone string, storageType string, storageSize int32, ) *KubernetesNodePoolProperties` NewKubernetesNodePoolProperties instantiates a new KubernetesNodePoolProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodePoolPropertiesWithDefaults `func NewKubernetesNodePoolPropertiesWithDefaults() *KubernetesNodePoolProperties` NewKubernetesNodePoolPropertiesWithDefaults instantiates a new KubernetesNodePoolProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *KubernetesNodePoolProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *KubernetesNodePoolProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *KubernetesNodePoolProperties) SetName(v string)` SetName sets Name field to given value. ### GetDatacenterId `func (o *KubernetesNodePoolProperties) GetDatacenterId() string` GetDatacenterId returns the DatacenterId field if non-nil, zero value otherwise. ### GetDatacenterIdOk `func (o *KubernetesNodePoolProperties) GetDatacenterIdOk() (*string, bool)` GetDatacenterIdOk returns a tuple with the DatacenterId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDatacenterId `func (o *KubernetesNodePoolProperties) SetDatacenterId(v string)` SetDatacenterId sets DatacenterId field to given value. ### GetNodeCount `func (o *KubernetesNodePoolProperties) GetNodeCount() int32` GetNodeCount returns the NodeCount field if non-nil, zero value otherwise. ### GetNodeCountOk `func (o *KubernetesNodePoolProperties) GetNodeCountOk() (*int32, bool)` GetNodeCountOk returns a tuple with the NodeCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNodeCount `func (o *KubernetesNodePoolProperties) SetNodeCount(v int32)` SetNodeCount sets NodeCount field to given value. ### GetCpuFamily `func (o *KubernetesNodePoolProperties) GetCpuFamily() string` GetCpuFamily returns the CpuFamily field if non-nil, zero value otherwise. ### GetCpuFamilyOk `func (o *KubernetesNodePoolProperties) GetCpuFamilyOk() (*string, bool)` GetCpuFamilyOk returns a tuple with the CpuFamily field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuFamily `func (o *KubernetesNodePoolProperties) SetCpuFamily(v string)` SetCpuFamily sets CpuFamily field to given value. ### GetCoresCount `func (o *KubernetesNodePoolProperties) GetCoresCount() int32` GetCoresCount returns the CoresCount field if non-nil, zero value otherwise. ### GetCoresCountOk `func (o *KubernetesNodePoolProperties) GetCoresCountOk() (*int32, bool)` GetCoresCountOk returns a tuple with the CoresCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCoresCount `func (o *KubernetesNodePoolProperties) SetCoresCount(v int32)` SetCoresCount sets CoresCount field to given value. ### GetRamSize `func (o *KubernetesNodePoolProperties) GetRamSize() int32` GetRamSize returns the RamSize field if non-nil, zero value otherwise. ### GetRamSizeOk `func (o *KubernetesNodePoolProperties) GetRamSizeOk() (*int32, bool)` GetRamSizeOk returns a tuple with the RamSize field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRamSize `func (o *KubernetesNodePoolProperties) SetRamSize(v int32)` SetRamSize sets RamSize field to given value. ### GetAvailabilityZone `func (o *KubernetesNodePoolProperties) GetAvailabilityZone() string` GetAvailabilityZone returns the AvailabilityZone field if non-nil, zero value otherwise. ### GetAvailabilityZoneOk `func (o *KubernetesNodePoolProperties) GetAvailabilityZoneOk() (*string, bool)` GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAvailabilityZone `func (o *KubernetesNodePoolProperties) SetAvailabilityZone(v string)` SetAvailabilityZone sets AvailabilityZone field to given value. ### GetStorageType `func (o *KubernetesNodePoolProperties) GetStorageType() string` GetStorageType returns the StorageType field if non-nil, zero value otherwise. ### GetStorageTypeOk `func (o *KubernetesNodePoolProperties) GetStorageTypeOk() (*string, bool)` GetStorageTypeOk returns a tuple with the StorageType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStorageType `func (o *KubernetesNodePoolProperties) SetStorageType(v string)` SetStorageType sets StorageType field to given value. ### GetStorageSize `func (o *KubernetesNodePoolProperties) GetStorageSize() int32` GetStorageSize returns the StorageSize field if non-nil, zero value otherwise. ### GetStorageSizeOk `func (o *KubernetesNodePoolProperties) GetStorageSizeOk() (*int32, bool)` GetStorageSizeOk returns a tuple with the StorageSize field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStorageSize `func (o *KubernetesNodePoolProperties) SetStorageSize(v int32)` SetStorageSize sets StorageSize field to given value. ### GetK8sVersion `func (o *KubernetesNodePoolProperties) GetK8sVersion() string` GetK8sVersion returns the K8sVersion field if non-nil, zero value otherwise. ### GetK8sVersionOk `func (o *KubernetesNodePoolProperties) GetK8sVersionOk() (*string, bool)` GetK8sVersionOk returns a tuple with the K8sVersion field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sVersion `func (o *KubernetesNodePoolProperties) SetK8sVersion(v string)` SetK8sVersion sets K8sVersion field to given value. ### HasK8sVersion `func (o *KubernetesNodePoolProperties) HasK8sVersion() bool` HasK8sVersion returns a boolean if a field has been set. ### GetMaintenanceWindow `func (o *KubernetesNodePoolProperties) GetMaintenanceWindow() KubernetesMaintenanceWindow` GetMaintenanceWindow returns the MaintenanceWindow field if non-nil, zero value otherwise. ### GetMaintenanceWindowOk `func (o *KubernetesNodePoolProperties) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool)` GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaintenanceWindow `func (o *KubernetesNodePoolProperties) SetMaintenanceWindow(v KubernetesMaintenanceWindow)` SetMaintenanceWindow sets MaintenanceWindow field to given value. ### HasMaintenanceWindow `func (o *KubernetesNodePoolProperties) HasMaintenanceWindow() bool` HasMaintenanceWindow returns a boolean if a field has been set. ### GetAutoScaling `func (o *KubernetesNodePoolProperties) GetAutoScaling() KubernetesAutoScaling` GetAutoScaling returns the AutoScaling field if non-nil, zero value otherwise. ### GetAutoScalingOk `func (o *KubernetesNodePoolProperties) GetAutoScalingOk() (*KubernetesAutoScaling, bool)` GetAutoScalingOk returns a tuple with the AutoScaling field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAutoScaling `func (o *KubernetesNodePoolProperties) SetAutoScaling(v KubernetesAutoScaling)` SetAutoScaling sets AutoScaling field to given value. ### HasAutoScaling `func (o *KubernetesNodePoolProperties) HasAutoScaling() bool` HasAutoScaling returns a boolean if a field has been set. ### GetLans `func (o *KubernetesNodePoolProperties) GetLans() []KubernetesNodePoolLan` GetLans returns the Lans field if non-nil, zero value otherwise. ### GetLansOk `func (o *KubernetesNodePoolProperties) GetLansOk() (*[]KubernetesNodePoolLan, bool)` GetLansOk returns a tuple with the Lans field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLans `func (o *KubernetesNodePoolProperties) SetLans(v []KubernetesNodePoolLan)` SetLans sets Lans field to given value. ### HasLans `func (o *KubernetesNodePoolProperties) HasLans() bool` HasLans returns a boolean if a field has been set. ### GetLabels `func (o *KubernetesNodePoolProperties) GetLabels() map[string]string` GetLabels returns the Labels field if non-nil, zero value otherwise. ### GetLabelsOk `func (o *KubernetesNodePoolProperties) GetLabelsOk() (*map[string]string, bool)` GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLabels `func (o *KubernetesNodePoolProperties) SetLabels(v map[string]string)` SetLabels sets Labels field to given value. ### HasLabels `func (o *KubernetesNodePoolProperties) HasLabels() bool` HasLabels returns a boolean if a field has been set. ### GetAnnotations `func (o *KubernetesNodePoolProperties) GetAnnotations() map[string]string` GetAnnotations returns the Annotations field if non-nil, zero value otherwise. ### GetAnnotationsOk `func (o *KubernetesNodePoolProperties) GetAnnotationsOk() (*map[string]string, bool)` GetAnnotationsOk returns a tuple with the Annotations field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAnnotations `func (o *KubernetesNodePoolProperties) SetAnnotations(v map[string]string)` SetAnnotations sets Annotations field to given value. ### HasAnnotations `func (o *KubernetesNodePoolProperties) HasAnnotations() bool` HasAnnotations returns a boolean if a field has been set. ### GetPublicIps `func (o *KubernetesNodePoolProperties) GetPublicIps() []string` GetPublicIps returns the PublicIps field if non-nil, zero value otherwise. ### GetPublicIpsOk `func (o *KubernetesNodePoolProperties) GetPublicIpsOk() (*[]string, bool)` GetPublicIpsOk returns a tuple with the PublicIps field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublicIps `func (o *KubernetesNodePoolProperties) SetPublicIps(v []string)` SetPublicIps sets PublicIps field to given value. ### HasPublicIps `func (o *KubernetesNodePoolProperties) HasPublicIps() bool` HasPublicIps returns a boolean if a field has been set. ### GetAvailableUpgradeVersions `func (o *KubernetesNodePoolProperties) GetAvailableUpgradeVersions() []string` GetAvailableUpgradeVersions returns the AvailableUpgradeVersions field if non-nil, zero value otherwise. ### GetAvailableUpgradeVersionsOk `func (o *KubernetesNodePoolProperties) GetAvailableUpgradeVersionsOk() (*[]string, bool)` GetAvailableUpgradeVersionsOk returns a tuple with the AvailableUpgradeVersions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAvailableUpgradeVersions `func (o *KubernetesNodePoolProperties) SetAvailableUpgradeVersions(v []string)` SetAvailableUpgradeVersions sets AvailableUpgradeVersions field to given value. ### HasAvailableUpgradeVersions `func (o *KubernetesNodePoolProperties) HasAvailableUpgradeVersions() bool` HasAvailableUpgradeVersions returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodePoolPropertiesForPost.md000066400000000000000000000332301465267054300315740ustar00rootroot00000000000000# KubernetesNodePoolPropertiesForPost ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. | | |**DatacenterId** | **string** | The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. | | |**NodeCount** | **int32** | The number of worker nodes of the node pool. | | |**CpuFamily** | **string** | The CPU type for the nodes. | | |**CoresCount** | **int32** | The total number of cores for the nodes. | | |**RamSize** | **int32** | The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. | | |**AvailabilityZone** | **string** | The availability zone in which the target VM should be provisioned. | | |**StorageType** | **string** | The storage type for the nodes. | | |**StorageSize** | **int32** | The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. | | |**K8sVersion** | Pointer to **string** | The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. | [optional] | |**MaintenanceWindow** | Pointer to [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | |**AutoScaling** | Pointer to [**KubernetesAutoScaling**](KubernetesAutoScaling.md) | | [optional] | |**Lans** | Pointer to [**[]KubernetesNodePoolLan**](KubernetesNodePoolLan.md) | The array of existing private LANs to attach to worker nodes. | [optional] | |**Labels** | Pointer to **map[string]string** | The labels attached to the node pool. | [optional] | |**Annotations** | Pointer to **map[string]string** | The annotations attached to the node pool. | [optional] | |**PublicIps** | Pointer to **[]string** | Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. | [optional] | ## Methods ### NewKubernetesNodePoolPropertiesForPost `func NewKubernetesNodePoolPropertiesForPost(name string, datacenterId string, nodeCount int32, cpuFamily string, coresCount int32, ramSize int32, availabilityZone string, storageType string, storageSize int32, ) *KubernetesNodePoolPropertiesForPost` NewKubernetesNodePoolPropertiesForPost instantiates a new KubernetesNodePoolPropertiesForPost object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodePoolPropertiesForPostWithDefaults `func NewKubernetesNodePoolPropertiesForPostWithDefaults() *KubernetesNodePoolPropertiesForPost` NewKubernetesNodePoolPropertiesForPostWithDefaults instantiates a new KubernetesNodePoolPropertiesForPost object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *KubernetesNodePoolPropertiesForPost) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *KubernetesNodePoolPropertiesForPost) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *KubernetesNodePoolPropertiesForPost) SetName(v string)` SetName sets Name field to given value. ### GetDatacenterId `func (o *KubernetesNodePoolPropertiesForPost) GetDatacenterId() string` GetDatacenterId returns the DatacenterId field if non-nil, zero value otherwise. ### GetDatacenterIdOk `func (o *KubernetesNodePoolPropertiesForPost) GetDatacenterIdOk() (*string, bool)` GetDatacenterIdOk returns a tuple with the DatacenterId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDatacenterId `func (o *KubernetesNodePoolPropertiesForPost) SetDatacenterId(v string)` SetDatacenterId sets DatacenterId field to given value. ### GetNodeCount `func (o *KubernetesNodePoolPropertiesForPost) GetNodeCount() int32` GetNodeCount returns the NodeCount field if non-nil, zero value otherwise. ### GetNodeCountOk `func (o *KubernetesNodePoolPropertiesForPost) GetNodeCountOk() (*int32, bool)` GetNodeCountOk returns a tuple with the NodeCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNodeCount `func (o *KubernetesNodePoolPropertiesForPost) SetNodeCount(v int32)` SetNodeCount sets NodeCount field to given value. ### GetCpuFamily `func (o *KubernetesNodePoolPropertiesForPost) GetCpuFamily() string` GetCpuFamily returns the CpuFamily field if non-nil, zero value otherwise. ### GetCpuFamilyOk `func (o *KubernetesNodePoolPropertiesForPost) GetCpuFamilyOk() (*string, bool)` GetCpuFamilyOk returns a tuple with the CpuFamily field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuFamily `func (o *KubernetesNodePoolPropertiesForPost) SetCpuFamily(v string)` SetCpuFamily sets CpuFamily field to given value. ### GetCoresCount `func (o *KubernetesNodePoolPropertiesForPost) GetCoresCount() int32` GetCoresCount returns the CoresCount field if non-nil, zero value otherwise. ### GetCoresCountOk `func (o *KubernetesNodePoolPropertiesForPost) GetCoresCountOk() (*int32, bool)` GetCoresCountOk returns a tuple with the CoresCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCoresCount `func (o *KubernetesNodePoolPropertiesForPost) SetCoresCount(v int32)` SetCoresCount sets CoresCount field to given value. ### GetRamSize `func (o *KubernetesNodePoolPropertiesForPost) GetRamSize() int32` GetRamSize returns the RamSize field if non-nil, zero value otherwise. ### GetRamSizeOk `func (o *KubernetesNodePoolPropertiesForPost) GetRamSizeOk() (*int32, bool)` GetRamSizeOk returns a tuple with the RamSize field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRamSize `func (o *KubernetesNodePoolPropertiesForPost) SetRamSize(v int32)` SetRamSize sets RamSize field to given value. ### GetAvailabilityZone `func (o *KubernetesNodePoolPropertiesForPost) GetAvailabilityZone() string` GetAvailabilityZone returns the AvailabilityZone field if non-nil, zero value otherwise. ### GetAvailabilityZoneOk `func (o *KubernetesNodePoolPropertiesForPost) GetAvailabilityZoneOk() (*string, bool)` GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAvailabilityZone `func (o *KubernetesNodePoolPropertiesForPost) SetAvailabilityZone(v string)` SetAvailabilityZone sets AvailabilityZone field to given value. ### GetStorageType `func (o *KubernetesNodePoolPropertiesForPost) GetStorageType() string` GetStorageType returns the StorageType field if non-nil, zero value otherwise. ### GetStorageTypeOk `func (o *KubernetesNodePoolPropertiesForPost) GetStorageTypeOk() (*string, bool)` GetStorageTypeOk returns a tuple with the StorageType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStorageType `func (o *KubernetesNodePoolPropertiesForPost) SetStorageType(v string)` SetStorageType sets StorageType field to given value. ### GetStorageSize `func (o *KubernetesNodePoolPropertiesForPost) GetStorageSize() int32` GetStorageSize returns the StorageSize field if non-nil, zero value otherwise. ### GetStorageSizeOk `func (o *KubernetesNodePoolPropertiesForPost) GetStorageSizeOk() (*int32, bool)` GetStorageSizeOk returns a tuple with the StorageSize field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStorageSize `func (o *KubernetesNodePoolPropertiesForPost) SetStorageSize(v int32)` SetStorageSize sets StorageSize field to given value. ### GetK8sVersion `func (o *KubernetesNodePoolPropertiesForPost) GetK8sVersion() string` GetK8sVersion returns the K8sVersion field if non-nil, zero value otherwise. ### GetK8sVersionOk `func (o *KubernetesNodePoolPropertiesForPost) GetK8sVersionOk() (*string, bool)` GetK8sVersionOk returns a tuple with the K8sVersion field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sVersion `func (o *KubernetesNodePoolPropertiesForPost) SetK8sVersion(v string)` SetK8sVersion sets K8sVersion field to given value. ### HasK8sVersion `func (o *KubernetesNodePoolPropertiesForPost) HasK8sVersion() bool` HasK8sVersion returns a boolean if a field has been set. ### GetMaintenanceWindow `func (o *KubernetesNodePoolPropertiesForPost) GetMaintenanceWindow() KubernetesMaintenanceWindow` GetMaintenanceWindow returns the MaintenanceWindow field if non-nil, zero value otherwise. ### GetMaintenanceWindowOk `func (o *KubernetesNodePoolPropertiesForPost) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool)` GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaintenanceWindow `func (o *KubernetesNodePoolPropertiesForPost) SetMaintenanceWindow(v KubernetesMaintenanceWindow)` SetMaintenanceWindow sets MaintenanceWindow field to given value. ### HasMaintenanceWindow `func (o *KubernetesNodePoolPropertiesForPost) HasMaintenanceWindow() bool` HasMaintenanceWindow returns a boolean if a field has been set. ### GetAutoScaling `func (o *KubernetesNodePoolPropertiesForPost) GetAutoScaling() KubernetesAutoScaling` GetAutoScaling returns the AutoScaling field if non-nil, zero value otherwise. ### GetAutoScalingOk `func (o *KubernetesNodePoolPropertiesForPost) GetAutoScalingOk() (*KubernetesAutoScaling, bool)` GetAutoScalingOk returns a tuple with the AutoScaling field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAutoScaling `func (o *KubernetesNodePoolPropertiesForPost) SetAutoScaling(v KubernetesAutoScaling)` SetAutoScaling sets AutoScaling field to given value. ### HasAutoScaling `func (o *KubernetesNodePoolPropertiesForPost) HasAutoScaling() bool` HasAutoScaling returns a boolean if a field has been set. ### GetLans `func (o *KubernetesNodePoolPropertiesForPost) GetLans() []KubernetesNodePoolLan` GetLans returns the Lans field if non-nil, zero value otherwise. ### GetLansOk `func (o *KubernetesNodePoolPropertiesForPost) GetLansOk() (*[]KubernetesNodePoolLan, bool)` GetLansOk returns a tuple with the Lans field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLans `func (o *KubernetesNodePoolPropertiesForPost) SetLans(v []KubernetesNodePoolLan)` SetLans sets Lans field to given value. ### HasLans `func (o *KubernetesNodePoolPropertiesForPost) HasLans() bool` HasLans returns a boolean if a field has been set. ### GetLabels `func (o *KubernetesNodePoolPropertiesForPost) GetLabels() map[string]string` GetLabels returns the Labels field if non-nil, zero value otherwise. ### GetLabelsOk `func (o *KubernetesNodePoolPropertiesForPost) GetLabelsOk() (*map[string]string, bool)` GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLabels `func (o *KubernetesNodePoolPropertiesForPost) SetLabels(v map[string]string)` SetLabels sets Labels field to given value. ### HasLabels `func (o *KubernetesNodePoolPropertiesForPost) HasLabels() bool` HasLabels returns a boolean if a field has been set. ### GetAnnotations `func (o *KubernetesNodePoolPropertiesForPost) GetAnnotations() map[string]string` GetAnnotations returns the Annotations field if non-nil, zero value otherwise. ### GetAnnotationsOk `func (o *KubernetesNodePoolPropertiesForPost) GetAnnotationsOk() (*map[string]string, bool)` GetAnnotationsOk returns a tuple with the Annotations field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAnnotations `func (o *KubernetesNodePoolPropertiesForPost) SetAnnotations(v map[string]string)` SetAnnotations sets Annotations field to given value. ### HasAnnotations `func (o *KubernetesNodePoolPropertiesForPost) HasAnnotations() bool` HasAnnotations returns a boolean if a field has been set. ### GetPublicIps `func (o *KubernetesNodePoolPropertiesForPost) GetPublicIps() []string` GetPublicIps returns the PublicIps field if non-nil, zero value otherwise. ### GetPublicIpsOk `func (o *KubernetesNodePoolPropertiesForPost) GetPublicIpsOk() (*[]string, bool)` GetPublicIpsOk returns a tuple with the PublicIps field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublicIps `func (o *KubernetesNodePoolPropertiesForPost) SetPublicIps(v []string)` SetPublicIps sets PublicIps field to given value. ### HasPublicIps `func (o *KubernetesNodePoolPropertiesForPost) HasPublicIps() bool` HasPublicIps returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodePoolPropertiesForPut.md000066400000000000000000000215241465267054300314220ustar00rootroot00000000000000# KubernetesNodePoolPropertiesForPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. | [optional] | |**NodeCount** | **int32** | The number of worker nodes of the node pool. | | |**K8sVersion** | Pointer to **string** | The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. | [optional] | |**MaintenanceWindow** | Pointer to [**KubernetesMaintenanceWindow**](KubernetesMaintenanceWindow.md) | | [optional] | |**AutoScaling** | Pointer to [**KubernetesAutoScaling**](KubernetesAutoScaling.md) | | [optional] | |**Lans** | Pointer to [**[]KubernetesNodePoolLan**](KubernetesNodePoolLan.md) | The array of existing private LANs to attach to worker nodes. | [optional] | |**Labels** | Pointer to **map[string]string** | The labels attached to the node pool. | [optional] | |**Annotations** | Pointer to **map[string]string** | The annotations attached to the node pool. | [optional] | |**PublicIps** | Pointer to **[]string** | Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. | [optional] | ## Methods ### NewKubernetesNodePoolPropertiesForPut `func NewKubernetesNodePoolPropertiesForPut(nodeCount int32, ) *KubernetesNodePoolPropertiesForPut` NewKubernetesNodePoolPropertiesForPut instantiates a new KubernetesNodePoolPropertiesForPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodePoolPropertiesForPutWithDefaults `func NewKubernetesNodePoolPropertiesForPutWithDefaults() *KubernetesNodePoolPropertiesForPut` NewKubernetesNodePoolPropertiesForPutWithDefaults instantiates a new KubernetesNodePoolPropertiesForPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *KubernetesNodePoolPropertiesForPut) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *KubernetesNodePoolPropertiesForPut) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *KubernetesNodePoolPropertiesForPut) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *KubernetesNodePoolPropertiesForPut) HasName() bool` HasName returns a boolean if a field has been set. ### GetNodeCount `func (o *KubernetesNodePoolPropertiesForPut) GetNodeCount() int32` GetNodeCount returns the NodeCount field if non-nil, zero value otherwise. ### GetNodeCountOk `func (o *KubernetesNodePoolPropertiesForPut) GetNodeCountOk() (*int32, bool)` GetNodeCountOk returns a tuple with the NodeCount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNodeCount `func (o *KubernetesNodePoolPropertiesForPut) SetNodeCount(v int32)` SetNodeCount sets NodeCount field to given value. ### GetK8sVersion `func (o *KubernetesNodePoolPropertiesForPut) GetK8sVersion() string` GetK8sVersion returns the K8sVersion field if non-nil, zero value otherwise. ### GetK8sVersionOk `func (o *KubernetesNodePoolPropertiesForPut) GetK8sVersionOk() (*string, bool)` GetK8sVersionOk returns a tuple with the K8sVersion field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sVersion `func (o *KubernetesNodePoolPropertiesForPut) SetK8sVersion(v string)` SetK8sVersion sets K8sVersion field to given value. ### HasK8sVersion `func (o *KubernetesNodePoolPropertiesForPut) HasK8sVersion() bool` HasK8sVersion returns a boolean if a field has been set. ### GetMaintenanceWindow `func (o *KubernetesNodePoolPropertiesForPut) GetMaintenanceWindow() KubernetesMaintenanceWindow` GetMaintenanceWindow returns the MaintenanceWindow field if non-nil, zero value otherwise. ### GetMaintenanceWindowOk `func (o *KubernetesNodePoolPropertiesForPut) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool)` GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaintenanceWindow `func (o *KubernetesNodePoolPropertiesForPut) SetMaintenanceWindow(v KubernetesMaintenanceWindow)` SetMaintenanceWindow sets MaintenanceWindow field to given value. ### HasMaintenanceWindow `func (o *KubernetesNodePoolPropertiesForPut) HasMaintenanceWindow() bool` HasMaintenanceWindow returns a boolean if a field has been set. ### GetAutoScaling `func (o *KubernetesNodePoolPropertiesForPut) GetAutoScaling() KubernetesAutoScaling` GetAutoScaling returns the AutoScaling field if non-nil, zero value otherwise. ### GetAutoScalingOk `func (o *KubernetesNodePoolPropertiesForPut) GetAutoScalingOk() (*KubernetesAutoScaling, bool)` GetAutoScalingOk returns a tuple with the AutoScaling field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAutoScaling `func (o *KubernetesNodePoolPropertiesForPut) SetAutoScaling(v KubernetesAutoScaling)` SetAutoScaling sets AutoScaling field to given value. ### HasAutoScaling `func (o *KubernetesNodePoolPropertiesForPut) HasAutoScaling() bool` HasAutoScaling returns a boolean if a field has been set. ### GetLans `func (o *KubernetesNodePoolPropertiesForPut) GetLans() []KubernetesNodePoolLan` GetLans returns the Lans field if non-nil, zero value otherwise. ### GetLansOk `func (o *KubernetesNodePoolPropertiesForPut) GetLansOk() (*[]KubernetesNodePoolLan, bool)` GetLansOk returns a tuple with the Lans field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLans `func (o *KubernetesNodePoolPropertiesForPut) SetLans(v []KubernetesNodePoolLan)` SetLans sets Lans field to given value. ### HasLans `func (o *KubernetesNodePoolPropertiesForPut) HasLans() bool` HasLans returns a boolean if a field has been set. ### GetLabels `func (o *KubernetesNodePoolPropertiesForPut) GetLabels() map[string]string` GetLabels returns the Labels field if non-nil, zero value otherwise. ### GetLabelsOk `func (o *KubernetesNodePoolPropertiesForPut) GetLabelsOk() (*map[string]string, bool)` GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLabels `func (o *KubernetesNodePoolPropertiesForPut) SetLabels(v map[string]string)` SetLabels sets Labels field to given value. ### HasLabels `func (o *KubernetesNodePoolPropertiesForPut) HasLabels() bool` HasLabels returns a boolean if a field has been set. ### GetAnnotations `func (o *KubernetesNodePoolPropertiesForPut) GetAnnotations() map[string]string` GetAnnotations returns the Annotations field if non-nil, zero value otherwise. ### GetAnnotationsOk `func (o *KubernetesNodePoolPropertiesForPut) GetAnnotationsOk() (*map[string]string, bool)` GetAnnotationsOk returns a tuple with the Annotations field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAnnotations `func (o *KubernetesNodePoolPropertiesForPut) SetAnnotations(v map[string]string)` SetAnnotations sets Annotations field to given value. ### HasAnnotations `func (o *KubernetesNodePoolPropertiesForPut) HasAnnotations() bool` HasAnnotations returns a boolean if a field has been set. ### GetPublicIps `func (o *KubernetesNodePoolPropertiesForPut) GetPublicIps() []string` GetPublicIps returns the PublicIps field if non-nil, zero value otherwise. ### GetPublicIpsOk `func (o *KubernetesNodePoolPropertiesForPut) GetPublicIpsOk() (*[]string, bool)` GetPublicIpsOk returns a tuple with the PublicIps field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublicIps `func (o *KubernetesNodePoolPropertiesForPut) SetPublicIps(v []string)` SetPublicIps sets PublicIps field to given value. ### HasPublicIps `func (o *KubernetesNodePoolPropertiesForPut) HasPublicIps() bool` HasPublicIps returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodePools.md000066400000000000000000000070331465267054300263670ustar00rootroot00000000000000# KubernetesNodePools ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | A unique representation of the Kubernetes node pool as a resource collection. | [optional] [readonly] | |**Type** | Pointer to **string** | The resource type within a collection. | [optional] [readonly] | |**Href** | Pointer to **string** | The URL to the collection representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]KubernetesNodePool**](KubernetesNodePool.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewKubernetesNodePools `func NewKubernetesNodePools() *KubernetesNodePools` NewKubernetesNodePools instantiates a new KubernetesNodePools object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodePoolsWithDefaults `func NewKubernetesNodePoolsWithDefaults() *KubernetesNodePools` NewKubernetesNodePoolsWithDefaults instantiates a new KubernetesNodePools object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *KubernetesNodePools) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesNodePools) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesNodePools) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *KubernetesNodePools) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *KubernetesNodePools) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *KubernetesNodePools) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *KubernetesNodePools) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *KubernetesNodePools) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *KubernetesNodePools) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *KubernetesNodePools) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *KubernetesNodePools) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *KubernetesNodePools) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *KubernetesNodePools) GetItems() []KubernetesNodePool` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *KubernetesNodePools) GetItemsOk() (*[]KubernetesNodePool, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *KubernetesNodePools) SetItems(v []KubernetesNodePool)` SetItems sets Items field to given value. ### HasItems `func (o *KubernetesNodePools) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodeProperties.md000066400000000000000000000072521465267054300274320ustar00rootroot00000000000000# KubernetesNodeProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The Kubernetes node name. | | |**PublicIP** | Pointer to **string** | The public IP associated with the node. | [optional] | |**PrivateIP** | Pointer to **string** | The private IP associated with the node. | [optional] | |**K8sVersion** | **string** | The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. | | ## Methods ### NewKubernetesNodeProperties `func NewKubernetesNodeProperties(name string, k8sVersion string, ) *KubernetesNodeProperties` NewKubernetesNodeProperties instantiates a new KubernetesNodeProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodePropertiesWithDefaults `func NewKubernetesNodePropertiesWithDefaults() *KubernetesNodeProperties` NewKubernetesNodePropertiesWithDefaults instantiates a new KubernetesNodeProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *KubernetesNodeProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *KubernetesNodeProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *KubernetesNodeProperties) SetName(v string)` SetName sets Name field to given value. ### GetPublicIP `func (o *KubernetesNodeProperties) GetPublicIP() string` GetPublicIP returns the PublicIP field if non-nil, zero value otherwise. ### GetPublicIPOk `func (o *KubernetesNodeProperties) GetPublicIPOk() (*string, bool)` GetPublicIPOk returns a tuple with the PublicIP field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublicIP `func (o *KubernetesNodeProperties) SetPublicIP(v string)` SetPublicIP sets PublicIP field to given value. ### HasPublicIP `func (o *KubernetesNodeProperties) HasPublicIP() bool` HasPublicIP returns a boolean if a field has been set. ### GetPrivateIP `func (o *KubernetesNodeProperties) GetPrivateIP() string` GetPrivateIP returns the PrivateIP field if non-nil, zero value otherwise. ### GetPrivateIPOk `func (o *KubernetesNodeProperties) GetPrivateIPOk() (*string, bool)` GetPrivateIPOk returns a tuple with the PrivateIP field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPrivateIP `func (o *KubernetesNodeProperties) SetPrivateIP(v string)` SetPrivateIP sets PrivateIP field to given value. ### HasPrivateIP `func (o *KubernetesNodeProperties) HasPrivateIP() bool` HasPrivateIP returns a boolean if a field has been set. ### GetK8sVersion `func (o *KubernetesNodeProperties) GetK8sVersion() string` GetK8sVersion returns the K8sVersion field if non-nil, zero value otherwise. ### GetK8sVersionOk `func (o *KubernetesNodeProperties) GetK8sVersionOk() (*string, bool)` GetK8sVersionOk returns a tuple with the K8sVersion field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sVersion `func (o *KubernetesNodeProperties) SetK8sVersion(v string)` SetK8sVersion sets K8sVersion field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/KubernetesNodes.md000066400000000000000000000066331465267054300255420ustar00rootroot00000000000000# KubernetesNodes ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | A unique representation of the Kubernetes node pool as a resource collection. | [optional] [readonly] | |**Type** | Pointer to **string** | The resource type within a collection. | [optional] [readonly] | |**Href** | Pointer to **string** | The URL to the collection representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]KubernetesNode**](KubernetesNode.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewKubernetesNodes `func NewKubernetesNodes() *KubernetesNodes` NewKubernetesNodes instantiates a new KubernetesNodes object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewKubernetesNodesWithDefaults `func NewKubernetesNodesWithDefaults() *KubernetesNodes` NewKubernetesNodesWithDefaults instantiates a new KubernetesNodes object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *KubernetesNodes) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *KubernetesNodes) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *KubernetesNodes) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *KubernetesNodes) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *KubernetesNodes) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *KubernetesNodes) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *KubernetesNodes) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *KubernetesNodes) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *KubernetesNodes) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *KubernetesNodes) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *KubernetesNodes) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *KubernetesNodes) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *KubernetesNodes) GetItems() []KubernetesNode` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *KubernetesNodes) GetItemsOk() (*[]KubernetesNode, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *KubernetesNodes) SetItems(v []KubernetesNode)` SetItems sets Items field to given value. ### HasItems `func (o *KubernetesNodes) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Label.md000066400000000000000000000072711465267054300234600ustar00rootroot00000000000000# Label ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | Label is identified using standard URN. | [optional] [readonly] | |**Type** | Pointer to **string** | The type of object that has been created. | [optional] [readonly] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**NoStateMetaData**](NoStateMetaData.md) | | [optional] | |**Properties** | [**LabelProperties**](LabelProperties.md) | | | ## Methods ### NewLabel `func NewLabel(properties LabelProperties, ) *Label` NewLabel instantiates a new Label object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLabelWithDefaults `func NewLabelWithDefaults() *Label` NewLabelWithDefaults instantiates a new Label object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Label) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Label) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Label) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Label) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Label) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Label) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Label) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *Label) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Label) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Label) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Label) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Label) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Label) GetMetadata() NoStateMetaData` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Label) GetMetadataOk() (*NoStateMetaData, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Label) SetMetadata(v NoStateMetaData)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Label) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Label) GetProperties() LabelProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Label) GetPropertiesOk() (*LabelProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Label) SetProperties(v LabelProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/LabelProperties.md000066400000000000000000000103171465267054300255300ustar00rootroot00000000000000# LabelProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Key** | Pointer to **string** | A label key | [optional] | |**Value** | Pointer to **string** | A label value | [optional] | |**ResourceId** | Pointer to **string** | The ID of the resource. | [optional] | |**ResourceType** | Pointer to **string** | The type of the resource on which the label is applied. | [optional] | |**ResourceHref** | Pointer to **string** | URL to the Resource (absolute path) on which the label is applied. | [optional] | ## Methods ### NewLabelProperties `func NewLabelProperties() *LabelProperties` NewLabelProperties instantiates a new LabelProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLabelPropertiesWithDefaults `func NewLabelPropertiesWithDefaults() *LabelProperties` NewLabelPropertiesWithDefaults instantiates a new LabelProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetKey `func (o *LabelProperties) GetKey() string` GetKey returns the Key field if non-nil, zero value otherwise. ### GetKeyOk `func (o *LabelProperties) GetKeyOk() (*string, bool)` GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetKey `func (o *LabelProperties) SetKey(v string)` SetKey sets Key field to given value. ### HasKey `func (o *LabelProperties) HasKey() bool` HasKey returns a boolean if a field has been set. ### GetValue `func (o *LabelProperties) GetValue() string` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk `func (o *LabelProperties) GetValueOk() (*string, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue `func (o *LabelProperties) SetValue(v string)` SetValue sets Value field to given value. ### HasValue `func (o *LabelProperties) HasValue() bool` HasValue returns a boolean if a field has been set. ### GetResourceId `func (o *LabelProperties) GetResourceId() string` GetResourceId returns the ResourceId field if non-nil, zero value otherwise. ### GetResourceIdOk `func (o *LabelProperties) GetResourceIdOk() (*string, bool)` GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetResourceId `func (o *LabelProperties) SetResourceId(v string)` SetResourceId sets ResourceId field to given value. ### HasResourceId `func (o *LabelProperties) HasResourceId() bool` HasResourceId returns a boolean if a field has been set. ### GetResourceType `func (o *LabelProperties) GetResourceType() string` GetResourceType returns the ResourceType field if non-nil, zero value otherwise. ### GetResourceTypeOk `func (o *LabelProperties) GetResourceTypeOk() (*string, bool)` GetResourceTypeOk returns a tuple with the ResourceType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetResourceType `func (o *LabelProperties) SetResourceType(v string)` SetResourceType sets ResourceType field to given value. ### HasResourceType `func (o *LabelProperties) HasResourceType() bool` HasResourceType returns a boolean if a field has been set. ### GetResourceHref `func (o *LabelProperties) GetResourceHref() string` GetResourceHref returns the ResourceHref field if non-nil, zero value otherwise. ### GetResourceHrefOk `func (o *LabelProperties) GetResourceHrefOk() (*string, bool)` GetResourceHrefOk returns a tuple with the ResourceHref field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetResourceHref `func (o *LabelProperties) SetResourceHref(v string)` SetResourceHref sets ResourceHref field to given value. ### HasResourceHref `func (o *LabelProperties) HasResourceHref() bool` HasResourceHref returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/LabelResource.md000066400000000000000000000077441465267054300251750ustar00rootroot00000000000000# LabelResource ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | Label on a resource is identified using label key. | [optional] [readonly] | |**Type** | Pointer to **string** | The type of object that has been created. | [optional] [readonly] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**NoStateMetaData**](NoStateMetaData.md) | | [optional] | |**Properties** | [**LabelResourceProperties**](LabelResourceProperties.md) | | | ## Methods ### NewLabelResource `func NewLabelResource(properties LabelResourceProperties, ) *LabelResource` NewLabelResource instantiates a new LabelResource object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLabelResourceWithDefaults `func NewLabelResourceWithDefaults() *LabelResource` NewLabelResourceWithDefaults instantiates a new LabelResource object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *LabelResource) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *LabelResource) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *LabelResource) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *LabelResource) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *LabelResource) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *LabelResource) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *LabelResource) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *LabelResource) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *LabelResource) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *LabelResource) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *LabelResource) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *LabelResource) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *LabelResource) GetMetadata() NoStateMetaData` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *LabelResource) GetMetadataOk() (*NoStateMetaData, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *LabelResource) SetMetadata(v NoStateMetaData)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *LabelResource) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *LabelResource) GetProperties() LabelResourceProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *LabelResource) GetPropertiesOk() (*LabelResourceProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *LabelResource) SetProperties(v LabelResourceProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/LabelResourceProperties.md000066400000000000000000000042011465267054300272330ustar00rootroot00000000000000# LabelResourceProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Key** | Pointer to **string** | A label key | [optional] | |**Value** | Pointer to **string** | A label value | [optional] | ## Methods ### NewLabelResourceProperties `func NewLabelResourceProperties() *LabelResourceProperties` NewLabelResourceProperties instantiates a new LabelResourceProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLabelResourcePropertiesWithDefaults `func NewLabelResourcePropertiesWithDefaults() *LabelResourceProperties` NewLabelResourcePropertiesWithDefaults instantiates a new LabelResourceProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetKey `func (o *LabelResourceProperties) GetKey() string` GetKey returns the Key field if non-nil, zero value otherwise. ### GetKeyOk `func (o *LabelResourceProperties) GetKeyOk() (*string, bool)` GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetKey `func (o *LabelResourceProperties) SetKey(v string)` SetKey sets Key field to given value. ### HasKey `func (o *LabelResourceProperties) HasKey() bool` HasKey returns a boolean if a field has been set. ### GetValue `func (o *LabelResourceProperties) GetValue() string` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk `func (o *LabelResourceProperties) GetValueOk() (*string, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue `func (o *LabelResourceProperties) SetValue(v string)` SetValue sets Value field to given value. ### HasValue `func (o *LabelResourceProperties) HasValue() bool` HasValue returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/LabelResources.md000066400000000000000000000124501465267054300253460ustar00rootroot00000000000000# LabelResources ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | A unique representation of the label as a resource collection. | [optional] [readonly] | |**Type** | Pointer to **string** | The type of resource within a collection. | [optional] [readonly] | |**Href** | Pointer to **string** | URL to the collection representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]LabelResource**](LabelResource.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewLabelResources `func NewLabelResources() *LabelResources` NewLabelResources instantiates a new LabelResources object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLabelResourcesWithDefaults `func NewLabelResourcesWithDefaults() *LabelResources` NewLabelResourcesWithDefaults instantiates a new LabelResources object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *LabelResources) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *LabelResources) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *LabelResources) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *LabelResources) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *LabelResources) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *LabelResources) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *LabelResources) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *LabelResources) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *LabelResources) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *LabelResources) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *LabelResources) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *LabelResources) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *LabelResources) GetItems() []LabelResource` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *LabelResources) GetItemsOk() (*[]LabelResource, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *LabelResources) SetItems(v []LabelResource)` SetItems sets Items field to given value. ### HasItems `func (o *LabelResources) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *LabelResources) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *LabelResources) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *LabelResources) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *LabelResources) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *LabelResources) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *LabelResources) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *LabelResources) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *LabelResources) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *LabelResources) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *LabelResources) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *LabelResources) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *LabelResources) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Labels.md000066400000000000000000000061531465267054300236410ustar00rootroot00000000000000# Labels ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | A unique representation of the label as a resource collection. | [optional] [readonly] | |**Type** | Pointer to **string** | The type of resource within a collection. | [optional] [readonly] | |**Href** | Pointer to **string** | URL to the collection representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Label**](Label.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewLabels `func NewLabels() *Labels` NewLabels instantiates a new Labels object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLabelsWithDefaults `func NewLabelsWithDefaults() *Labels` NewLabelsWithDefaults instantiates a new Labels object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Labels) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Labels) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Labels) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Labels) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Labels) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Labels) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Labels) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *Labels) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Labels) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Labels) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Labels) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Labels) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Labels) GetItems() []Label` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Labels) GetItemsOk() (*[]Label, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Labels) SetItems(v []Label)` SetItems sets Items field to given value. ### HasItems `func (o *Labels) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Lan.md000066400000000000000000000104411465267054300231440ustar00rootroot00000000000000# Lan ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**LanProperties**](LanProperties.md) | | | |**Entities** | Pointer to [**LanEntities**](LanEntities.md) | | [optional] | ## Methods ### NewLan `func NewLan(properties LanProperties, ) *Lan` NewLan instantiates a new Lan object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLanWithDefaults `func NewLanWithDefaults() *Lan` NewLanWithDefaults instantiates a new Lan object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Lan) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Lan) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Lan) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Lan) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Lan) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Lan) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Lan) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Lan) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Lan) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Lan) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Lan) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Lan) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Lan) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Lan) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Lan) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Lan) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Lan) GetProperties() LanProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Lan) GetPropertiesOk() (*LanProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Lan) SetProperties(v LanProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *Lan) GetEntities() LanEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *Lan) GetEntitiesOk() (*LanEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *Lan) SetEntities(v LanEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *Lan) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/LanEntities.md000066400000000000000000000025251465267054300246550ustar00rootroot00000000000000# LanEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Nics** | Pointer to [**LanNics**](LanNics.md) | | [optional] | ## Methods ### NewLanEntities `func NewLanEntities() *LanEntities` NewLanEntities instantiates a new LanEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLanEntitiesWithDefaults `func NewLanEntitiesWithDefaults() *LanEntities` NewLanEntitiesWithDefaults instantiates a new LanEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetNics `func (o *LanEntities) GetNics() LanNics` GetNics returns the Nics field if non-nil, zero value otherwise. ### GetNicsOk `func (o *LanEntities) GetNicsOk() (*LanNics, bool)` GetNicsOk returns a tuple with the Nics field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNics `func (o *LanEntities) SetNics(v LanNics)` SetNics sets Nics field to given value. ### HasNics `func (o *LanEntities) HasNics() bool` HasNics returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/LanNics.md000066400000000000000000000117001465267054300237600ustar00rootroot00000000000000# LanNics ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Nic**](Nic.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewLanNics `func NewLanNics() *LanNics` NewLanNics instantiates a new LanNics object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLanNicsWithDefaults `func NewLanNicsWithDefaults() *LanNics` NewLanNicsWithDefaults instantiates a new LanNics object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *LanNics) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *LanNics) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *LanNics) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *LanNics) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *LanNics) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *LanNics) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *LanNics) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *LanNics) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *LanNics) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *LanNics) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *LanNics) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *LanNics) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *LanNics) GetItems() []Nic` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *LanNics) GetItemsOk() (*[]Nic, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *LanNics) SetItems(v []Nic)` SetItems sets Items field to given value. ### HasItems `func (o *LanNics) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *LanNics) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *LanNics) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *LanNics) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *LanNics) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *LanNics) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *LanNics) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *LanNics) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *LanNics) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *LanNics) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *LanNics) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *LanNics) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *LanNics) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/LanProperties.md000066400000000000000000000127161465267054300252300ustar00rootroot00000000000000# LanProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**IpFailover** | Pointer to [**[]IPFailover**](IPFailover.md) | IP failover configurations for lan | [optional] | |**Ipv6CidrBlock** | Pointer to **NullableString** | For a GET request, this value is either 'null' or contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled. For POST/PUT/PATCH requests, 'AUTO' will result in enabling this LAN for IPv6 and automatically assign a /64 IPv6 CIDR block to this LAN and /80 IPv6 CIDR blocks to the NICs and one /128 IPv6 address to each connected NIC. If you choose the IPv6 CIDR block for the LAN on your own, then you must provide a /64 block, which is inside the IPv6 CIDR block of the virtual datacenter and unique inside all LANs from this virtual datacenter. If you enable IPv6 on a LAN with NICs, those NICs will get a /80 IPv6 CIDR block and one IPv6 address assigned to each automatically, unless you specify them explicitly on the LAN and on the NICs. A virtual data center is limited to a maximum of 256 IPv6-enabled LANs. | [optional] | |**Pcc** | Pointer to **string** | The unique identifier of the Cross Connect the LAN is connected to, if any. It needs to be ensured that IP addresses of the NICs of all LANs connected to a given Cross Connect is not duplicated and belongs to the same subnet range. | [optional] | |**Public** | Pointer to **bool** | Indicates if the LAN is connected to the internet or not. | [optional] | ## Methods ### NewLanProperties `func NewLanProperties() *LanProperties` NewLanProperties instantiates a new LanProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLanPropertiesWithDefaults `func NewLanPropertiesWithDefaults() *LanProperties` NewLanPropertiesWithDefaults instantiates a new LanProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *LanProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *LanProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *LanProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *LanProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetIpFailover `func (o *LanProperties) GetIpFailover() []IPFailover` GetIpFailover returns the IpFailover field if non-nil, zero value otherwise. ### GetIpFailoverOk `func (o *LanProperties) GetIpFailoverOk() (*[]IPFailover, bool)` GetIpFailoverOk returns a tuple with the IpFailover field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIpFailover `func (o *LanProperties) SetIpFailover(v []IPFailover)` SetIpFailover sets IpFailover field to given value. ### HasIpFailover `func (o *LanProperties) HasIpFailover() bool` HasIpFailover returns a boolean if a field has been set. ### GetIpv6CidrBlock `func (o *LanProperties) GetIpv6CidrBlock() string` GetIpv6CidrBlock returns the Ipv6CidrBlock field if non-nil, zero value otherwise. ### GetIpv6CidrBlockOk `func (o *LanProperties) GetIpv6CidrBlockOk() (*string, bool)` GetIpv6CidrBlockOk returns a tuple with the Ipv6CidrBlock field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIpv6CidrBlock `func (o *LanProperties) SetIpv6CidrBlock(v string)` SetIpv6CidrBlock sets Ipv6CidrBlock field to given value. ### HasIpv6CidrBlock `func (o *LanProperties) HasIpv6CidrBlock() bool` HasIpv6CidrBlock returns a boolean if a field has been set. ### SetIpv6CidrBlockNil `func (o *LanProperties) SetIpv6CidrBlockNil()` SetIpv6CidrBlockNil sets the value for Ipv6CidrBlock to be marshalled as an explicit nil Alternatively Ipv6CidrBlock can be set directly to the address `&Nilstring`, which is a sentinel value that is checked when marshalling. ### UnsetIpv6CidrBlock `func (o *LanProperties) UnsetIpv6CidrBlock()` ### GetPcc `func (o *LanProperties) GetPcc() string` GetPcc returns the Pcc field if non-nil, zero value otherwise. ### GetPccOk `func (o *LanProperties) GetPccOk() (*string, bool)` GetPccOk returns a tuple with the Pcc field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPcc `func (o *LanProperties) SetPcc(v string)` SetPcc sets Pcc field to given value. ### HasPcc `func (o *LanProperties) HasPcc() bool` HasPcc returns a boolean if a field has been set. ### GetPublic `func (o *LanProperties) GetPublic() bool` GetPublic returns the Public field if non-nil, zero value otherwise. ### GetPublicOk `func (o *LanProperties) GetPublicOk() (*bool, bool)` GetPublicOk returns a tuple with the Public field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublic `func (o *LanProperties) SetPublic(v bool)` SetPublic sets Public field to given value. ### HasPublic `func (o *LanProperties) HasPublic() bool` HasPublic returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Lans.md000066400000000000000000000115131465267054300233300ustar00rootroot00000000000000# Lans ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Lan**](Lan.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewLans `func NewLans() *Lans` NewLans instantiates a new Lans object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLansWithDefaults `func NewLansWithDefaults() *Lans` NewLansWithDefaults instantiates a new Lans object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Lans) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Lans) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Lans) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Lans) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Lans) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Lans) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Lans) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Lans) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Lans) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Lans) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Lans) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Lans) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Lans) GetItems() []Lan` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Lans) GetItemsOk() (*[]Lan, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Lans) SetItems(v []Lan)` SetItems sets Items field to given value. ### HasItems `func (o *Lans) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *Lans) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *Lans) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *Lans) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *Lans) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *Lans) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *Lans) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *Lans) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *Lans) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *Lans) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *Lans) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *Lans) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *Lans) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Loadbalancer.md000066400000000000000000000112661465267054300250070ustar00rootroot00000000000000# Loadbalancer ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**LoadbalancerProperties**](LoadbalancerProperties.md) | | | |**Entities** | Pointer to [**LoadbalancerEntities**](LoadbalancerEntities.md) | | [optional] | ## Methods ### NewLoadbalancer `func NewLoadbalancer(properties LoadbalancerProperties, ) *Loadbalancer` 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 ### NewLoadbalancerWithDefaults `func NewLoadbalancerWithDefaults() *Loadbalancer` NewLoadbalancerWithDefaults instantiates a new Loadbalancer object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Loadbalancer) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Loadbalancer) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Loadbalancer) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Loadbalancer) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Loadbalancer) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Loadbalancer) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Loadbalancer) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Loadbalancer) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Loadbalancer) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Loadbalancer) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Loadbalancer) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Loadbalancer) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Loadbalancer) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Loadbalancer) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Loadbalancer) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Loadbalancer) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Loadbalancer) GetProperties() LoadbalancerProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Loadbalancer) GetPropertiesOk() (*LoadbalancerProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Loadbalancer) SetProperties(v LoadbalancerProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *Loadbalancer) GetEntities() LoadbalancerEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *Loadbalancer) GetEntitiesOk() (*LoadbalancerEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *Loadbalancer) SetEntities(v LoadbalancerEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *Loadbalancer) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/LoadbalancerEntities.md000066400000000000000000000031651465267054300265130ustar00rootroot00000000000000# LoadbalancerEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Balancednics** | Pointer to [**BalancedNics**](BalancedNics.md) | | [optional] | ## Methods ### NewLoadbalancerEntities `func NewLoadbalancerEntities() *LoadbalancerEntities` NewLoadbalancerEntities instantiates a new LoadbalancerEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLoadbalancerEntitiesWithDefaults `func NewLoadbalancerEntitiesWithDefaults() *LoadbalancerEntities` NewLoadbalancerEntitiesWithDefaults instantiates a new LoadbalancerEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetBalancednics `func (o *LoadbalancerEntities) GetBalancednics() BalancedNics` GetBalancednics returns the Balancednics field if non-nil, zero value otherwise. ### GetBalancednicsOk `func (o *LoadbalancerEntities) GetBalancednicsOk() (*BalancedNics, bool)` GetBalancednicsOk returns a tuple with the Balancednics field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBalancednics `func (o *LoadbalancerEntities) SetBalancednics(v BalancedNics)` SetBalancednics sets Balancednics field to given value. ### HasBalancednics `func (o *LoadbalancerEntities) HasBalancednics() bool` HasBalancednics returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/LoadbalancerProperties.md000066400000000000000000000062571465267054300270700ustar00rootroot00000000000000# LoadbalancerProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**Ip** | Pointer to **NullableString** | IPv4 address of the loadbalancer. All attached NICs will inherit this IP. Leaving value null will assign IP automatically. | [optional] | |**Dhcp** | Pointer to **bool** | Indicates if the loadbalancer will reserve an IP using DHCP. | [optional] | ## Methods ### NewLoadbalancerProperties `func NewLoadbalancerProperties() *LoadbalancerProperties` NewLoadbalancerProperties instantiates a new LoadbalancerProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLoadbalancerPropertiesWithDefaults `func NewLoadbalancerPropertiesWithDefaults() *LoadbalancerProperties` NewLoadbalancerPropertiesWithDefaults instantiates a new LoadbalancerProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *LoadbalancerProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *LoadbalancerProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *LoadbalancerProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *LoadbalancerProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetIp `func (o *LoadbalancerProperties) GetIp() string` GetIp returns the Ip field if non-nil, zero value otherwise. ### GetIpOk `func (o *LoadbalancerProperties) GetIpOk() (*string, bool)` GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIp `func (o *LoadbalancerProperties) SetIp(v string)` SetIp sets Ip field to given value. ### HasIp `func (o *LoadbalancerProperties) HasIp() bool` HasIp returns a boolean if a field has been set. ### SetIpNil `func (o *LoadbalancerProperties) SetIpNil()` SetIpNil sets the value for Ip to be marshalled as an explicit nil Alternatively Ip can be set directly to the address `&Nilstring`, which is a sentinel value that is checked when marshalling. ### UnsetIp `func (o *LoadbalancerProperties) UnsetIp()` ### GetDhcp `func (o *LoadbalancerProperties) GetDhcp() bool` GetDhcp returns the Dhcp field if non-nil, zero value otherwise. ### GetDhcpOk `func (o *LoadbalancerProperties) GetDhcpOk() (*bool, bool)` GetDhcpOk returns a tuple with the Dhcp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDhcp `func (o *LoadbalancerProperties) SetDhcp(v bool)` SetDhcp sets Dhcp field to given value. ### HasDhcp `func (o *LoadbalancerProperties) HasDhcp() bool` HasDhcp returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Loadbalancers.md000066400000000000000000000123271465267054300251710ustar00rootroot00000000000000# Loadbalancers ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Loadbalancer**](Loadbalancer.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewLoadbalancers `func NewLoadbalancers() *Loadbalancers` NewLoadbalancers instantiates a new Loadbalancers object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLoadbalancersWithDefaults `func NewLoadbalancersWithDefaults() *Loadbalancers` NewLoadbalancersWithDefaults instantiates a new Loadbalancers object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Loadbalancers) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Loadbalancers) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Loadbalancers) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Loadbalancers) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Loadbalancers) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Loadbalancers) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Loadbalancers) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Loadbalancers) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Loadbalancers) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Loadbalancers) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Loadbalancers) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Loadbalancers) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Loadbalancers) GetItems() []Loadbalancer` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Loadbalancers) GetItemsOk() (*[]Loadbalancer, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Loadbalancers) SetItems(v []Loadbalancer)` SetItems sets Items field to given value. ### HasItems `func (o *Loadbalancers) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *Loadbalancers) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *Loadbalancers) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *Loadbalancers) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *Loadbalancers) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *Loadbalancers) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *Loadbalancers) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *Loadbalancers) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *Loadbalancers) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *Loadbalancers) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *Loadbalancers) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *Loadbalancers) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *Loadbalancers) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Location.md000066400000000000000000000075151465267054300242120ustar00rootroot00000000000000# Location ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**LocationProperties**](LocationProperties.md) | | | ## Methods ### NewLocation `func NewLocation(properties LocationProperties, ) *Location` NewLocation instantiates a new Location object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLocationWithDefaults `func NewLocationWithDefaults() *Location` NewLocationWithDefaults instantiates a new Location object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Location) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Location) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Location) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Location) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Location) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Location) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Location) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Location) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Location) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Location) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Location) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Location) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Location) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Location) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Location) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Location) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Location) GetProperties() LocationProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Location) GetPropertiesOk() (*LocationProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Location) SetProperties(v LocationProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/LocationProperties.md000066400000000000000000000076321465267054300262670ustar00rootroot00000000000000# LocationProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The location name. | [optional] | |**Features** | Pointer to **[]string** | A list of available features in the location. | [optional] [readonly] | |**ImageAliases** | Pointer to **[]string** | A list of image aliases available in the location. | [optional] [readonly] | |**CpuArchitecture** | Pointer to [**[]CpuArchitectureProperties**](CpuArchitectureProperties.md) | A list of available CPU types and related resources available in the location. | [optional] [readonly] | ## Methods ### NewLocationProperties `func NewLocationProperties() *LocationProperties` NewLocationProperties instantiates a new LocationProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLocationPropertiesWithDefaults `func NewLocationPropertiesWithDefaults() *LocationProperties` NewLocationPropertiesWithDefaults instantiates a new LocationProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *LocationProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *LocationProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *LocationProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *LocationProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetFeatures `func (o *LocationProperties) GetFeatures() []string` GetFeatures returns the Features field if non-nil, zero value otherwise. ### GetFeaturesOk `func (o *LocationProperties) GetFeaturesOk() (*[]string, bool)` GetFeaturesOk returns a tuple with the Features field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFeatures `func (o *LocationProperties) SetFeatures(v []string)` SetFeatures sets Features field to given value. ### HasFeatures `func (o *LocationProperties) HasFeatures() bool` HasFeatures returns a boolean if a field has been set. ### GetImageAliases `func (o *LocationProperties) GetImageAliases() []string` GetImageAliases returns the ImageAliases field if non-nil, zero value otherwise. ### GetImageAliasesOk `func (o *LocationProperties) GetImageAliasesOk() (*[]string, bool)` GetImageAliasesOk returns a tuple with the ImageAliases field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetImageAliases `func (o *LocationProperties) SetImageAliases(v []string)` SetImageAliases sets ImageAliases field to given value. ### HasImageAliases `func (o *LocationProperties) HasImageAliases() bool` HasImageAliases returns a boolean if a field has been set. ### GetCpuArchitecture `func (o *LocationProperties) GetCpuArchitecture() []CpuArchitectureProperties` GetCpuArchitecture returns the CpuArchitecture field if non-nil, zero value otherwise. ### GetCpuArchitectureOk `func (o *LocationProperties) GetCpuArchitectureOk() (*[]CpuArchitectureProperties, bool)` GetCpuArchitectureOk returns a tuple with the CpuArchitecture field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuArchitecture `func (o *LocationProperties) SetCpuArchitecture(v []CpuArchitectureProperties)` SetCpuArchitecture sets CpuArchitecture field to given value. ### HasCpuArchitecture `func (o *LocationProperties) HasCpuArchitecture() bool` HasCpuArchitecture returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Locations.md000066400000000000000000000062461465267054300243750ustar00rootroot00000000000000# Locations ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Location**](Location.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewLocations `func NewLocations() *Locations` NewLocations instantiates a new Locations object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewLocationsWithDefaults `func NewLocationsWithDefaults() *Locations` NewLocationsWithDefaults instantiates a new Locations object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Locations) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Locations) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Locations) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Locations) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Locations) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Locations) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Locations) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Locations) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Locations) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Locations) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Locations) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Locations) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Locations) GetItems() []Location` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Locations) GetItemsOk() (*[]Location, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Locations) SetItems(v []Location)` SetItems sets Items field to given value. ### HasItems `func (o *Locations) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGateway.md000066400000000000000000000111341465267054300244760ustar00rootroot00000000000000# NatGateway ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**NatGatewayProperties**](NatGatewayProperties.md) | | | |**Entities** | Pointer to [**NatGatewayEntities**](NatGatewayEntities.md) | | [optional] | ## Methods ### NewNatGateway `func NewNatGateway(properties NatGatewayProperties, ) *NatGateway` NewNatGateway instantiates a new NatGateway object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNatGatewayWithDefaults `func NewNatGatewayWithDefaults() *NatGateway` NewNatGatewayWithDefaults instantiates a new NatGateway object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NatGateway) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NatGateway) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NatGateway) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NatGateway) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NatGateway) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NatGateway) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NatGateway) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NatGateway) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NatGateway) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NatGateway) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NatGateway) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NatGateway) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *NatGateway) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *NatGateway) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *NatGateway) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *NatGateway) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *NatGateway) GetProperties() NatGatewayProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *NatGateway) GetPropertiesOk() (*NatGatewayProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *NatGateway) SetProperties(v NatGatewayProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *NatGateway) GetEntities() NatGatewayEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *NatGateway) GetEntitiesOk() (*NatGatewayEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *NatGateway) SetEntities(v NatGatewayEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *NatGateway) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGatewayEntities.md000066400000000000000000000042531465267054300262070ustar00rootroot00000000000000# NatGatewayEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Rules** | Pointer to [**NatGatewayRules**](NatGatewayRules.md) | | [optional] | |**Flowlogs** | Pointer to [**FlowLogs**](FlowLogs.md) | | [optional] | ## Methods ### NewNatGatewayEntities `func NewNatGatewayEntities() *NatGatewayEntities` NewNatGatewayEntities instantiates a new NatGatewayEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNatGatewayEntitiesWithDefaults `func NewNatGatewayEntitiesWithDefaults() *NatGatewayEntities` NewNatGatewayEntitiesWithDefaults instantiates a new NatGatewayEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetRules `func (o *NatGatewayEntities) GetRules() NatGatewayRules` GetRules returns the Rules field if non-nil, zero value otherwise. ### GetRulesOk `func (o *NatGatewayEntities) GetRulesOk() (*NatGatewayRules, bool)` GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRules `func (o *NatGatewayEntities) SetRules(v NatGatewayRules)` SetRules sets Rules field to given value. ### HasRules `func (o *NatGatewayEntities) HasRules() bool` HasRules returns a boolean if a field has been set. ### GetFlowlogs `func (o *NatGatewayEntities) GetFlowlogs() FlowLogs` GetFlowlogs returns the Flowlogs field if non-nil, zero value otherwise. ### GetFlowlogsOk `func (o *NatGatewayEntities) GetFlowlogsOk() (*FlowLogs, bool)` GetFlowlogsOk returns a tuple with the Flowlogs field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFlowlogs `func (o *NatGatewayEntities) SetFlowlogs(v FlowLogs)` SetFlowlogs sets Flowlogs field to given value. ### HasFlowlogs `func (o *NatGatewayEntities) HasFlowlogs() bool` HasFlowlogs returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGatewayLanProperties.md000066400000000000000000000043741465267054300272160ustar00rootroot00000000000000# NatGatewayLanProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | **int32** | Id for the LAN connected to the NAT Gateway | | |**GatewayIps** | Pointer to **[]string** | Collection of gateway IP addresses of the NAT Gateway. Will be auto-generated if not provided. Should ideally be an IP belonging to the same subnet as the LAN | [optional] | ## Methods ### NewNatGatewayLanProperties `func NewNatGatewayLanProperties(id int32, ) *NatGatewayLanProperties` NewNatGatewayLanProperties instantiates a new NatGatewayLanProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNatGatewayLanPropertiesWithDefaults `func NewNatGatewayLanPropertiesWithDefaults() *NatGatewayLanProperties` NewNatGatewayLanPropertiesWithDefaults instantiates a new NatGatewayLanProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NatGatewayLanProperties) GetId() int32` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NatGatewayLanProperties) GetIdOk() (*int32, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NatGatewayLanProperties) SetId(v int32)` SetId sets Id field to given value. ### GetGatewayIps `func (o *NatGatewayLanProperties) GetGatewayIps() []string` GetGatewayIps returns the GatewayIps field if non-nil, zero value otherwise. ### GetGatewayIpsOk `func (o *NatGatewayLanProperties) GetGatewayIpsOk() (*[]string, bool)` GetGatewayIpsOk returns a tuple with the GatewayIps field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGatewayIps `func (o *NatGatewayLanProperties) SetGatewayIps(v []string)` SetGatewayIps sets GatewayIps field to given value. ### HasGatewayIps `func (o *NatGatewayLanProperties) HasGatewayIps() bool` HasGatewayIps returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGatewayProperties.md000066400000000000000000000056001465267054300265540ustar00rootroot00000000000000# NatGatewayProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | Name of the NAT Gateway. | | |**PublicIps** | **[]string** | Collection of public IP addresses of the NAT Gateway. Should be customer reserved IP addresses in that location. | | |**Lans** | Pointer to [**[]NatGatewayLanProperties**](NatGatewayLanProperties.md) | Collection of LANs connected to the NAT Gateway. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. | [optional] | ## Methods ### NewNatGatewayProperties `func NewNatGatewayProperties(name string, publicIps []string, ) *NatGatewayProperties` NewNatGatewayProperties instantiates a new NatGatewayProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNatGatewayPropertiesWithDefaults `func NewNatGatewayPropertiesWithDefaults() *NatGatewayProperties` NewNatGatewayPropertiesWithDefaults instantiates a new NatGatewayProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *NatGatewayProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *NatGatewayProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *NatGatewayProperties) SetName(v string)` SetName sets Name field to given value. ### GetPublicIps `func (o *NatGatewayProperties) GetPublicIps() []string` GetPublicIps returns the PublicIps field if non-nil, zero value otherwise. ### GetPublicIpsOk `func (o *NatGatewayProperties) GetPublicIpsOk() (*[]string, bool)` GetPublicIpsOk returns a tuple with the PublicIps field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublicIps `func (o *NatGatewayProperties) SetPublicIps(v []string)` SetPublicIps sets PublicIps field to given value. ### GetLans `func (o *NatGatewayProperties) GetLans() []NatGatewayLanProperties` GetLans returns the Lans field if non-nil, zero value otherwise. ### GetLansOk `func (o *NatGatewayProperties) GetLansOk() (*[]NatGatewayLanProperties, bool)` GetLansOk returns a tuple with the Lans field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLans `func (o *NatGatewayProperties) SetLans(v []NatGatewayLanProperties)` SetLans sets Lans field to given value. ### HasLans `func (o *NatGatewayProperties) HasLans() bool` HasLans returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGatewayPut.md000066400000000000000000000063711465267054300251760ustar00rootroot00000000000000# NatGatewayPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**NatGatewayProperties**](NatGatewayProperties.md) | | | ## Methods ### NewNatGatewayPut `func NewNatGatewayPut(properties NatGatewayProperties, ) *NatGatewayPut` NewNatGatewayPut instantiates a new NatGatewayPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNatGatewayPutWithDefaults `func NewNatGatewayPutWithDefaults() *NatGatewayPut` NewNatGatewayPutWithDefaults instantiates a new NatGatewayPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NatGatewayPut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NatGatewayPut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NatGatewayPut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NatGatewayPut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NatGatewayPut) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NatGatewayPut) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NatGatewayPut) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NatGatewayPut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NatGatewayPut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NatGatewayPut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NatGatewayPut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NatGatewayPut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *NatGatewayPut) GetProperties() NatGatewayProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *NatGatewayPut) GetPropertiesOk() (*NatGatewayProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *NatGatewayPut) SetProperties(v NatGatewayProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGatewayRule.md000066400000000000000000000100451465267054300253260ustar00rootroot00000000000000# NatGatewayRule ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**NatGatewayRuleProperties**](NatGatewayRuleProperties.md) | | | ## Methods ### NewNatGatewayRule `func NewNatGatewayRule(properties NatGatewayRuleProperties, ) *NatGatewayRule` NewNatGatewayRule instantiates a new NatGatewayRule object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNatGatewayRuleWithDefaults `func NewNatGatewayRuleWithDefaults() *NatGatewayRule` NewNatGatewayRuleWithDefaults instantiates a new NatGatewayRule object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NatGatewayRule) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NatGatewayRule) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NatGatewayRule) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NatGatewayRule) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NatGatewayRule) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NatGatewayRule) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NatGatewayRule) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NatGatewayRule) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NatGatewayRule) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NatGatewayRule) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NatGatewayRule) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NatGatewayRule) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *NatGatewayRule) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *NatGatewayRule) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *NatGatewayRule) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *NatGatewayRule) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *NatGatewayRule) GetProperties() NatGatewayRuleProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *NatGatewayRule) GetPropertiesOk() (*NatGatewayRuleProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *NatGatewayRule) SetProperties(v NatGatewayRuleProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGatewayRuleProperties.md000066400000000000000000000145311465267054300274070ustar00rootroot00000000000000# NatGatewayRuleProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The name of the NAT Gateway rule. | | |**Type** | Pointer to [**NatGatewayRuleType**](NatGatewayRuleType.md) | Type of the NAT Gateway rule. | [optional] | |**Protocol** | Pointer to [**NatGatewayRuleProtocol**](NatGatewayRuleProtocol.md) | Protocol of the NAT Gateway rule. Defaults to ALL. If protocol is 'ICMP' then targetPortRange start and end cannot be set. | [optional] | |**SourceSubnet** | **string** | Source subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets source IP address. | | |**PublicIp** | **string** | Public IP address of the NAT Gateway rule. Specifies the address used for masking outgoing packets source address field. Should be one of the customer reserved IP address already configured on the NAT Gateway resource | | |**TargetSubnet** | Pointer to **string** | Target or destination subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets destination IP address. If none is provided, rule will match any address. | [optional] | |**TargetPortRange** | Pointer to [**TargetPortRange**](TargetPortRange.md) | | [optional] | ## Methods ### NewNatGatewayRuleProperties `func NewNatGatewayRuleProperties(name string, sourceSubnet string, publicIp string, ) *NatGatewayRuleProperties` NewNatGatewayRuleProperties instantiates a new NatGatewayRuleProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNatGatewayRulePropertiesWithDefaults `func NewNatGatewayRulePropertiesWithDefaults() *NatGatewayRuleProperties` NewNatGatewayRulePropertiesWithDefaults instantiates a new NatGatewayRuleProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *NatGatewayRuleProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *NatGatewayRuleProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *NatGatewayRuleProperties) SetName(v string)` SetName sets Name field to given value. ### GetType `func (o *NatGatewayRuleProperties) GetType() NatGatewayRuleType` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NatGatewayRuleProperties) GetTypeOk() (*NatGatewayRuleType, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NatGatewayRuleProperties) SetType(v NatGatewayRuleType)` SetType sets Type field to given value. ### HasType `func (o *NatGatewayRuleProperties) HasType() bool` HasType returns a boolean if a field has been set. ### GetProtocol `func (o *NatGatewayRuleProperties) GetProtocol() NatGatewayRuleProtocol` GetProtocol returns the Protocol field if non-nil, zero value otherwise. ### GetProtocolOk `func (o *NatGatewayRuleProperties) GetProtocolOk() (*NatGatewayRuleProtocol, bool)` GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProtocol `func (o *NatGatewayRuleProperties) SetProtocol(v NatGatewayRuleProtocol)` SetProtocol sets Protocol field to given value. ### HasProtocol `func (o *NatGatewayRuleProperties) HasProtocol() bool` HasProtocol returns a boolean if a field has been set. ### GetSourceSubnet `func (o *NatGatewayRuleProperties) GetSourceSubnet() string` GetSourceSubnet returns the SourceSubnet field if non-nil, zero value otherwise. ### GetSourceSubnetOk `func (o *NatGatewayRuleProperties) GetSourceSubnetOk() (*string, bool)` GetSourceSubnetOk returns a tuple with the SourceSubnet field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSourceSubnet `func (o *NatGatewayRuleProperties) SetSourceSubnet(v string)` SetSourceSubnet sets SourceSubnet field to given value. ### GetPublicIp `func (o *NatGatewayRuleProperties) GetPublicIp() string` GetPublicIp returns the PublicIp field if non-nil, zero value otherwise. ### GetPublicIpOk `func (o *NatGatewayRuleProperties) GetPublicIpOk() (*string, bool)` GetPublicIpOk returns a tuple with the PublicIp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublicIp `func (o *NatGatewayRuleProperties) SetPublicIp(v string)` SetPublicIp sets PublicIp field to given value. ### GetTargetSubnet `func (o *NatGatewayRuleProperties) GetTargetSubnet() string` GetTargetSubnet returns the TargetSubnet field if non-nil, zero value otherwise. ### GetTargetSubnetOk `func (o *NatGatewayRuleProperties) GetTargetSubnetOk() (*string, bool)` GetTargetSubnetOk returns a tuple with the TargetSubnet field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTargetSubnet `func (o *NatGatewayRuleProperties) SetTargetSubnet(v string)` SetTargetSubnet sets TargetSubnet field to given value. ### HasTargetSubnet `func (o *NatGatewayRuleProperties) HasTargetSubnet() bool` HasTargetSubnet returns a boolean if a field has been set. ### GetTargetPortRange `func (o *NatGatewayRuleProperties) GetTargetPortRange() TargetPortRange` GetTargetPortRange returns the TargetPortRange field if non-nil, zero value otherwise. ### GetTargetPortRangeOk `func (o *NatGatewayRuleProperties) GetTargetPortRangeOk() (*TargetPortRange, bool)` GetTargetPortRangeOk returns a tuple with the TargetPortRange field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTargetPortRange `func (o *NatGatewayRuleProperties) SetTargetPortRange(v TargetPortRange)` SetTargetPortRange sets TargetPortRange field to given value. ### HasTargetPortRange `func (o *NatGatewayRuleProperties) HasTargetPortRange() bool` HasTargetPortRange returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGatewayRuleProtocol.md000066400000000000000000000002171465267054300270500ustar00rootroot00000000000000# NatGatewayRuleProtocol ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGatewayRulePut.md000066400000000000000000000065711465267054300260300ustar00rootroot00000000000000# NatGatewayRulePut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**NatGatewayRuleProperties**](NatGatewayRuleProperties.md) | | | ## Methods ### NewNatGatewayRulePut `func NewNatGatewayRulePut(properties NatGatewayRuleProperties, ) *NatGatewayRulePut` NewNatGatewayRulePut instantiates a new NatGatewayRulePut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNatGatewayRulePutWithDefaults `func NewNatGatewayRulePutWithDefaults() *NatGatewayRulePut` NewNatGatewayRulePutWithDefaults instantiates a new NatGatewayRulePut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NatGatewayRulePut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NatGatewayRulePut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NatGatewayRulePut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NatGatewayRulePut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NatGatewayRulePut) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NatGatewayRulePut) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NatGatewayRulePut) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NatGatewayRulePut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NatGatewayRulePut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NatGatewayRulePut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NatGatewayRulePut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NatGatewayRulePut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *NatGatewayRulePut) GetProperties() NatGatewayRuleProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *NatGatewayRulePut) GetPropertiesOk() (*NatGatewayRuleProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *NatGatewayRulePut) SetProperties(v NatGatewayRuleProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGatewayRuleType.md000066400000000000000000000002131465267054300261640ustar00rootroot00000000000000# NatGatewayRuleType ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGatewayRules.md000066400000000000000000000065461465267054300255240ustar00rootroot00000000000000# NatGatewayRules ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]NatGatewayRule**](NatGatewayRule.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewNatGatewayRules `func NewNatGatewayRules() *NatGatewayRules` NewNatGatewayRules instantiates a new NatGatewayRules object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNatGatewayRulesWithDefaults `func NewNatGatewayRulesWithDefaults() *NatGatewayRules` NewNatGatewayRulesWithDefaults instantiates a new NatGatewayRules object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NatGatewayRules) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NatGatewayRules) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NatGatewayRules) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NatGatewayRules) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NatGatewayRules) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NatGatewayRules) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NatGatewayRules) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NatGatewayRules) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NatGatewayRules) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NatGatewayRules) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NatGatewayRules) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NatGatewayRules) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *NatGatewayRules) GetItems() []NatGatewayRule` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *NatGatewayRules) GetItemsOk() (*[]NatGatewayRule, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *NatGatewayRules) SetItems(v []NatGatewayRule)` SetItems sets Items field to given value. ### HasItems `func (o *NatGatewayRules) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NatGateways.md000066400000000000000000000121771465267054300246710ustar00rootroot00000000000000# NatGateways ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]NatGateway**](NatGateway.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewNatGateways `func NewNatGateways() *NatGateways` NewNatGateways instantiates a new NatGateways object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNatGatewaysWithDefaults `func NewNatGatewaysWithDefaults() *NatGateways` NewNatGatewaysWithDefaults instantiates a new NatGateways object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NatGateways) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NatGateways) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NatGateways) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NatGateways) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NatGateways) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NatGateways) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NatGateways) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NatGateways) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NatGateways) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NatGateways) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NatGateways) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NatGateways) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *NatGateways) GetItems() []NatGateway` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *NatGateways) GetItemsOk() (*[]NatGateway, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *NatGateways) SetItems(v []NatGateway)` SetItems sets Items field to given value. ### HasItems `func (o *NatGateways) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *NatGateways) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *NatGateways) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *NatGateways) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *NatGateways) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *NatGateways) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *NatGateways) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *NatGateways) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *NatGateways) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *NatGateways) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *NatGateways) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *NatGateways) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *NatGateways) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancer.md000066400000000000000000000117611465267054300263210ustar00rootroot00000000000000# NetworkLoadBalancer ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**NetworkLoadBalancerProperties**](NetworkLoadBalancerProperties.md) | | | |**Entities** | Pointer to [**NetworkLoadBalancerEntities**](NetworkLoadBalancerEntities.md) | | [optional] | ## Methods ### NewNetworkLoadBalancer `func NewNetworkLoadBalancer(properties NetworkLoadBalancerProperties, ) *NetworkLoadBalancer` NewNetworkLoadBalancer instantiates a new NetworkLoadBalancer object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerWithDefaults `func NewNetworkLoadBalancerWithDefaults() *NetworkLoadBalancer` NewNetworkLoadBalancerWithDefaults instantiates a new NetworkLoadBalancer object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NetworkLoadBalancer) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NetworkLoadBalancer) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NetworkLoadBalancer) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NetworkLoadBalancer) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NetworkLoadBalancer) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NetworkLoadBalancer) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NetworkLoadBalancer) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NetworkLoadBalancer) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NetworkLoadBalancer) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NetworkLoadBalancer) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NetworkLoadBalancer) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NetworkLoadBalancer) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *NetworkLoadBalancer) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *NetworkLoadBalancer) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *NetworkLoadBalancer) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *NetworkLoadBalancer) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *NetworkLoadBalancer) GetProperties() NetworkLoadBalancerProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *NetworkLoadBalancer) GetPropertiesOk() (*NetworkLoadBalancerProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *NetworkLoadBalancer) SetProperties(v NetworkLoadBalancerProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *NetworkLoadBalancer) GetEntities() NetworkLoadBalancerEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *NetworkLoadBalancer) GetEntitiesOk() (*NetworkLoadBalancerEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *NetworkLoadBalancer) SetEntities(v NetworkLoadBalancerEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *NetworkLoadBalancer) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancerEntities.md000066400000000000000000000051251465267054300300230ustar00rootroot00000000000000# NetworkLoadBalancerEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Flowlogs** | Pointer to [**FlowLogs**](FlowLogs.md) | | [optional] | |**Forwardingrules** | Pointer to [**NetworkLoadBalancerForwardingRules**](NetworkLoadBalancerForwardingRules.md) | | [optional] | ## Methods ### NewNetworkLoadBalancerEntities `func NewNetworkLoadBalancerEntities() *NetworkLoadBalancerEntities` NewNetworkLoadBalancerEntities instantiates a new NetworkLoadBalancerEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerEntitiesWithDefaults `func NewNetworkLoadBalancerEntitiesWithDefaults() *NetworkLoadBalancerEntities` NewNetworkLoadBalancerEntitiesWithDefaults instantiates a new NetworkLoadBalancerEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetFlowlogs `func (o *NetworkLoadBalancerEntities) GetFlowlogs() FlowLogs` GetFlowlogs returns the Flowlogs field if non-nil, zero value otherwise. ### GetFlowlogsOk `func (o *NetworkLoadBalancerEntities) GetFlowlogsOk() (*FlowLogs, bool)` GetFlowlogsOk returns a tuple with the Flowlogs field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFlowlogs `func (o *NetworkLoadBalancerEntities) SetFlowlogs(v FlowLogs)` SetFlowlogs sets Flowlogs field to given value. ### HasFlowlogs `func (o *NetworkLoadBalancerEntities) HasFlowlogs() bool` HasFlowlogs returns a boolean if a field has been set. ### GetForwardingrules `func (o *NetworkLoadBalancerEntities) GetForwardingrules() NetworkLoadBalancerForwardingRules` GetForwardingrules returns the Forwardingrules field if non-nil, zero value otherwise. ### GetForwardingrulesOk `func (o *NetworkLoadBalancerEntities) GetForwardingrulesOk() (*NetworkLoadBalancerForwardingRules, bool)` GetForwardingrulesOk returns a tuple with the Forwardingrules field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetForwardingrules `func (o *NetworkLoadBalancerEntities) SetForwardingrules(v NetworkLoadBalancerForwardingRules)` SetForwardingrules sets Forwardingrules field to given value. ### HasForwardingrules `func (o *NetworkLoadBalancerEntities) HasForwardingrules() bool` HasForwardingrules returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancerForwardingRule.md000066400000000000000000000113211465267054300311640ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRule ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**NetworkLoadBalancerForwardingRuleProperties**](NetworkLoadBalancerForwardingRuleProperties.md) | | | ## Methods ### NewNetworkLoadBalancerForwardingRule `func NewNetworkLoadBalancerForwardingRule(properties NetworkLoadBalancerForwardingRuleProperties, ) *NetworkLoadBalancerForwardingRule` NewNetworkLoadBalancerForwardingRule instantiates a new NetworkLoadBalancerForwardingRule object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerForwardingRuleWithDefaults `func NewNetworkLoadBalancerForwardingRuleWithDefaults() *NetworkLoadBalancerForwardingRule` NewNetworkLoadBalancerForwardingRuleWithDefaults instantiates a new NetworkLoadBalancerForwardingRule object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NetworkLoadBalancerForwardingRule) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NetworkLoadBalancerForwardingRule) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NetworkLoadBalancerForwardingRule) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NetworkLoadBalancerForwardingRule) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NetworkLoadBalancerForwardingRule) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NetworkLoadBalancerForwardingRule) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NetworkLoadBalancerForwardingRule) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NetworkLoadBalancerForwardingRule) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NetworkLoadBalancerForwardingRule) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NetworkLoadBalancerForwardingRule) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NetworkLoadBalancerForwardingRule) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NetworkLoadBalancerForwardingRule) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *NetworkLoadBalancerForwardingRule) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *NetworkLoadBalancerForwardingRule) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *NetworkLoadBalancerForwardingRule) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *NetworkLoadBalancerForwardingRule) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *NetworkLoadBalancerForwardingRule) GetProperties() NetworkLoadBalancerForwardingRuleProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *NetworkLoadBalancerForwardingRule) GetPropertiesOk() (*NetworkLoadBalancerForwardingRuleProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *NetworkLoadBalancerForwardingRule) SetProperties(v NetworkLoadBalancerForwardingRuleProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancerForwardingRuleHealthCheck.md000066400000000000000000000115151465267054300332550ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRuleHealthCheck ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**ClientTimeout** | Pointer to **int32** | The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). | [optional] | |**ConnectTimeout** | Pointer to **int32** | The maximum time in milliseconds to wait for a connection attempt to a target to succeed; default is 5000 (five seconds). | [optional] | |**TargetTimeout** | Pointer to **int32** | The maximum time in milliseconds that a target can remain inactive; default is 50,000 (50 seconds). | [optional] | |**Retries** | Pointer to **int32** | The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535 and default is three reconnection attempts. | [optional] | ## Methods ### NewNetworkLoadBalancerForwardingRuleHealthCheck `func NewNetworkLoadBalancerForwardingRuleHealthCheck() *NetworkLoadBalancerForwardingRuleHealthCheck` NewNetworkLoadBalancerForwardingRuleHealthCheck instantiates a new NetworkLoadBalancerForwardingRuleHealthCheck object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerForwardingRuleHealthCheckWithDefaults `func NewNetworkLoadBalancerForwardingRuleHealthCheckWithDefaults() *NetworkLoadBalancerForwardingRuleHealthCheck` NewNetworkLoadBalancerForwardingRuleHealthCheckWithDefaults instantiates a new NetworkLoadBalancerForwardingRuleHealthCheck object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetClientTimeout `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetClientTimeout() int32` GetClientTimeout returns the ClientTimeout field if non-nil, zero value otherwise. ### GetClientTimeoutOk `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetClientTimeoutOk() (*int32, bool)` GetClientTimeoutOk returns a tuple with the ClientTimeout field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetClientTimeout `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetClientTimeout(v int32)` SetClientTimeout sets ClientTimeout field to given value. ### HasClientTimeout `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasClientTimeout() bool` HasClientTimeout returns a boolean if a field has been set. ### GetConnectTimeout `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetConnectTimeout() int32` GetConnectTimeout returns the ConnectTimeout field if non-nil, zero value otherwise. ### GetConnectTimeoutOk `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetConnectTimeoutOk() (*int32, bool)` GetConnectTimeoutOk returns a tuple with the ConnectTimeout field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetConnectTimeout `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetConnectTimeout(v int32)` SetConnectTimeout sets ConnectTimeout field to given value. ### HasConnectTimeout `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasConnectTimeout() bool` HasConnectTimeout returns a boolean if a field has been set. ### GetTargetTimeout `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetTargetTimeout() int32` GetTargetTimeout returns the TargetTimeout field if non-nil, zero value otherwise. ### GetTargetTimeoutOk `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetTargetTimeoutOk() (*int32, bool)` GetTargetTimeoutOk returns a tuple with the TargetTimeout field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTargetTimeout `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetTargetTimeout(v int32)` SetTargetTimeout sets TargetTimeout field to given value. ### HasTargetTimeout `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasTargetTimeout() bool` HasTargetTimeout returns a boolean if a field has been set. ### GetRetries `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetRetries() int32` GetRetries returns the Retries field if non-nil, zero value otherwise. ### GetRetriesOk `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetRetriesOk() (*int32, bool)` GetRetriesOk returns a tuple with the Retries field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRetries `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetRetries(v int32)` SetRetries sets Retries field to given value. ### HasRetries `func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasRetries() bool` HasRetries returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancerForwardingRuleProperties.md000066400000000000000000000142261465267054300332500ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRuleProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The name of the Network Load Balancer forwarding rule. | | |**Algorithm** | **string** | Balancing algorithm | | |**Protocol** | **string** | Balancing protocol | | |**ListenerIp** | **string** | Listening (inbound) IP. | | |**ListenerPort** | **int32** | Listening (inbound) port number; valid range is 1 to 65535. | | |**HealthCheck** | Pointer to [**NetworkLoadBalancerForwardingRuleHealthCheck**](NetworkLoadBalancerForwardingRuleHealthCheck.md) | | [optional] | |**Targets** | [**[]NetworkLoadBalancerForwardingRuleTarget**](NetworkLoadBalancerForwardingRuleTarget.md) | Array of items in the collection. | | ## Methods ### NewNetworkLoadBalancerForwardingRuleProperties `func NewNetworkLoadBalancerForwardingRuleProperties(name string, algorithm string, protocol string, listenerIp string, listenerPort int32, targets []NetworkLoadBalancerForwardingRuleTarget, ) *NetworkLoadBalancerForwardingRuleProperties` NewNetworkLoadBalancerForwardingRuleProperties instantiates a new NetworkLoadBalancerForwardingRuleProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerForwardingRulePropertiesWithDefaults `func NewNetworkLoadBalancerForwardingRulePropertiesWithDefaults() *NetworkLoadBalancerForwardingRuleProperties` NewNetworkLoadBalancerForwardingRulePropertiesWithDefaults instantiates a new NetworkLoadBalancerForwardingRuleProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *NetworkLoadBalancerForwardingRuleProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *NetworkLoadBalancerForwardingRuleProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *NetworkLoadBalancerForwardingRuleProperties) SetName(v string)` SetName sets Name field to given value. ### GetAlgorithm `func (o *NetworkLoadBalancerForwardingRuleProperties) GetAlgorithm() string` GetAlgorithm returns the Algorithm field if non-nil, zero value otherwise. ### GetAlgorithmOk `func (o *NetworkLoadBalancerForwardingRuleProperties) GetAlgorithmOk() (*string, bool)` GetAlgorithmOk returns a tuple with the Algorithm field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAlgorithm `func (o *NetworkLoadBalancerForwardingRuleProperties) SetAlgorithm(v string)` SetAlgorithm sets Algorithm field to given value. ### GetProtocol `func (o *NetworkLoadBalancerForwardingRuleProperties) GetProtocol() string` GetProtocol returns the Protocol field if non-nil, zero value otherwise. ### GetProtocolOk `func (o *NetworkLoadBalancerForwardingRuleProperties) GetProtocolOk() (*string, bool)` GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProtocol `func (o *NetworkLoadBalancerForwardingRuleProperties) SetProtocol(v string)` SetProtocol sets Protocol field to given value. ### GetListenerIp `func (o *NetworkLoadBalancerForwardingRuleProperties) GetListenerIp() string` GetListenerIp returns the ListenerIp field if non-nil, zero value otherwise. ### GetListenerIpOk `func (o *NetworkLoadBalancerForwardingRuleProperties) GetListenerIpOk() (*string, bool)` GetListenerIpOk returns a tuple with the ListenerIp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetListenerIp `func (o *NetworkLoadBalancerForwardingRuleProperties) SetListenerIp(v string)` SetListenerIp sets ListenerIp field to given value. ### GetListenerPort `func (o *NetworkLoadBalancerForwardingRuleProperties) GetListenerPort() int32` GetListenerPort returns the ListenerPort field if non-nil, zero value otherwise. ### GetListenerPortOk `func (o *NetworkLoadBalancerForwardingRuleProperties) GetListenerPortOk() (*int32, bool)` GetListenerPortOk returns a tuple with the ListenerPort field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetListenerPort `func (o *NetworkLoadBalancerForwardingRuleProperties) SetListenerPort(v int32)` SetListenerPort sets ListenerPort field to given value. ### GetHealthCheck `func (o *NetworkLoadBalancerForwardingRuleProperties) GetHealthCheck() NetworkLoadBalancerForwardingRuleHealthCheck` GetHealthCheck returns the HealthCheck field if non-nil, zero value otherwise. ### GetHealthCheckOk `func (o *NetworkLoadBalancerForwardingRuleProperties) GetHealthCheckOk() (*NetworkLoadBalancerForwardingRuleHealthCheck, bool)` GetHealthCheckOk returns a tuple with the HealthCheck field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHealthCheck `func (o *NetworkLoadBalancerForwardingRuleProperties) SetHealthCheck(v NetworkLoadBalancerForwardingRuleHealthCheck)` SetHealthCheck sets HealthCheck field to given value. ### HasHealthCheck `func (o *NetworkLoadBalancerForwardingRuleProperties) HasHealthCheck() bool` HasHealthCheck returns a boolean if a field has been set. ### GetTargets `func (o *NetworkLoadBalancerForwardingRuleProperties) GetTargets() []NetworkLoadBalancerForwardingRuleTarget` GetTargets returns the Targets field if non-nil, zero value otherwise. ### GetTargetsOk `func (o *NetworkLoadBalancerForwardingRuleProperties) GetTargetsOk() (*[]NetworkLoadBalancerForwardingRuleTarget, bool)` GetTargetsOk returns a tuple with the Targets field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTargets `func (o *NetworkLoadBalancerForwardingRuleProperties) SetTargets(v []NetworkLoadBalancerForwardingRuleTarget)` SetTargets sets Targets field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancerForwardingRulePut.md000066400000000000000000000077311465267054300316670ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRulePut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**NetworkLoadBalancerForwardingRuleProperties**](NetworkLoadBalancerForwardingRuleProperties.md) | | | ## Methods ### NewNetworkLoadBalancerForwardingRulePut `func NewNetworkLoadBalancerForwardingRulePut(properties NetworkLoadBalancerForwardingRuleProperties, ) *NetworkLoadBalancerForwardingRulePut` NewNetworkLoadBalancerForwardingRulePut instantiates a new NetworkLoadBalancerForwardingRulePut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerForwardingRulePutWithDefaults `func NewNetworkLoadBalancerForwardingRulePutWithDefaults() *NetworkLoadBalancerForwardingRulePut` NewNetworkLoadBalancerForwardingRulePutWithDefaults instantiates a new NetworkLoadBalancerForwardingRulePut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NetworkLoadBalancerForwardingRulePut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NetworkLoadBalancerForwardingRulePut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NetworkLoadBalancerForwardingRulePut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NetworkLoadBalancerForwardingRulePut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NetworkLoadBalancerForwardingRulePut) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NetworkLoadBalancerForwardingRulePut) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NetworkLoadBalancerForwardingRulePut) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NetworkLoadBalancerForwardingRulePut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NetworkLoadBalancerForwardingRulePut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NetworkLoadBalancerForwardingRulePut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NetworkLoadBalancerForwardingRulePut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NetworkLoadBalancerForwardingRulePut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *NetworkLoadBalancerForwardingRulePut) GetProperties() NetworkLoadBalancerForwardingRuleProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *NetworkLoadBalancerForwardingRulePut) GetPropertiesOk() (*NetworkLoadBalancerForwardingRuleProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *NetworkLoadBalancerForwardingRulePut) SetProperties(v NetworkLoadBalancerForwardingRuleProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancerForwardingRuleTarget.md000066400000000000000000000120121465267054300323310ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRuleTarget ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Ip** | **string** | The IP of the balanced target VM. | | |**Port** | **int32** | The port of the balanced target service; valid range is 1 to 65535. | | |**Weight** | **int32** | Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1. Targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best to assign weights in the middle of the range to leave room for later adjustments. | | |**ProxyProtocol** | Pointer to **string** | Proxy protocol version. | [optional] [default to "none"]| |**HealthCheck** | Pointer to [**NetworkLoadBalancerForwardingRuleTargetHealthCheck**](NetworkLoadBalancerForwardingRuleTargetHealthCheck.md) | | [optional] | ## Methods ### NewNetworkLoadBalancerForwardingRuleTarget `func NewNetworkLoadBalancerForwardingRuleTarget(ip string, port int32, weight int32, ) *NetworkLoadBalancerForwardingRuleTarget` NewNetworkLoadBalancerForwardingRuleTarget instantiates a new NetworkLoadBalancerForwardingRuleTarget object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerForwardingRuleTargetWithDefaults `func NewNetworkLoadBalancerForwardingRuleTargetWithDefaults() *NetworkLoadBalancerForwardingRuleTarget` NewNetworkLoadBalancerForwardingRuleTargetWithDefaults instantiates a new NetworkLoadBalancerForwardingRuleTarget object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetIp `func (o *NetworkLoadBalancerForwardingRuleTarget) GetIp() string` GetIp returns the Ip field if non-nil, zero value otherwise. ### GetIpOk `func (o *NetworkLoadBalancerForwardingRuleTarget) GetIpOk() (*string, bool)` GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIp `func (o *NetworkLoadBalancerForwardingRuleTarget) SetIp(v string)` SetIp sets Ip field to given value. ### GetPort `func (o *NetworkLoadBalancerForwardingRuleTarget) GetPort() int32` GetPort returns the Port field if non-nil, zero value otherwise. ### GetPortOk `func (o *NetworkLoadBalancerForwardingRuleTarget) GetPortOk() (*int32, bool)` GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPort `func (o *NetworkLoadBalancerForwardingRuleTarget) SetPort(v int32)` SetPort sets Port field to given value. ### GetWeight `func (o *NetworkLoadBalancerForwardingRuleTarget) GetWeight() int32` GetWeight returns the Weight field if non-nil, zero value otherwise. ### GetWeightOk `func (o *NetworkLoadBalancerForwardingRuleTarget) GetWeightOk() (*int32, bool)` GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetWeight `func (o *NetworkLoadBalancerForwardingRuleTarget) SetWeight(v int32)` SetWeight sets Weight field to given value. ### GetProxyProtocol `func (o *NetworkLoadBalancerForwardingRuleTarget) GetProxyProtocol() string` GetProxyProtocol returns the ProxyProtocol field if non-nil, zero value otherwise. ### GetProxyProtocolOk `func (o *NetworkLoadBalancerForwardingRuleTarget) GetProxyProtocolOk() (*string, bool)` GetProxyProtocolOk returns a tuple with the ProxyProtocol field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProxyProtocol `func (o *NetworkLoadBalancerForwardingRuleTarget) SetProxyProtocol(v string)` SetProxyProtocol sets ProxyProtocol field to given value. ### HasProxyProtocol `func (o *NetworkLoadBalancerForwardingRuleTarget) HasProxyProtocol() bool` HasProxyProtocol returns a boolean if a field has been set. ### GetHealthCheck `func (o *NetworkLoadBalancerForwardingRuleTarget) GetHealthCheck() NetworkLoadBalancerForwardingRuleTargetHealthCheck` GetHealthCheck returns the HealthCheck field if non-nil, zero value otherwise. ### GetHealthCheckOk `func (o *NetworkLoadBalancerForwardingRuleTarget) GetHealthCheckOk() (*NetworkLoadBalancerForwardingRuleTargetHealthCheck, bool)` GetHealthCheckOk returns a tuple with the HealthCheck field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHealthCheck `func (o *NetworkLoadBalancerForwardingRuleTarget) SetHealthCheck(v NetworkLoadBalancerForwardingRuleTargetHealthCheck)` SetHealthCheck sets HealthCheck field to given value. ### HasHealthCheck `func (o *NetworkLoadBalancerForwardingRuleTarget) HasHealthCheck() bool` HasHealthCheck returns a boolean if a field has been set. NetworkLoadBalancerForwardingRuleTargetHealthCheck.md000066400000000000000000000077171465267054300343560ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/docs/models# NetworkLoadBalancerForwardingRuleTargetHealthCheck ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Check** | Pointer to **bool** | Makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. | [optional] | |**CheckInterval** | Pointer to **int32** | The interval in milliseconds between consecutive health checks; default is 2000. | [optional] | |**Maintenance** | Pointer to **bool** | Maintenance mode prevents the target from receiving balanced traffic. | [optional] | ## Methods ### NewNetworkLoadBalancerForwardingRuleTargetHealthCheck `func NewNetworkLoadBalancerForwardingRuleTargetHealthCheck() *NetworkLoadBalancerForwardingRuleTargetHealthCheck` NewNetworkLoadBalancerForwardingRuleTargetHealthCheck instantiates a new NetworkLoadBalancerForwardingRuleTargetHealthCheck object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerForwardingRuleTargetHealthCheckWithDefaults `func NewNetworkLoadBalancerForwardingRuleTargetHealthCheckWithDefaults() *NetworkLoadBalancerForwardingRuleTargetHealthCheck` NewNetworkLoadBalancerForwardingRuleTargetHealthCheckWithDefaults instantiates a new NetworkLoadBalancerForwardingRuleTargetHealthCheck object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetCheck `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetCheck() bool` GetCheck returns the Check field if non-nil, zero value otherwise. ### GetCheckOk `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetCheckOk() (*bool, bool)` GetCheckOk returns a tuple with the Check field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCheck `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) SetCheck(v bool)` SetCheck sets Check field to given value. ### HasCheck `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) HasCheck() bool` HasCheck returns a boolean if a field has been set. ### GetCheckInterval `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetCheckInterval() int32` GetCheckInterval returns the CheckInterval field if non-nil, zero value otherwise. ### GetCheckIntervalOk `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetCheckIntervalOk() (*int32, bool)` GetCheckIntervalOk returns a tuple with the CheckInterval field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCheckInterval `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) SetCheckInterval(v int32)` SetCheckInterval sets CheckInterval field to given value. ### HasCheckInterval `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) HasCheckInterval() bool` HasCheckInterval returns a boolean if a field has been set. ### GetMaintenance `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetMaintenance() bool` GetMaintenance returns the Maintenance field if non-nil, zero value otherwise. ### GetMaintenanceOk `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetMaintenanceOk() (*bool, bool)` GetMaintenanceOk returns a tuple with the Maintenance field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaintenance `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) SetMaintenance(v bool)` SetMaintenance sets Maintenance field to given value. ### HasMaintenance `func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) HasMaintenance() bool` HasMaintenance returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancerForwardingRules.md000066400000000000000000000141631465267054300313560ustar00rootroot00000000000000# NetworkLoadBalancerForwardingRules ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]NetworkLoadBalancerForwardingRule**](NetworkLoadBalancerForwardingRule.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewNetworkLoadBalancerForwardingRules `func NewNetworkLoadBalancerForwardingRules() *NetworkLoadBalancerForwardingRules` NewNetworkLoadBalancerForwardingRules instantiates a new NetworkLoadBalancerForwardingRules object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerForwardingRulesWithDefaults `func NewNetworkLoadBalancerForwardingRulesWithDefaults() *NetworkLoadBalancerForwardingRules` NewNetworkLoadBalancerForwardingRulesWithDefaults instantiates a new NetworkLoadBalancerForwardingRules object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NetworkLoadBalancerForwardingRules) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NetworkLoadBalancerForwardingRules) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NetworkLoadBalancerForwardingRules) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NetworkLoadBalancerForwardingRules) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NetworkLoadBalancerForwardingRules) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NetworkLoadBalancerForwardingRules) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NetworkLoadBalancerForwardingRules) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NetworkLoadBalancerForwardingRules) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NetworkLoadBalancerForwardingRules) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NetworkLoadBalancerForwardingRules) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NetworkLoadBalancerForwardingRules) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NetworkLoadBalancerForwardingRules) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *NetworkLoadBalancerForwardingRules) GetItems() []NetworkLoadBalancerForwardingRule` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *NetworkLoadBalancerForwardingRules) GetItemsOk() (*[]NetworkLoadBalancerForwardingRule, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *NetworkLoadBalancerForwardingRules) SetItems(v []NetworkLoadBalancerForwardingRule)` SetItems sets Items field to given value. ### HasItems `func (o *NetworkLoadBalancerForwardingRules) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *NetworkLoadBalancerForwardingRules) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *NetworkLoadBalancerForwardingRules) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *NetworkLoadBalancerForwardingRules) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *NetworkLoadBalancerForwardingRules) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *NetworkLoadBalancerForwardingRules) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *NetworkLoadBalancerForwardingRules) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *NetworkLoadBalancerForwardingRules) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *NetworkLoadBalancerForwardingRules) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *NetworkLoadBalancerForwardingRules) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *NetworkLoadBalancerForwardingRules) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *NetworkLoadBalancerForwardingRules) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *NetworkLoadBalancerForwardingRules) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancerProperties.md000066400000000000000000000142641465267054300303770ustar00rootroot00000000000000# NetworkLoadBalancerProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The name of the Network Load Balancer. | | |**ListenerLan** | **int32** | ID of the listening LAN (inbound). | | |**Ips** | Pointer to **[]string** | Collection of the Network Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan must be customer-reserved IPs for public Load Balancers, and private IPs for private Load Balancers. | [optional] | |**TargetLan** | **int32** | ID of the balanced private target LAN (outbound). | | |**LbPrivateIps** | Pointer to **[]string** | Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. | [optional] | |**CentralLogging** | Pointer to **bool** | Turn logging on and off for this product. Default value is 'false'. | [optional] | |**LoggingFormat** | Pointer to **string** | Specifies the format of the logs. | [optional] | ## Methods ### NewNetworkLoadBalancerProperties `func NewNetworkLoadBalancerProperties(name string, listenerLan int32, targetLan int32, ) *NetworkLoadBalancerProperties` NewNetworkLoadBalancerProperties instantiates a new NetworkLoadBalancerProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerPropertiesWithDefaults `func NewNetworkLoadBalancerPropertiesWithDefaults() *NetworkLoadBalancerProperties` NewNetworkLoadBalancerPropertiesWithDefaults instantiates a new NetworkLoadBalancerProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *NetworkLoadBalancerProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *NetworkLoadBalancerProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *NetworkLoadBalancerProperties) SetName(v string)` SetName sets Name field to given value. ### GetListenerLan `func (o *NetworkLoadBalancerProperties) GetListenerLan() int32` GetListenerLan returns the ListenerLan field if non-nil, zero value otherwise. ### GetListenerLanOk `func (o *NetworkLoadBalancerProperties) GetListenerLanOk() (*int32, bool)` GetListenerLanOk returns a tuple with the ListenerLan field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetListenerLan `func (o *NetworkLoadBalancerProperties) SetListenerLan(v int32)` SetListenerLan sets ListenerLan field to given value. ### GetIps `func (o *NetworkLoadBalancerProperties) GetIps() []string` GetIps returns the Ips field if non-nil, zero value otherwise. ### GetIpsOk `func (o *NetworkLoadBalancerProperties) GetIpsOk() (*[]string, bool)` GetIpsOk returns a tuple with the Ips field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIps `func (o *NetworkLoadBalancerProperties) SetIps(v []string)` SetIps sets Ips field to given value. ### HasIps `func (o *NetworkLoadBalancerProperties) HasIps() bool` HasIps returns a boolean if a field has been set. ### GetTargetLan `func (o *NetworkLoadBalancerProperties) GetTargetLan() int32` GetTargetLan returns the TargetLan field if non-nil, zero value otherwise. ### GetTargetLanOk `func (o *NetworkLoadBalancerProperties) GetTargetLanOk() (*int32, bool)` GetTargetLanOk returns a tuple with the TargetLan field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTargetLan `func (o *NetworkLoadBalancerProperties) SetTargetLan(v int32)` SetTargetLan sets TargetLan field to given value. ### GetLbPrivateIps `func (o *NetworkLoadBalancerProperties) GetLbPrivateIps() []string` GetLbPrivateIps returns the LbPrivateIps field if non-nil, zero value otherwise. ### GetLbPrivateIpsOk `func (o *NetworkLoadBalancerProperties) GetLbPrivateIpsOk() (*[]string, bool)` GetLbPrivateIpsOk returns a tuple with the LbPrivateIps field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLbPrivateIps `func (o *NetworkLoadBalancerProperties) SetLbPrivateIps(v []string)` SetLbPrivateIps sets LbPrivateIps field to given value. ### HasLbPrivateIps `func (o *NetworkLoadBalancerProperties) HasLbPrivateIps() bool` HasLbPrivateIps returns a boolean if a field has been set. ### GetCentralLogging `func (o *NetworkLoadBalancerProperties) GetCentralLogging() bool` GetCentralLogging returns the CentralLogging field if non-nil, zero value otherwise. ### GetCentralLoggingOk `func (o *NetworkLoadBalancerProperties) GetCentralLoggingOk() (*bool, bool)` GetCentralLoggingOk returns a tuple with the CentralLogging field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCentralLogging `func (o *NetworkLoadBalancerProperties) SetCentralLogging(v bool)` SetCentralLogging sets CentralLogging field to given value. ### HasCentralLogging `func (o *NetworkLoadBalancerProperties) HasCentralLogging() bool` HasCentralLogging returns a boolean if a field has been set. ### GetLoggingFormat `func (o *NetworkLoadBalancerProperties) GetLoggingFormat() string` GetLoggingFormat returns the LoggingFormat field if non-nil, zero value otherwise. ### GetLoggingFormatOk `func (o *NetworkLoadBalancerProperties) GetLoggingFormatOk() (*string, bool)` GetLoggingFormatOk returns a tuple with the LoggingFormat field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLoggingFormat `func (o *NetworkLoadBalancerProperties) SetLoggingFormat(v string)` SetLoggingFormat sets LoggingFormat field to given value. ### HasLoggingFormat `func (o *NetworkLoadBalancerProperties) HasLoggingFormat() bool` HasLoggingFormat returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancerPut.md000066400000000000000000000070311465267054300270050ustar00rootroot00000000000000# NetworkLoadBalancerPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**NetworkLoadBalancerProperties**](NetworkLoadBalancerProperties.md) | | | ## Methods ### NewNetworkLoadBalancerPut `func NewNetworkLoadBalancerPut(properties NetworkLoadBalancerProperties, ) *NetworkLoadBalancerPut` NewNetworkLoadBalancerPut instantiates a new NetworkLoadBalancerPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancerPutWithDefaults `func NewNetworkLoadBalancerPutWithDefaults() *NetworkLoadBalancerPut` NewNetworkLoadBalancerPutWithDefaults instantiates a new NetworkLoadBalancerPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NetworkLoadBalancerPut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NetworkLoadBalancerPut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NetworkLoadBalancerPut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NetworkLoadBalancerPut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NetworkLoadBalancerPut) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NetworkLoadBalancerPut) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NetworkLoadBalancerPut) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NetworkLoadBalancerPut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NetworkLoadBalancerPut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NetworkLoadBalancerPut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NetworkLoadBalancerPut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NetworkLoadBalancerPut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *NetworkLoadBalancerPut) GetProperties() NetworkLoadBalancerProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *NetworkLoadBalancerPut) GetPropertiesOk() (*NetworkLoadBalancerProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *NetworkLoadBalancerPut) SetProperties(v NetworkLoadBalancerProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NetworkLoadBalancers.md000066400000000000000000000130131465267054300264740ustar00rootroot00000000000000# NetworkLoadBalancers ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]NetworkLoadBalancer**](NetworkLoadBalancer.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewNetworkLoadBalancers `func NewNetworkLoadBalancers() *NetworkLoadBalancers` NewNetworkLoadBalancers instantiates a new NetworkLoadBalancers object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNetworkLoadBalancersWithDefaults `func NewNetworkLoadBalancersWithDefaults() *NetworkLoadBalancers` NewNetworkLoadBalancersWithDefaults instantiates a new NetworkLoadBalancers object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NetworkLoadBalancers) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NetworkLoadBalancers) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NetworkLoadBalancers) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NetworkLoadBalancers) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NetworkLoadBalancers) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NetworkLoadBalancers) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NetworkLoadBalancers) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NetworkLoadBalancers) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NetworkLoadBalancers) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NetworkLoadBalancers) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NetworkLoadBalancers) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NetworkLoadBalancers) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *NetworkLoadBalancers) GetItems() []NetworkLoadBalancer` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *NetworkLoadBalancers) GetItemsOk() (*[]NetworkLoadBalancer, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *NetworkLoadBalancers) SetItems(v []NetworkLoadBalancer)` SetItems sets Items field to given value. ### HasItems `func (o *NetworkLoadBalancers) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *NetworkLoadBalancers) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *NetworkLoadBalancers) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *NetworkLoadBalancers) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *NetworkLoadBalancers) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *NetworkLoadBalancers) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *NetworkLoadBalancers) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *NetworkLoadBalancers) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *NetworkLoadBalancers) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *NetworkLoadBalancers) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *NetworkLoadBalancers) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *NetworkLoadBalancers) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *NetworkLoadBalancers) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Nic.md000066400000000000000000000104411465267054300231430ustar00rootroot00000000000000# Nic ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**NicProperties**](NicProperties.md) | | | |**Entities** | Pointer to [**NicEntities**](NicEntities.md) | | [optional] | ## Methods ### NewNic `func NewNic(properties NicProperties, ) *Nic` NewNic instantiates a new Nic object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNicWithDefaults `func NewNicWithDefaults() *Nic` NewNicWithDefaults instantiates a new Nic object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Nic) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Nic) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Nic) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Nic) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Nic) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Nic) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Nic) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Nic) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Nic) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Nic) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Nic) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Nic) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Nic) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Nic) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Nic) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Nic) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Nic) GetProperties() NicProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Nic) GetPropertiesOk() (*NicProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Nic) SetProperties(v NicProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *Nic) GetEntities() NicEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *Nic) GetEntitiesOk() (*NicEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *Nic) SetEntities(v NicEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *Nic) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NicEntities.md000066400000000000000000000042341465267054300246530ustar00rootroot00000000000000# NicEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Flowlogs** | Pointer to [**FlowLogs**](FlowLogs.md) | | [optional] | |**Firewallrules** | Pointer to [**FirewallRules**](FirewallRules.md) | | [optional] | ## Methods ### NewNicEntities `func NewNicEntities() *NicEntities` NewNicEntities instantiates a new NicEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNicEntitiesWithDefaults `func NewNicEntitiesWithDefaults() *NicEntities` NewNicEntitiesWithDefaults instantiates a new NicEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetFlowlogs `func (o *NicEntities) GetFlowlogs() FlowLogs` GetFlowlogs returns the Flowlogs field if non-nil, zero value otherwise. ### GetFlowlogsOk `func (o *NicEntities) GetFlowlogsOk() (*FlowLogs, bool)` GetFlowlogsOk returns a tuple with the Flowlogs field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFlowlogs `func (o *NicEntities) SetFlowlogs(v FlowLogs)` SetFlowlogs sets Flowlogs field to given value. ### HasFlowlogs `func (o *NicEntities) HasFlowlogs() bool` HasFlowlogs returns a boolean if a field has been set. ### GetFirewallrules `func (o *NicEntities) GetFirewallrules() FirewallRules` GetFirewallrules returns the Firewallrules field if non-nil, zero value otherwise. ### GetFirewallrulesOk `func (o *NicEntities) GetFirewallrulesOk() (*FirewallRules, bool)` GetFirewallrulesOk returns a tuple with the Firewallrules field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFirewallrules `func (o *NicEntities) SetFirewallrules(v FirewallRules)` SetFirewallrules sets Firewallrules field to given value. ### HasFirewallrules `func (o *NicEntities) HasFirewallrules() bool` HasFirewallrules returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NicProperties.md000066400000000000000000000263211465267054300252240ustar00rootroot00000000000000# NicProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**Mac** | Pointer to **string** | The MAC address of the NIC. | [optional] [readonly] | |**Ips** | Pointer to **[]string** | Collection of IP addresses, assigned to the NIC. Explicitly assigned public IPs need to come from reserved IP blocks. Passing value null or empty array will assign an IP address automatically. | [optional] | |**Dhcp** | Pointer to **bool** | Indicates if the NIC will reserve an IP using DHCP. | [optional] [default to true]| |**Ipv6Ips** | Pointer to **[]string** | If this NIC is connected to an IPv6 enabled LAN then this property contains the IPv6 IP addresses of the NIC. The maximum number of IPv6 IP addresses per NIC is 50, if you need more, contact support. If you leave this property 'null' when adding a NIC, when changing the NIC's IPv6 CIDR block, when changing the LAN's IPv6 CIDR block or when moving the NIC to a different IPv6 enabled LAN, then we will automatically assign the same number of IPv6 addresses which you had before from the NICs new CIDR block. If you leave this property 'null' while not changing the CIDR block, the IPv6 IP addresses won't be changed either. You can also provide your own self choosen IPv6 addresses, which then must be inside the IPv6 CIDR block of this NIC. | [optional] | |**Ipv6CidrBlock** | Pointer to **NullableString** | If this NIC is connected to an IPv6 enabled LAN then this property contains the /80 IPv6 CIDR block of the NIC. If you leave this property 'null' when adding a NIC to an IPv6-enabled LAN, then an IPv6 CIDR block will automatically be assigned to the NIC, but you can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique. This value can only be set, if the LAN already has an IPv6 CIDR block assigned. An IPv6-enabled LAN is limited to a maximum of 65,536 NICs. | [optional] | |**Dhcpv6** | Pointer to **NullableBool** | Indicates if the NIC will receive an IPv6 using DHCP. It can be set to 'true' or 'false' only if this NIC is connected to an IPv6 enabled LAN. | [optional] | |**Lan** | **int32** | The LAN ID the NIC will be on. If the LAN ID does not exist, it will be implicitly created. | | |**FirewallActive** | Pointer to **bool** | Activate or deactivate the firewall. By default, an active firewall without any defined rules will block all incoming network traffic except for the firewall rules that explicitly allows certain protocols, IP addresses and ports. | [optional] | |**FirewallType** | Pointer to **string** | The type of firewall rules that will be allowed on the NIC. If not specified, the default INGRESS value is used. | [optional] | |**DeviceNumber** | Pointer to **int32** | The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created using Cloud API and no DCD changes were performed on the Datacenter. | [optional] [readonly] | |**PciSlot** | Pointer to **int32** | The PCI slot number for the NIC. | [optional] [readonly] | ## Methods ### NewNicProperties `func NewNicProperties(lan int32, ) *NicProperties` NewNicProperties instantiates a new NicProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNicPropertiesWithDefaults `func NewNicPropertiesWithDefaults() *NicProperties` NewNicPropertiesWithDefaults instantiates a new NicProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *NicProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *NicProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *NicProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *NicProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetMac `func (o *NicProperties) GetMac() string` GetMac returns the Mac field if non-nil, zero value otherwise. ### GetMacOk `func (o *NicProperties) GetMacOk() (*string, bool)` GetMacOk returns a tuple with the Mac field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMac `func (o *NicProperties) SetMac(v string)` SetMac sets Mac field to given value. ### HasMac `func (o *NicProperties) HasMac() bool` HasMac returns a boolean if a field has been set. ### GetIps `func (o *NicProperties) GetIps() []string` GetIps returns the Ips field if non-nil, zero value otherwise. ### GetIpsOk `func (o *NicProperties) GetIpsOk() (*[]string, bool)` GetIpsOk returns a tuple with the Ips field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIps `func (o *NicProperties) SetIps(v []string)` SetIps sets Ips field to given value. ### HasIps `func (o *NicProperties) HasIps() bool` HasIps returns a boolean if a field has been set. ### GetDhcp `func (o *NicProperties) GetDhcp() bool` GetDhcp returns the Dhcp field if non-nil, zero value otherwise. ### GetDhcpOk `func (o *NicProperties) GetDhcpOk() (*bool, bool)` GetDhcpOk returns a tuple with the Dhcp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDhcp `func (o *NicProperties) SetDhcp(v bool)` SetDhcp sets Dhcp field to given value. ### HasDhcp `func (o *NicProperties) HasDhcp() bool` HasDhcp returns a boolean if a field has been set. ### GetIpv6Ips `func (o *NicProperties) GetIpv6Ips() []string` GetIpv6Ips returns the Ipv6Ips field if non-nil, zero value otherwise. ### GetIpv6IpsOk `func (o *NicProperties) GetIpv6IpsOk() (*[]string, bool)` GetIpv6IpsOk returns a tuple with the Ipv6Ips field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIpv6Ips `func (o *NicProperties) SetIpv6Ips(v []string)` SetIpv6Ips sets Ipv6Ips field to given value. ### HasIpv6Ips `func (o *NicProperties) HasIpv6Ips() bool` HasIpv6Ips returns a boolean if a field has been set. ### GetIpv6CidrBlock `func (o *NicProperties) GetIpv6CidrBlock() string` GetIpv6CidrBlock returns the Ipv6CidrBlock field if non-nil, zero value otherwise. ### GetIpv6CidrBlockOk `func (o *NicProperties) GetIpv6CidrBlockOk() (*string, bool)` GetIpv6CidrBlockOk returns a tuple with the Ipv6CidrBlock field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIpv6CidrBlock `func (o *NicProperties) SetIpv6CidrBlock(v string)` SetIpv6CidrBlock sets Ipv6CidrBlock field to given value. ### HasIpv6CidrBlock `func (o *NicProperties) HasIpv6CidrBlock() bool` HasIpv6CidrBlock returns a boolean if a field has been set. ### SetIpv6CidrBlockNil `func (o *NicProperties) SetIpv6CidrBlockNil()` SetIpv6CidrBlockNil sets the value for Ipv6CidrBlock to be marshalled as an explicit nil Alternatively Ipv6CidrBlock can be set directly to the address `&Nilstring`, which is a sentinel value that is checked when marshalling. ### UnsetIpv6CidrBlock `func (o *NicProperties) UnsetIpv6CidrBlock()` ### GetDhcpv6 `func (o *NicProperties) GetDhcpv6() bool` GetDhcpv6 returns the Dhcpv6 field if non-nil, zero value otherwise. ### GetDhcpv6Ok `func (o *NicProperties) GetDhcpv6Ok() (*bool, bool)` GetDhcpv6Ok returns a tuple with the Dhcpv6 field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDhcpv6 `func (o *NicProperties) SetDhcpv6(v bool)` SetDhcpv6 sets Dhcpv6 field to given value. ### HasDhcpv6 `func (o *NicProperties) HasDhcpv6() bool` HasDhcpv6 returns a boolean if a field has been set. ### SetDhcpv6Nil `func (o *NicProperties) SetDhcpv6Nil()` SetDhcpv6Nil sets the value for Dhcpv6 to be marshalled as an explicit nil Alternatively Dhcpv6 can be set directly to the address `&Nilbool`, which is a sentinel value that is checked when marshalling. ### UnsetDhcpv6 `func (o *NicProperties) UnsetDhcpv6()` ### GetLan `func (o *NicProperties) GetLan() int32` GetLan returns the Lan field if non-nil, zero value otherwise. ### GetLanOk `func (o *NicProperties) GetLanOk() (*int32, bool)` GetLanOk returns a tuple with the Lan field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLan `func (o *NicProperties) SetLan(v int32)` SetLan sets Lan field to given value. ### GetFirewallActive `func (o *NicProperties) GetFirewallActive() bool` GetFirewallActive returns the FirewallActive field if non-nil, zero value otherwise. ### GetFirewallActiveOk `func (o *NicProperties) GetFirewallActiveOk() (*bool, bool)` GetFirewallActiveOk returns a tuple with the FirewallActive field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFirewallActive `func (o *NicProperties) SetFirewallActive(v bool)` SetFirewallActive sets FirewallActive field to given value. ### HasFirewallActive `func (o *NicProperties) HasFirewallActive() bool` HasFirewallActive returns a boolean if a field has been set. ### GetFirewallType `func (o *NicProperties) GetFirewallType() string` GetFirewallType returns the FirewallType field if non-nil, zero value otherwise. ### GetFirewallTypeOk `func (o *NicProperties) GetFirewallTypeOk() (*string, bool)` GetFirewallTypeOk returns a tuple with the FirewallType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFirewallType `func (o *NicProperties) SetFirewallType(v string)` SetFirewallType sets FirewallType field to given value. ### HasFirewallType `func (o *NicProperties) HasFirewallType() bool` HasFirewallType returns a boolean if a field has been set. ### GetDeviceNumber `func (o *NicProperties) GetDeviceNumber() int32` GetDeviceNumber returns the DeviceNumber field if non-nil, zero value otherwise. ### GetDeviceNumberOk `func (o *NicProperties) GetDeviceNumberOk() (*int32, bool)` GetDeviceNumberOk returns a tuple with the DeviceNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDeviceNumber `func (o *NicProperties) SetDeviceNumber(v int32)` SetDeviceNumber sets DeviceNumber field to given value. ### HasDeviceNumber `func (o *NicProperties) HasDeviceNumber() bool` HasDeviceNumber returns a boolean if a field has been set. ### GetPciSlot `func (o *NicProperties) GetPciSlot() int32` GetPciSlot returns the PciSlot field if non-nil, zero value otherwise. ### GetPciSlotOk `func (o *NicProperties) GetPciSlotOk() (*int32, bool)` GetPciSlotOk returns a tuple with the PciSlot field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPciSlot `func (o *NicProperties) SetPciSlot(v int32)` SetPciSlot sets PciSlot field to given value. ### HasPciSlot `func (o *NicProperties) HasPciSlot() bool` HasPciSlot returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NicPut.md000066400000000000000000000060311465267054300236340ustar00rootroot00000000000000# NicPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**NicProperties**](NicProperties.md) | | | ## Methods ### NewNicPut `func NewNicPut(properties NicProperties, ) *NicPut` NewNicPut instantiates a new NicPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNicPutWithDefaults `func NewNicPutWithDefaults() *NicPut` NewNicPutWithDefaults instantiates a new NicPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *NicPut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *NicPut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *NicPut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *NicPut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *NicPut) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *NicPut) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *NicPut) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *NicPut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *NicPut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *NicPut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *NicPut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *NicPut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *NicPut) GetProperties() NicProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *NicPut) GetPropertiesOk() (*NicProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *NicPut) SetProperties(v NicProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Nics.md000066400000000000000000000115001465267054300233230ustar00rootroot00000000000000# Nics ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Nic**](Nic.md) | Array of items in the collection. | [optional] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewNics `func NewNics() *Nics` NewNics instantiates a new Nics object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNicsWithDefaults `func NewNicsWithDefaults() *Nics` NewNicsWithDefaults instantiates a new Nics object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Nics) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Nics) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Nics) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Nics) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Nics) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Nics) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Nics) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Nics) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Nics) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Nics) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Nics) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Nics) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Nics) GetItems() []Nic` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Nics) GetItemsOk() (*[]Nic, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Nics) SetItems(v []Nic)` SetItems sets Items field to given value. ### HasItems `func (o *Nics) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *Nics) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *Nics) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *Nics) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *Nics) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *Nics) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *Nics) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *Nics) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *Nics) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *Nics) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *Nics) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *Nics) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *Nics) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/NoStateMetaData.md000066400000000000000000000146431465267054300254200ustar00rootroot00000000000000# NoStateMetaData ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Etag** | Pointer to **string** | Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. | [optional] [readonly] | |**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The time when the resource was created. | [optional] [readonly] | |**CreatedBy** | Pointer to **string** | The user who has created the resource. | [optional] [readonly] | |**CreatedByUserId** | Pointer to **string** | The unique ID of the user who created the resource. | [optional] [readonly] | |**LastModifiedDate** | Pointer to [**time.Time**](time.Time.md) | The last time the resource was modified. | [optional] [readonly] | |**LastModifiedBy** | Pointer to **string** | The user who last modified the resource. | [optional] [readonly] | |**LastModifiedByUserId** | Pointer to **string** | The unique ID of the user who last modified the resource. | [optional] [readonly] | ## Methods ### NewNoStateMetaData `func NewNoStateMetaData() *NoStateMetaData` NewNoStateMetaData instantiates a new NoStateMetaData object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewNoStateMetaDataWithDefaults `func NewNoStateMetaDataWithDefaults() *NoStateMetaData` NewNoStateMetaDataWithDefaults instantiates a new NoStateMetaData object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetEtag `func (o *NoStateMetaData) GetEtag() string` GetEtag returns the Etag field if non-nil, zero value otherwise. ### GetEtagOk `func (o *NoStateMetaData) GetEtagOk() (*string, bool)` GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEtag `func (o *NoStateMetaData) SetEtag(v string)` SetEtag sets Etag field to given value. ### HasEtag `func (o *NoStateMetaData) HasEtag() bool` HasEtag returns a boolean if a field has been set. ### GetCreatedDate `func (o *NoStateMetaData) GetCreatedDate() time.Time` GetCreatedDate returns the CreatedDate field if non-nil, zero value otherwise. ### GetCreatedDateOk `func (o *NoStateMetaData) GetCreatedDateOk() (*time.Time, bool)` GetCreatedDateOk returns a tuple with the CreatedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedDate `func (o *NoStateMetaData) SetCreatedDate(v time.Time)` SetCreatedDate sets CreatedDate field to given value. ### HasCreatedDate `func (o *NoStateMetaData) HasCreatedDate() bool` HasCreatedDate returns a boolean if a field has been set. ### GetCreatedBy `func (o *NoStateMetaData) GetCreatedBy() string` GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. ### GetCreatedByOk `func (o *NoStateMetaData) GetCreatedByOk() (*string, bool)` GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedBy `func (o *NoStateMetaData) SetCreatedBy(v string)` SetCreatedBy sets CreatedBy field to given value. ### HasCreatedBy `func (o *NoStateMetaData) HasCreatedBy() bool` HasCreatedBy returns a boolean if a field has been set. ### GetCreatedByUserId `func (o *NoStateMetaData) GetCreatedByUserId() string` GetCreatedByUserId returns the CreatedByUserId field if non-nil, zero value otherwise. ### GetCreatedByUserIdOk `func (o *NoStateMetaData) GetCreatedByUserIdOk() (*string, bool)` GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedByUserId `func (o *NoStateMetaData) SetCreatedByUserId(v string)` SetCreatedByUserId sets CreatedByUserId field to given value. ### HasCreatedByUserId `func (o *NoStateMetaData) HasCreatedByUserId() bool` HasCreatedByUserId returns a boolean if a field has been set. ### GetLastModifiedDate `func (o *NoStateMetaData) GetLastModifiedDate() time.Time` GetLastModifiedDate returns the LastModifiedDate field if non-nil, zero value otherwise. ### GetLastModifiedDateOk `func (o *NoStateMetaData) GetLastModifiedDateOk() (*time.Time, bool)` GetLastModifiedDateOk returns a tuple with the LastModifiedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastModifiedDate `func (o *NoStateMetaData) SetLastModifiedDate(v time.Time)` SetLastModifiedDate sets LastModifiedDate field to given value. ### HasLastModifiedDate `func (o *NoStateMetaData) HasLastModifiedDate() bool` HasLastModifiedDate returns a boolean if a field has been set. ### GetLastModifiedBy `func (o *NoStateMetaData) GetLastModifiedBy() string` GetLastModifiedBy returns the LastModifiedBy field if non-nil, zero value otherwise. ### GetLastModifiedByOk `func (o *NoStateMetaData) GetLastModifiedByOk() (*string, bool)` GetLastModifiedByOk returns a tuple with the LastModifiedBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastModifiedBy `func (o *NoStateMetaData) SetLastModifiedBy(v string)` SetLastModifiedBy sets LastModifiedBy field to given value. ### HasLastModifiedBy `func (o *NoStateMetaData) HasLastModifiedBy() bool` HasLastModifiedBy returns a boolean if a field has been set. ### GetLastModifiedByUserId `func (o *NoStateMetaData) GetLastModifiedByUserId() string` GetLastModifiedByUserId returns the LastModifiedByUserId field if non-nil, zero value otherwise. ### GetLastModifiedByUserIdOk `func (o *NoStateMetaData) GetLastModifiedByUserIdOk() (*string, bool)` GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastModifiedByUserId `func (o *NoStateMetaData) SetLastModifiedByUserId(v string)` SetLastModifiedByUserId sets LastModifiedByUserId field to given value. ### HasLastModifiedByUserId `func (o *NoStateMetaData) HasLastModifiedByUserId() bool` HasLastModifiedByUserId returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/PaginationLinks.md000066400000000000000000000055471465267054300255370ustar00rootroot00000000000000# PaginationLinks ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Prev** | Pointer to **string** | URL (with offset and limit parameters) of the previous page; only present if offset is greater than 0. | [optional] [readonly] | |**Self** | Pointer to **string** | URL (with offset and limit parameters) of the current page. | [optional] [readonly] | |**Next** | Pointer to **string** | URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements. | [optional] [readonly] | ## Methods ### NewPaginationLinks `func NewPaginationLinks() *PaginationLinks` NewPaginationLinks instantiates a new PaginationLinks object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewPaginationLinksWithDefaults `func NewPaginationLinksWithDefaults() *PaginationLinks` NewPaginationLinksWithDefaults instantiates a new PaginationLinks object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetPrev `func (o *PaginationLinks) GetPrev() string` GetPrev returns the Prev field if non-nil, zero value otherwise. ### GetPrevOk `func (o *PaginationLinks) GetPrevOk() (*string, bool)` GetPrevOk returns a tuple with the Prev field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPrev `func (o *PaginationLinks) SetPrev(v string)` SetPrev sets Prev field to given value. ### HasPrev `func (o *PaginationLinks) HasPrev() bool` HasPrev returns a boolean if a field has been set. ### GetSelf `func (o *PaginationLinks) GetSelf() string` GetSelf returns the Self field if non-nil, zero value otherwise. ### GetSelfOk `func (o *PaginationLinks) GetSelfOk() (*string, bool)` GetSelfOk returns a tuple with the Self field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSelf `func (o *PaginationLinks) SetSelf(v string)` SetSelf sets Self field to given value. ### HasSelf `func (o *PaginationLinks) HasSelf() bool` HasSelf returns a boolean if a field has been set. ### GetNext `func (o *PaginationLinks) GetNext() string` GetNext returns the Next field if non-nil, zero value otherwise. ### GetNextOk `func (o *PaginationLinks) GetNextOk() (*string, bool)` GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNext `func (o *PaginationLinks) SetNext(v string)` SetNext sets Next field to given value. ### HasNext `func (o *PaginationLinks) HasNext() bool` HasNext returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Peer.md000066400000000000000000000077351465267054300233410ustar00rootroot00000000000000# Peer ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | Identifier of the LAN connected to the Cross Connect. | [optional] | |**Name** | Pointer to **string** | Name of the LAN connected to the Cross Connect. | [optional] | |**DatacenterId** | Pointer to **string** | Identifier of the virtual data center connected to the Cross Connect. | [optional] | |**DatacenterName** | Pointer to **string** | Name of the virtual data center connected to the Cross Connect. | [optional] | |**Location** | Pointer to **string** | Location of the virtual data center connected to the Cross Connect. | [optional] | ## Methods ### NewPeer `func NewPeer() *Peer` NewPeer instantiates a new Peer object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewPeerWithDefaults `func NewPeerWithDefaults() *Peer` NewPeerWithDefaults instantiates a new Peer object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Peer) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Peer) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Peer) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Peer) HasId() bool` HasId returns a boolean if a field has been set. ### GetName `func (o *Peer) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *Peer) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *Peer) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *Peer) HasName() bool` HasName returns a boolean if a field has been set. ### GetDatacenterId `func (o *Peer) GetDatacenterId() string` GetDatacenterId returns the DatacenterId field if non-nil, zero value otherwise. ### GetDatacenterIdOk `func (o *Peer) GetDatacenterIdOk() (*string, bool)` GetDatacenterIdOk returns a tuple with the DatacenterId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDatacenterId `func (o *Peer) SetDatacenterId(v string)` SetDatacenterId sets DatacenterId field to given value. ### HasDatacenterId `func (o *Peer) HasDatacenterId() bool` HasDatacenterId returns a boolean if a field has been set. ### GetDatacenterName `func (o *Peer) GetDatacenterName() string` GetDatacenterName returns the DatacenterName field if non-nil, zero value otherwise. ### GetDatacenterNameOk `func (o *Peer) GetDatacenterNameOk() (*string, bool)` GetDatacenterNameOk returns a tuple with the DatacenterName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDatacenterName `func (o *Peer) SetDatacenterName(v string)` SetDatacenterName sets DatacenterName field to given value. ### HasDatacenterName `func (o *Peer) HasDatacenterName() bool` HasDatacenterName returns a boolean if a field has been set. ### GetLocation `func (o *Peer) GetLocation() string` GetLocation returns the Location field if non-nil, zero value otherwise. ### GetLocationOk `func (o *Peer) GetLocationOk() (*string, bool)` GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLocation `func (o *Peer) SetLocation(v string)` SetLocation sets Location field to given value. ### HasLocation `func (o *Peer) HasLocation() bool` HasLocation returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/PrivateCrossConnect.md000066400000000000000000000103311465267054300263660ustar00rootroot00000000000000# PrivateCrossConnect ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**PrivateCrossConnectProperties**](PrivateCrossConnectProperties.md) | | | ## Methods ### NewPrivateCrossConnect `func NewPrivateCrossConnect(properties PrivateCrossConnectProperties, ) *PrivateCrossConnect` NewPrivateCrossConnect instantiates a new PrivateCrossConnect object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewPrivateCrossConnectWithDefaults `func NewPrivateCrossConnectWithDefaults() *PrivateCrossConnect` NewPrivateCrossConnectWithDefaults instantiates a new PrivateCrossConnect object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *PrivateCrossConnect) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *PrivateCrossConnect) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *PrivateCrossConnect) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *PrivateCrossConnect) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *PrivateCrossConnect) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *PrivateCrossConnect) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *PrivateCrossConnect) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *PrivateCrossConnect) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *PrivateCrossConnect) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *PrivateCrossConnect) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *PrivateCrossConnect) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *PrivateCrossConnect) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *PrivateCrossConnect) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *PrivateCrossConnect) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *PrivateCrossConnect) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *PrivateCrossConnect) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *PrivateCrossConnect) GetProperties() PrivateCrossConnectProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *PrivateCrossConnect) GetPropertiesOk() (*PrivateCrossConnectProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *PrivateCrossConnect) SetProperties(v PrivateCrossConnectProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/PrivateCrossConnectProperties.md000066400000000000000000000107261465267054300304530ustar00rootroot00000000000000# PrivateCrossConnectProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The name of the Cross Connect. | [optional] | |**Description** | Pointer to **string** | Human-readable description of the Cross Connect. | [optional] | |**Peers** | Pointer to [**[]Peer**](Peer.md) | Read-Only attribute. Lists LAN's connected to this Cross Connect. | [optional] [readonly] | |**ConnectableDatacenters** | Pointer to [**[]ConnectableDatacenter**](ConnectableDatacenter.md) | Read-Only attribute. Lists data centers that can be connected to this Cross Connect. If the Cross Connect is not connected to any LANs it lists all VDCs the user has access to. If the Cross Connect is connected to at least 1 LAN it lists all VDCs the user has access to in the location of the connected LAN. | [optional] [readonly] | ## Methods ### NewPrivateCrossConnectProperties `func NewPrivateCrossConnectProperties() *PrivateCrossConnectProperties` NewPrivateCrossConnectProperties instantiates a new PrivateCrossConnectProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewPrivateCrossConnectPropertiesWithDefaults `func NewPrivateCrossConnectPropertiesWithDefaults() *PrivateCrossConnectProperties` NewPrivateCrossConnectPropertiesWithDefaults instantiates a new PrivateCrossConnectProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *PrivateCrossConnectProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *PrivateCrossConnectProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *PrivateCrossConnectProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *PrivateCrossConnectProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetDescription `func (o *PrivateCrossConnectProperties) GetDescription() string` GetDescription returns the Description field if non-nil, zero value otherwise. ### GetDescriptionOk `func (o *PrivateCrossConnectProperties) GetDescriptionOk() (*string, bool)` GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDescription `func (o *PrivateCrossConnectProperties) SetDescription(v string)` SetDescription sets Description field to given value. ### HasDescription `func (o *PrivateCrossConnectProperties) HasDescription() bool` HasDescription returns a boolean if a field has been set. ### GetPeers `func (o *PrivateCrossConnectProperties) GetPeers() []Peer` GetPeers returns the Peers field if non-nil, zero value otherwise. ### GetPeersOk `func (o *PrivateCrossConnectProperties) GetPeersOk() (*[]Peer, bool)` GetPeersOk returns a tuple with the Peers field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPeers `func (o *PrivateCrossConnectProperties) SetPeers(v []Peer)` SetPeers sets Peers field to given value. ### HasPeers `func (o *PrivateCrossConnectProperties) HasPeers() bool` HasPeers returns a boolean if a field has been set. ### GetConnectableDatacenters `func (o *PrivateCrossConnectProperties) GetConnectableDatacenters() []ConnectableDatacenter` GetConnectableDatacenters returns the ConnectableDatacenters field if non-nil, zero value otherwise. ### GetConnectableDatacentersOk `func (o *PrivateCrossConnectProperties) GetConnectableDatacentersOk() (*[]ConnectableDatacenter, bool)` GetConnectableDatacentersOk returns a tuple with the ConnectableDatacenters field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetConnectableDatacenters `func (o *PrivateCrossConnectProperties) SetConnectableDatacenters(v []ConnectableDatacenter)` SetConnectableDatacenters sets ConnectableDatacenters field to given value. ### HasConnectableDatacenters `func (o *PrivateCrossConnectProperties) HasConnectableDatacenters() bool` HasConnectableDatacenters returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/PrivateCrossConnects.md000066400000000000000000000070061465267054300265560ustar00rootroot00000000000000# PrivateCrossConnects ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]PrivateCrossConnect**](PrivateCrossConnect.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewPrivateCrossConnects `func NewPrivateCrossConnects() *PrivateCrossConnects` NewPrivateCrossConnects instantiates a new PrivateCrossConnects object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewPrivateCrossConnectsWithDefaults `func NewPrivateCrossConnectsWithDefaults() *PrivateCrossConnects` NewPrivateCrossConnectsWithDefaults instantiates a new PrivateCrossConnects object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *PrivateCrossConnects) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *PrivateCrossConnects) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *PrivateCrossConnects) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *PrivateCrossConnects) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *PrivateCrossConnects) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *PrivateCrossConnects) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *PrivateCrossConnects) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *PrivateCrossConnects) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *PrivateCrossConnects) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *PrivateCrossConnects) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *PrivateCrossConnects) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *PrivateCrossConnects) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *PrivateCrossConnects) GetItems() []PrivateCrossConnect` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *PrivateCrossConnects) GetItemsOk() (*[]PrivateCrossConnect, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *PrivateCrossConnects) SetItems(v []PrivateCrossConnect)` SetItems sets Items field to given value. ### HasItems `func (o *PrivateCrossConnects) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/RemoteConsoleUrl.md000066400000000000000000000027051465267054300256770ustar00rootroot00000000000000# RemoteConsoleUrl ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Url** | Pointer to **string** | The remote console url with the jwToken parameter for access | [optional] [readonly] | ## Methods ### NewRemoteConsoleUrl `func NewRemoteConsoleUrl() *RemoteConsoleUrl` NewRemoteConsoleUrl instantiates a new RemoteConsoleUrl object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewRemoteConsoleUrlWithDefaults `func NewRemoteConsoleUrlWithDefaults() *RemoteConsoleUrl` NewRemoteConsoleUrlWithDefaults instantiates a new RemoteConsoleUrl object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetUrl `func (o *RemoteConsoleUrl) GetUrl() string` GetUrl returns the Url field if non-nil, zero value otherwise. ### GetUrlOk `func (o *RemoteConsoleUrl) GetUrlOk() (*string, bool)` GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUrl `func (o *RemoteConsoleUrl) SetUrl(v string)` SetUrl sets Url field to given value. ### HasUrl `func (o *RemoteConsoleUrl) HasUrl() bool` HasUrl returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Request.md000066400000000000000000000073671465267054300240770ustar00rootroot00000000000000# Request ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**RequestMetadata**](RequestMetadata.md) | | [optional] | |**Properties** | [**RequestProperties**](RequestProperties.md) | | | ## Methods ### NewRequest `func NewRequest(properties RequestProperties, ) *Request` NewRequest instantiates a new Request object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewRequestWithDefaults `func NewRequestWithDefaults() *Request` NewRequestWithDefaults instantiates a new Request object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Request) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Request) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Request) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Request) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Request) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Request) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Request) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Request) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Request) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Request) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Request) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Request) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Request) GetMetadata() RequestMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Request) GetMetadataOk() (*RequestMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Request) SetMetadata(v RequestMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Request) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Request) GetProperties() RequestProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Request) GetPropertiesOk() (*RequestProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Request) SetProperties(v RequestProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/RequestMetadata.md000066400000000000000000000075251465267054300255340ustar00rootroot00000000000000# RequestMetadata ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The last time the resource was created. | [optional] [readonly] | |**CreatedBy** | Pointer to **string** | The user who created the resource. | [optional] [readonly] | |**Etag** | Pointer to **string** | Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. | [optional] [readonly] | |**RequestStatus** | Pointer to [**RequestStatus**](RequestStatus.md) | | [optional] | ## Methods ### NewRequestMetadata `func NewRequestMetadata() *RequestMetadata` NewRequestMetadata instantiates a new RequestMetadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewRequestMetadataWithDefaults `func NewRequestMetadataWithDefaults() *RequestMetadata` NewRequestMetadataWithDefaults instantiates a new RequestMetadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetCreatedDate `func (o *RequestMetadata) GetCreatedDate() time.Time` GetCreatedDate returns the CreatedDate field if non-nil, zero value otherwise. ### GetCreatedDateOk `func (o *RequestMetadata) GetCreatedDateOk() (*time.Time, bool)` GetCreatedDateOk returns a tuple with the CreatedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedDate `func (o *RequestMetadata) SetCreatedDate(v time.Time)` SetCreatedDate sets CreatedDate field to given value. ### HasCreatedDate `func (o *RequestMetadata) HasCreatedDate() bool` HasCreatedDate returns a boolean if a field has been set. ### GetCreatedBy `func (o *RequestMetadata) GetCreatedBy() string` GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. ### GetCreatedByOk `func (o *RequestMetadata) GetCreatedByOk() (*string, bool)` GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedBy `func (o *RequestMetadata) SetCreatedBy(v string)` SetCreatedBy sets CreatedBy field to given value. ### HasCreatedBy `func (o *RequestMetadata) HasCreatedBy() bool` HasCreatedBy returns a boolean if a field has been set. ### GetEtag `func (o *RequestMetadata) GetEtag() string` GetEtag returns the Etag field if non-nil, zero value otherwise. ### GetEtagOk `func (o *RequestMetadata) GetEtagOk() (*string, bool)` GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEtag `func (o *RequestMetadata) SetEtag(v string)` SetEtag sets Etag field to given value. ### HasEtag `func (o *RequestMetadata) HasEtag() bool` HasEtag returns a boolean if a field has been set. ### GetRequestStatus `func (o *RequestMetadata) GetRequestStatus() RequestStatus` GetRequestStatus returns the RequestStatus field if non-nil, zero value otherwise. ### GetRequestStatusOk `func (o *RequestMetadata) GetRequestStatusOk() (*RequestStatus, bool)` GetRequestStatusOk returns a tuple with the RequestStatus field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRequestStatus `func (o *RequestMetadata) SetRequestStatus(v RequestStatus)` SetRequestStatus sets RequestStatus field to given value. ### HasRequestStatus `func (o *RequestMetadata) HasRequestStatus() bool` HasRequestStatus returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/RequestProperties.md000066400000000000000000000064271465267054300261500ustar00rootroot00000000000000# RequestProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Method** | Pointer to **string** | | [optional] | |**Headers** | Pointer to **map[string]string** | | [optional] | |**Body** | Pointer to **string** | | [optional] | |**Url** | Pointer to **string** | | [optional] | ## Methods ### NewRequestProperties `func NewRequestProperties() *RequestProperties` NewRequestProperties instantiates a new RequestProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewRequestPropertiesWithDefaults `func NewRequestPropertiesWithDefaults() *RequestProperties` NewRequestPropertiesWithDefaults instantiates a new RequestProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetMethod `func (o *RequestProperties) GetMethod() string` GetMethod returns the Method field if non-nil, zero value otherwise. ### GetMethodOk `func (o *RequestProperties) GetMethodOk() (*string, bool)` GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMethod `func (o *RequestProperties) SetMethod(v string)` SetMethod sets Method field to given value. ### HasMethod `func (o *RequestProperties) HasMethod() bool` HasMethod returns a boolean if a field has been set. ### GetHeaders `func (o *RequestProperties) GetHeaders() map[string]string` GetHeaders returns the Headers field if non-nil, zero value otherwise. ### GetHeadersOk `func (o *RequestProperties) GetHeadersOk() (*map[string]string, bool)` GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHeaders `func (o *RequestProperties) SetHeaders(v map[string]string)` SetHeaders sets Headers field to given value. ### HasHeaders `func (o *RequestProperties) HasHeaders() bool` HasHeaders returns a boolean if a field has been set. ### GetBody `func (o *RequestProperties) GetBody() string` GetBody returns the Body field if non-nil, zero value otherwise. ### GetBodyOk `func (o *RequestProperties) GetBodyOk() (*string, bool)` GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBody `func (o *RequestProperties) SetBody(v string)` SetBody sets Body field to given value. ### HasBody `func (o *RequestProperties) HasBody() bool` HasBody returns a boolean if a field has been set. ### GetUrl `func (o *RequestProperties) GetUrl() string` GetUrl returns the Url field if non-nil, zero value otherwise. ### GetUrlOk `func (o *RequestProperties) GetUrlOk() (*string, bool)` GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUrl `func (o *RequestProperties) SetUrl(v string)` SetUrl sets Url field to given value. ### HasUrl `func (o *RequestProperties) HasUrl() bool` HasUrl returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/RequestStatus.md000066400000000000000000000065171465267054300252770ustar00rootroot00000000000000# RequestStatus ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**RequestStatusMetadata**](RequestStatusMetadata.md) | | [optional] | ## Methods ### NewRequestStatus `func NewRequestStatus() *RequestStatus` NewRequestStatus instantiates a new RequestStatus object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewRequestStatusWithDefaults `func NewRequestStatusWithDefaults() *RequestStatus` NewRequestStatusWithDefaults instantiates a new RequestStatus object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *RequestStatus) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *RequestStatus) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *RequestStatus) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *RequestStatus) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *RequestStatus) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *RequestStatus) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *RequestStatus) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *RequestStatus) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *RequestStatus) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *RequestStatus) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *RequestStatus) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *RequestStatus) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *RequestStatus) GetMetadata() RequestStatusMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *RequestStatus) GetMetadataOk() (*RequestStatusMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *RequestStatus) SetMetadata(v RequestStatusMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *RequestStatus) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/RequestStatusMetadata.md000066400000000000000000000072641465267054300267400ustar00rootroot00000000000000# RequestStatusMetadata ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Status** | Pointer to **string** | | [optional] | |**Message** | Pointer to **string** | | [optional] | |**Etag** | Pointer to **string** | Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. | [optional] [readonly] | |**Targets** | Pointer to [**[]RequestTarget**](RequestTarget.md) | | [optional] | ## Methods ### NewRequestStatusMetadata `func NewRequestStatusMetadata() *RequestStatusMetadata` NewRequestStatusMetadata instantiates a new RequestStatusMetadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewRequestStatusMetadataWithDefaults `func NewRequestStatusMetadataWithDefaults() *RequestStatusMetadata` NewRequestStatusMetadataWithDefaults instantiates a new RequestStatusMetadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetStatus `func (o *RequestStatusMetadata) GetStatus() string` GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk `func (o *RequestStatusMetadata) GetStatusOk() (*string, bool)` GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatus `func (o *RequestStatusMetadata) SetStatus(v string)` SetStatus sets Status field to given value. ### HasStatus `func (o *RequestStatusMetadata) HasStatus() bool` HasStatus returns a boolean if a field has been set. ### GetMessage `func (o *RequestStatusMetadata) GetMessage() string` GetMessage returns the Message field if non-nil, zero value otherwise. ### GetMessageOk `func (o *RequestStatusMetadata) GetMessageOk() (*string, bool)` GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMessage `func (o *RequestStatusMetadata) SetMessage(v string)` SetMessage sets Message field to given value. ### HasMessage `func (o *RequestStatusMetadata) HasMessage() bool` HasMessage returns a boolean if a field has been set. ### GetEtag `func (o *RequestStatusMetadata) GetEtag() string` GetEtag returns the Etag field if non-nil, zero value otherwise. ### GetEtagOk `func (o *RequestStatusMetadata) GetEtagOk() (*string, bool)` GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEtag `func (o *RequestStatusMetadata) SetEtag(v string)` SetEtag sets Etag field to given value. ### HasEtag `func (o *RequestStatusMetadata) HasEtag() bool` HasEtag returns a boolean if a field has been set. ### GetTargets `func (o *RequestStatusMetadata) GetTargets() []RequestTarget` GetTargets returns the Targets field if non-nil, zero value otherwise. ### GetTargetsOk `func (o *RequestStatusMetadata) GetTargetsOk() (*[]RequestTarget, bool)` GetTargetsOk returns a tuple with the Targets field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTargets `func (o *RequestStatusMetadata) SetTargets(v []RequestTarget)` SetTargets sets Targets field to given value. ### HasTargets `func (o *RequestStatusMetadata) HasTargets() bool` HasTargets returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/RequestTarget.md000066400000000000000000000040571465267054300252370ustar00rootroot00000000000000# RequestTarget ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Target** | Pointer to [**ResourceReference**](ResourceReference.md) | | [optional] | |**Status** | Pointer to **string** | | [optional] | ## Methods ### NewRequestTarget `func NewRequestTarget() *RequestTarget` NewRequestTarget instantiates a new RequestTarget object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewRequestTargetWithDefaults `func NewRequestTargetWithDefaults() *RequestTarget` NewRequestTargetWithDefaults instantiates a new RequestTarget object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetTarget `func (o *RequestTarget) GetTarget() ResourceReference` GetTarget returns the Target field if non-nil, zero value otherwise. ### GetTargetOk `func (o *RequestTarget) GetTargetOk() (*ResourceReference, bool)` GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTarget `func (o *RequestTarget) SetTarget(v ResourceReference)` SetTarget sets Target field to given value. ### HasTarget `func (o *RequestTarget) HasTarget() bool` HasTarget returns a boolean if a field has been set. ### GetStatus `func (o *RequestTarget) GetStatus() string` GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk `func (o *RequestTarget) GetStatusOk() (*string, bool)` GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatus `func (o *RequestTarget) SetStatus(v string)` SetStatus sets Status field to given value. ### HasStatus `func (o *RequestTarget) HasStatus() bool` HasStatus returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Requests.md000066400000000000000000000114401465267054300242450ustar00rootroot00000000000000# Requests ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Request**](Request.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | **float32** | The offset, specified in the request (if not is specified, 0 is used by default). | | |**Limit** | **float32** | The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). | | |**Links** | [**PaginationLinks**](PaginationLinks.md) | | | ## Methods ### NewRequests `func NewRequests(offset float32, limit float32, links PaginationLinks, ) *Requests` NewRequests instantiates a new Requests object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewRequestsWithDefaults `func NewRequestsWithDefaults() *Requests` NewRequestsWithDefaults instantiates a new Requests object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Requests) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Requests) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Requests) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Requests) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Requests) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Requests) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Requests) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Requests) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Requests) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Requests) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Requests) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Requests) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Requests) GetItems() []Request` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Requests) GetItemsOk() (*[]Request, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Requests) SetItems(v []Request)` SetItems sets Items field to given value. ### HasItems `func (o *Requests) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *Requests) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *Requests) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *Requests) SetOffset(v float32)` SetOffset sets Offset field to given value. ### GetLimit `func (o *Requests) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *Requests) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *Requests) SetLimit(v float32)` SetLimit sets Limit field to given value. ### GetLinks `func (o *Requests) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *Requests) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *Requests) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Resource.md000066400000000000000000000111401465267054300242160ustar00rootroot00000000000000# Resource ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of the resource. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | Pointer to [**ResourceProperties**](ResourceProperties.md) | | [optional] | |**Entities** | Pointer to [**ResourceEntities**](ResourceEntities.md) | | [optional] | ## Methods ### NewResource `func NewResource() *Resource` NewResource instantiates a new Resource object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewResourceWithDefaults `func NewResourceWithDefaults() *Resource` NewResourceWithDefaults instantiates a new Resource object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Resource) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Resource) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Resource) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Resource) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Resource) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Resource) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Resource) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Resource) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Resource) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Resource) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Resource) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Resource) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Resource) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Resource) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Resource) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Resource) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Resource) GetProperties() ResourceProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Resource) GetPropertiesOk() (*ResourceProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Resource) SetProperties(v ResourceProperties)` SetProperties sets Properties field to given value. ### HasProperties `func (o *Resource) HasProperties() bool` HasProperties returns a boolean if a field has been set. ### GetEntities `func (o *Resource) GetEntities() ResourceEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *Resource) GetEntitiesOk() (*ResourceEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *Resource) SetEntities(v ResourceEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *Resource) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ResourceEntities.md000066400000000000000000000027431465267054300257340ustar00rootroot00000000000000# ResourceEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Groups** | Pointer to [**ResourceGroups**](ResourceGroups.md) | | [optional] | ## Methods ### NewResourceEntities `func NewResourceEntities() *ResourceEntities` NewResourceEntities instantiates a new ResourceEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewResourceEntitiesWithDefaults `func NewResourceEntitiesWithDefaults() *ResourceEntities` NewResourceEntitiesWithDefaults instantiates a new ResourceEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetGroups `func (o *ResourceEntities) GetGroups() ResourceGroups` GetGroups returns the Groups field if non-nil, zero value otherwise. ### GetGroupsOk `func (o *ResourceEntities) GetGroupsOk() (*ResourceGroups, bool)` GetGroupsOk returns a tuple with the Groups field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGroups `func (o *ResourceEntities) SetGroups(v ResourceGroups)` SetGroups sets Groups field to given value. ### HasGroups `func (o *ResourceEntities) HasGroups() bool` HasGroups returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ResourceGroups.md000066400000000000000000000064351465267054300254310ustar00rootroot00000000000000# ResourceGroups ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of the resource. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Resource**](Resource.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewResourceGroups `func NewResourceGroups() *ResourceGroups` NewResourceGroups instantiates a new ResourceGroups object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewResourceGroupsWithDefaults `func NewResourceGroupsWithDefaults() *ResourceGroups` NewResourceGroupsWithDefaults instantiates a new ResourceGroups object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *ResourceGroups) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *ResourceGroups) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *ResourceGroups) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *ResourceGroups) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *ResourceGroups) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ResourceGroups) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ResourceGroups) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *ResourceGroups) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *ResourceGroups) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *ResourceGroups) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *ResourceGroups) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *ResourceGroups) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *ResourceGroups) GetItems() []Resource` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *ResourceGroups) GetItemsOk() (*[]Resource, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *ResourceGroups) SetItems(v []Resource)` SetItems sets Items field to given value. ### HasItems `func (o *ResourceGroups) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ResourceLimits.md000066400000000000000000000402541465267054300254100ustar00rootroot00000000000000# ResourceLimits ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**CoresPerServer** | **int32** | The maximum number of CPU cores per server. | | |**CoresPerContract** | **int32** | The maximum number of CPU cores per contract. | | |**CoresProvisioned** | **int32** | The number of CPU cores provisioned. | | |**RamPerServer** | **int32** | The maximum amount of RAM (in MB) that can be provisioned for a particular server under this contract. | | |**RamPerContract** | **int32** | The maximum amount of RAM (in MB) that can be provisioned under this contract. | | |**RamProvisioned** | **int32** | The amount of RAM (in MB) provisioned under this contract. | | |**HddLimitPerVolume** | **int64** | The maximum size (in MB) of an idividual hard disk volume. | | |**HddLimitPerContract** | **int64** | The maximum amount of disk space (in MB) that can be provided under this contract. | | |**HddVolumeProvisioned** | **int64** | The amount of hard disk space (in MB) that is currently provisioned. | | |**SsdLimitPerVolume** | **int64** | The maximum size (in MB) of an individual solid state disk volume. | | |**SsdLimitPerContract** | **int64** | The maximum amount of solid state disk space (in MB) that can be provisioned under this contract. | | |**SsdVolumeProvisioned** | **int64** | The amount of solid state disk space (in MB) that is currently provisioned. | | |**DasVolumeProvisioned** | **int64** | The amount of DAS disk space (in MB) in a Cube server that is currently provisioned. | | |**ReservableIps** | **int32** | The maximum number of static public IP addresses that can be reserved by this customer across contracts. | | |**ReservedIpsOnContract** | **int32** | The maximum number of static public IP addresses that can be reserved for this contract. | | |**ReservedIpsInUse** | **int32** | The number of static public IP addresses in use. | | |**K8sClusterLimitTotal** | **int32** | The maximum number of Kubernetes clusters that can be created under this contract. | | |**K8sClustersProvisioned** | **int32** | The amount of Kubernetes clusters that is currently provisioned. | | |**NlbLimitTotal** | **int32** | The NLB total limit. | | |**NlbProvisioned** | **int32** | The NLBs provisioned. | | |**NatGatewayLimitTotal** | **int32** | The NAT Gateway total limit. | | |**NatGatewayProvisioned** | **int32** | The NAT Gateways provisioned. | | ## Methods ### NewResourceLimits `func NewResourceLimits(coresPerServer int32, coresPerContract int32, coresProvisioned int32, ramPerServer int32, ramPerContract int32, ramProvisioned int32, hddLimitPerVolume int64, hddLimitPerContract int64, hddVolumeProvisioned int64, ssdLimitPerVolume int64, ssdLimitPerContract int64, ssdVolumeProvisioned int64, dasVolumeProvisioned int64, reservableIps int32, reservedIpsOnContract int32, reservedIpsInUse int32, k8sClusterLimitTotal int32, k8sClustersProvisioned int32, nlbLimitTotal int32, nlbProvisioned int32, natGatewayLimitTotal int32, natGatewayProvisioned int32, ) *ResourceLimits` NewResourceLimits instantiates a new ResourceLimits object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewResourceLimitsWithDefaults `func NewResourceLimitsWithDefaults() *ResourceLimits` NewResourceLimitsWithDefaults instantiates a new ResourceLimits object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetCoresPerServer `func (o *ResourceLimits) GetCoresPerServer() int32` GetCoresPerServer returns the CoresPerServer field if non-nil, zero value otherwise. ### GetCoresPerServerOk `func (o *ResourceLimits) GetCoresPerServerOk() (*int32, bool)` GetCoresPerServerOk returns a tuple with the CoresPerServer field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCoresPerServer `func (o *ResourceLimits) SetCoresPerServer(v int32)` SetCoresPerServer sets CoresPerServer field to given value. ### GetCoresPerContract `func (o *ResourceLimits) GetCoresPerContract() int32` GetCoresPerContract returns the CoresPerContract field if non-nil, zero value otherwise. ### GetCoresPerContractOk `func (o *ResourceLimits) GetCoresPerContractOk() (*int32, bool)` GetCoresPerContractOk returns a tuple with the CoresPerContract field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCoresPerContract `func (o *ResourceLimits) SetCoresPerContract(v int32)` SetCoresPerContract sets CoresPerContract field to given value. ### GetCoresProvisioned `func (o *ResourceLimits) GetCoresProvisioned() int32` GetCoresProvisioned returns the CoresProvisioned field if non-nil, zero value otherwise. ### GetCoresProvisionedOk `func (o *ResourceLimits) GetCoresProvisionedOk() (*int32, bool)` GetCoresProvisionedOk returns a tuple with the CoresProvisioned field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCoresProvisioned `func (o *ResourceLimits) SetCoresProvisioned(v int32)` SetCoresProvisioned sets CoresProvisioned field to given value. ### GetRamPerServer `func (o *ResourceLimits) GetRamPerServer() int32` GetRamPerServer returns the RamPerServer field if non-nil, zero value otherwise. ### GetRamPerServerOk `func (o *ResourceLimits) GetRamPerServerOk() (*int32, bool)` GetRamPerServerOk returns a tuple with the RamPerServer field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRamPerServer `func (o *ResourceLimits) SetRamPerServer(v int32)` SetRamPerServer sets RamPerServer field to given value. ### GetRamPerContract `func (o *ResourceLimits) GetRamPerContract() int32` GetRamPerContract returns the RamPerContract field if non-nil, zero value otherwise. ### GetRamPerContractOk `func (o *ResourceLimits) GetRamPerContractOk() (*int32, bool)` GetRamPerContractOk returns a tuple with the RamPerContract field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRamPerContract `func (o *ResourceLimits) SetRamPerContract(v int32)` SetRamPerContract sets RamPerContract field to given value. ### GetRamProvisioned `func (o *ResourceLimits) GetRamProvisioned() int32` GetRamProvisioned returns the RamProvisioned field if non-nil, zero value otherwise. ### GetRamProvisionedOk `func (o *ResourceLimits) GetRamProvisionedOk() (*int32, bool)` GetRamProvisionedOk returns a tuple with the RamProvisioned field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRamProvisioned `func (o *ResourceLimits) SetRamProvisioned(v int32)` SetRamProvisioned sets RamProvisioned field to given value. ### GetHddLimitPerVolume `func (o *ResourceLimits) GetHddLimitPerVolume() int64` GetHddLimitPerVolume returns the HddLimitPerVolume field if non-nil, zero value otherwise. ### GetHddLimitPerVolumeOk `func (o *ResourceLimits) GetHddLimitPerVolumeOk() (*int64, bool)` GetHddLimitPerVolumeOk returns a tuple with the HddLimitPerVolume field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHddLimitPerVolume `func (o *ResourceLimits) SetHddLimitPerVolume(v int64)` SetHddLimitPerVolume sets HddLimitPerVolume field to given value. ### GetHddLimitPerContract `func (o *ResourceLimits) GetHddLimitPerContract() int64` GetHddLimitPerContract returns the HddLimitPerContract field if non-nil, zero value otherwise. ### GetHddLimitPerContractOk `func (o *ResourceLimits) GetHddLimitPerContractOk() (*int64, bool)` GetHddLimitPerContractOk returns a tuple with the HddLimitPerContract field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHddLimitPerContract `func (o *ResourceLimits) SetHddLimitPerContract(v int64)` SetHddLimitPerContract sets HddLimitPerContract field to given value. ### GetHddVolumeProvisioned `func (o *ResourceLimits) GetHddVolumeProvisioned() int64` GetHddVolumeProvisioned returns the HddVolumeProvisioned field if non-nil, zero value otherwise. ### GetHddVolumeProvisionedOk `func (o *ResourceLimits) GetHddVolumeProvisionedOk() (*int64, bool)` GetHddVolumeProvisionedOk returns a tuple with the HddVolumeProvisioned field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHddVolumeProvisioned `func (o *ResourceLimits) SetHddVolumeProvisioned(v int64)` SetHddVolumeProvisioned sets HddVolumeProvisioned field to given value. ### GetSsdLimitPerVolume `func (o *ResourceLimits) GetSsdLimitPerVolume() int64` GetSsdLimitPerVolume returns the SsdLimitPerVolume field if non-nil, zero value otherwise. ### GetSsdLimitPerVolumeOk `func (o *ResourceLimits) GetSsdLimitPerVolumeOk() (*int64, bool)` GetSsdLimitPerVolumeOk returns a tuple with the SsdLimitPerVolume field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSsdLimitPerVolume `func (o *ResourceLimits) SetSsdLimitPerVolume(v int64)` SetSsdLimitPerVolume sets SsdLimitPerVolume field to given value. ### GetSsdLimitPerContract `func (o *ResourceLimits) GetSsdLimitPerContract() int64` GetSsdLimitPerContract returns the SsdLimitPerContract field if non-nil, zero value otherwise. ### GetSsdLimitPerContractOk `func (o *ResourceLimits) GetSsdLimitPerContractOk() (*int64, bool)` GetSsdLimitPerContractOk returns a tuple with the SsdLimitPerContract field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSsdLimitPerContract `func (o *ResourceLimits) SetSsdLimitPerContract(v int64)` SetSsdLimitPerContract sets SsdLimitPerContract field to given value. ### GetSsdVolumeProvisioned `func (o *ResourceLimits) GetSsdVolumeProvisioned() int64` GetSsdVolumeProvisioned returns the SsdVolumeProvisioned field if non-nil, zero value otherwise. ### GetSsdVolumeProvisionedOk `func (o *ResourceLimits) GetSsdVolumeProvisionedOk() (*int64, bool)` GetSsdVolumeProvisionedOk returns a tuple with the SsdVolumeProvisioned field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSsdVolumeProvisioned `func (o *ResourceLimits) SetSsdVolumeProvisioned(v int64)` SetSsdVolumeProvisioned sets SsdVolumeProvisioned field to given value. ### GetDasVolumeProvisioned `func (o *ResourceLimits) GetDasVolumeProvisioned() int64` GetDasVolumeProvisioned returns the DasVolumeProvisioned field if non-nil, zero value otherwise. ### GetDasVolumeProvisionedOk `func (o *ResourceLimits) GetDasVolumeProvisionedOk() (*int64, bool)` GetDasVolumeProvisionedOk returns a tuple with the DasVolumeProvisioned field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDasVolumeProvisioned `func (o *ResourceLimits) SetDasVolumeProvisioned(v int64)` SetDasVolumeProvisioned sets DasVolumeProvisioned field to given value. ### GetReservableIps `func (o *ResourceLimits) GetReservableIps() int32` GetReservableIps returns the ReservableIps field if non-nil, zero value otherwise. ### GetReservableIpsOk `func (o *ResourceLimits) GetReservableIpsOk() (*int32, bool)` GetReservableIpsOk returns a tuple with the ReservableIps field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetReservableIps `func (o *ResourceLimits) SetReservableIps(v int32)` SetReservableIps sets ReservableIps field to given value. ### GetReservedIpsOnContract `func (o *ResourceLimits) GetReservedIpsOnContract() int32` GetReservedIpsOnContract returns the ReservedIpsOnContract field if non-nil, zero value otherwise. ### GetReservedIpsOnContractOk `func (o *ResourceLimits) GetReservedIpsOnContractOk() (*int32, bool)` GetReservedIpsOnContractOk returns a tuple with the ReservedIpsOnContract field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetReservedIpsOnContract `func (o *ResourceLimits) SetReservedIpsOnContract(v int32)` SetReservedIpsOnContract sets ReservedIpsOnContract field to given value. ### GetReservedIpsInUse `func (o *ResourceLimits) GetReservedIpsInUse() int32` GetReservedIpsInUse returns the ReservedIpsInUse field if non-nil, zero value otherwise. ### GetReservedIpsInUseOk `func (o *ResourceLimits) GetReservedIpsInUseOk() (*int32, bool)` GetReservedIpsInUseOk returns a tuple with the ReservedIpsInUse field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetReservedIpsInUse `func (o *ResourceLimits) SetReservedIpsInUse(v int32)` SetReservedIpsInUse sets ReservedIpsInUse field to given value. ### GetK8sClusterLimitTotal `func (o *ResourceLimits) GetK8sClusterLimitTotal() int32` GetK8sClusterLimitTotal returns the K8sClusterLimitTotal field if non-nil, zero value otherwise. ### GetK8sClusterLimitTotalOk `func (o *ResourceLimits) GetK8sClusterLimitTotalOk() (*int32, bool)` GetK8sClusterLimitTotalOk returns a tuple with the K8sClusterLimitTotal field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sClusterLimitTotal `func (o *ResourceLimits) SetK8sClusterLimitTotal(v int32)` SetK8sClusterLimitTotal sets K8sClusterLimitTotal field to given value. ### GetK8sClustersProvisioned `func (o *ResourceLimits) GetK8sClustersProvisioned() int32` GetK8sClustersProvisioned returns the K8sClustersProvisioned field if non-nil, zero value otherwise. ### GetK8sClustersProvisionedOk `func (o *ResourceLimits) GetK8sClustersProvisionedOk() (*int32, bool)` GetK8sClustersProvisionedOk returns a tuple with the K8sClustersProvisioned field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK8sClustersProvisioned `func (o *ResourceLimits) SetK8sClustersProvisioned(v int32)` SetK8sClustersProvisioned sets K8sClustersProvisioned field to given value. ### GetNlbLimitTotal `func (o *ResourceLimits) GetNlbLimitTotal() int32` GetNlbLimitTotal returns the NlbLimitTotal field if non-nil, zero value otherwise. ### GetNlbLimitTotalOk `func (o *ResourceLimits) GetNlbLimitTotalOk() (*int32, bool)` GetNlbLimitTotalOk returns a tuple with the NlbLimitTotal field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNlbLimitTotal `func (o *ResourceLimits) SetNlbLimitTotal(v int32)` SetNlbLimitTotal sets NlbLimitTotal field to given value. ### GetNlbProvisioned `func (o *ResourceLimits) GetNlbProvisioned() int32` GetNlbProvisioned returns the NlbProvisioned field if non-nil, zero value otherwise. ### GetNlbProvisionedOk `func (o *ResourceLimits) GetNlbProvisionedOk() (*int32, bool)` GetNlbProvisionedOk returns a tuple with the NlbProvisioned field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNlbProvisioned `func (o *ResourceLimits) SetNlbProvisioned(v int32)` SetNlbProvisioned sets NlbProvisioned field to given value. ### GetNatGatewayLimitTotal `func (o *ResourceLimits) GetNatGatewayLimitTotal() int32` GetNatGatewayLimitTotal returns the NatGatewayLimitTotal field if non-nil, zero value otherwise. ### GetNatGatewayLimitTotalOk `func (o *ResourceLimits) GetNatGatewayLimitTotalOk() (*int32, bool)` GetNatGatewayLimitTotalOk returns a tuple with the NatGatewayLimitTotal field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNatGatewayLimitTotal `func (o *ResourceLimits) SetNatGatewayLimitTotal(v int32)` SetNatGatewayLimitTotal sets NatGatewayLimitTotal field to given value. ### GetNatGatewayProvisioned `func (o *ResourceLimits) GetNatGatewayProvisioned() int32` GetNatGatewayProvisioned returns the NatGatewayProvisioned field if non-nil, zero value otherwise. ### GetNatGatewayProvisionedOk `func (o *ResourceLimits) GetNatGatewayProvisionedOk() (*int32, bool)` GetNatGatewayProvisionedOk returns a tuple with the NatGatewayProvisioned field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNatGatewayProvisioned `func (o *ResourceLimits) SetNatGatewayProvisioned(v int32)` SetNatGatewayProvisioned sets NatGatewayProvisioned field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ResourceProperties.md000066400000000000000000000050551465267054300263030ustar00rootroot00000000000000# ResourceProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**SecAuthProtection** | Pointer to **bool** | Boolean value representing if the resource is multi factor protected or not e.g. using two factor protection. Currently only data centers and snapshots are allowed to be multi factor protected, The value of attribute if null is intentional and it means that the resource doesn't support multi factor protection at all. | [optional] | ## Methods ### NewResourceProperties `func NewResourceProperties() *ResourceProperties` NewResourceProperties instantiates a new ResourceProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewResourcePropertiesWithDefaults `func NewResourcePropertiesWithDefaults() *ResourceProperties` NewResourcePropertiesWithDefaults instantiates a new ResourceProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *ResourceProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *ResourceProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *ResourceProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *ResourceProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetSecAuthProtection `func (o *ResourceProperties) GetSecAuthProtection() bool` GetSecAuthProtection returns the SecAuthProtection field if non-nil, zero value otherwise. ### GetSecAuthProtectionOk `func (o *ResourceProperties) GetSecAuthProtectionOk() (*bool, bool)` GetSecAuthProtectionOk returns a tuple with the SecAuthProtection field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSecAuthProtection `func (o *ResourceProperties) SetSecAuthProtection(v bool)` SetSecAuthProtection sets SecAuthProtection field to given value. ### HasSecAuthProtection `func (o *ResourceProperties) HasSecAuthProtection() bool` HasSecAuthProtection returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ResourceReference.md000066400000000000000000000051131465267054300260400ustar00rootroot00000000000000# ResourceReference ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | **string** | The resource's unique identifier. | | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | ## Methods ### NewResourceReference `func NewResourceReference(id string, ) *ResourceReference` NewResourceReference instantiates a new ResourceReference object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewResourceReferenceWithDefaults `func NewResourceReferenceWithDefaults() *ResourceReference` NewResourceReferenceWithDefaults instantiates a new ResourceReference object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *ResourceReference) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *ResourceReference) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *ResourceReference) SetId(v string)` SetId sets Id field to given value. ### GetType `func (o *ResourceReference) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ResourceReference) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ResourceReference) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *ResourceReference) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *ResourceReference) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *ResourceReference) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *ResourceReference) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *ResourceReference) HasHref() bool` HasHref returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Resources.md000066400000000000000000000062261465267054300244120ustar00rootroot00000000000000# Resources ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of the resource. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Resource**](Resource.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewResources `func NewResources() *Resources` NewResources instantiates a new Resources object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewResourcesWithDefaults `func NewResourcesWithDefaults() *Resources` NewResourcesWithDefaults instantiates a new Resources object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Resources) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Resources) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Resources) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Resources) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Resources) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Resources) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Resources) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Resources) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Resources) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Resources) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Resources) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Resources) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Resources) GetItems() []Resource` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Resources) GetItemsOk() (*[]Resource, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Resources) SetItems(v []Resource)` SetItems sets Items field to given value. ### HasItems `func (o *Resources) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ResourcesUsers.md000066400000000000000000000064351465267054300254360ustar00rootroot00000000000000# ResourcesUsers ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of the resource. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Resource**](Resource.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewResourcesUsers `func NewResourcesUsers() *ResourcesUsers` NewResourcesUsers instantiates a new ResourcesUsers object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewResourcesUsersWithDefaults `func NewResourcesUsersWithDefaults() *ResourcesUsers` NewResourcesUsersWithDefaults instantiates a new ResourcesUsers object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *ResourcesUsers) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *ResourcesUsers) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *ResourcesUsers) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *ResourcesUsers) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *ResourcesUsers) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ResourcesUsers) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ResourcesUsers) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *ResourcesUsers) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *ResourcesUsers) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *ResourcesUsers) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *ResourcesUsers) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *ResourcesUsers) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *ResourcesUsers) GetItems() []Resource` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *ResourcesUsers) GetItemsOk() (*[]Resource, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *ResourcesUsers) SetItems(v []Resource)` SetItems sets Items field to given value. ### HasItems `func (o *ResourcesUsers) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/S3Bucket.md000066400000000000000000000023021465267054300240520ustar00rootroot00000000000000# S3Bucket ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The name of the S3 bucket. | | ## Methods ### NewS3Bucket `func NewS3Bucket(name string, ) *S3Bucket` NewS3Bucket instantiates a new S3Bucket object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewS3BucketWithDefaults `func NewS3BucketWithDefaults() *S3Bucket` NewS3BucketWithDefaults instantiates a new S3Bucket object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *S3Bucket) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *S3Bucket) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *S3Bucket) SetName(v string)` SetName sets Name field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/S3Key.md000066400000000000000000000072251465267054300233760ustar00rootroot00000000000000# S3Key ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of the resource. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**S3KeyMetadata**](S3KeyMetadata.md) | | [optional] | |**Properties** | [**S3KeyProperties**](S3KeyProperties.md) | | | ## Methods ### NewS3Key `func NewS3Key(properties S3KeyProperties, ) *S3Key` NewS3Key instantiates a new S3Key object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewS3KeyWithDefaults `func NewS3KeyWithDefaults() *S3Key` NewS3KeyWithDefaults instantiates a new S3Key object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *S3Key) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *S3Key) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *S3Key) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *S3Key) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *S3Key) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *S3Key) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *S3Key) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *S3Key) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *S3Key) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *S3Key) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *S3Key) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *S3Key) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *S3Key) GetMetadata() S3KeyMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *S3Key) GetMetadataOk() (*S3KeyMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *S3Key) SetMetadata(v S3KeyMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *S3Key) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *S3Key) GetProperties() S3KeyProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *S3Key) GetPropertiesOk() (*S3KeyProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *S3Key) SetProperties(v S3KeyProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/S3KeyMetadata.md000066400000000000000000000145571465267054300250450ustar00rootroot00000000000000# S3KeyMetadata ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Etag** | Pointer to **string** | Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. | [optional] [readonly] | |**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The time when the S3 key was created. | [optional] [readonly] | |**CreatedBy** | Pointer to **string** | Unique name of the identity that created the resource. | [optional] [readonly] | |**CreatedByUserId** | Pointer to **string** | The unique ID of the user who created the S3 key. | [optional] [readonly] | |**LastModifiedDate** | Pointer to [**time.Time**](time.Time.md) | The last time the S3 key was modified. | [optional] [readonly] | |**LastModifiedBy** | Pointer to **string** | Unique name of the identity that last modified the S3 key. | [optional] [readonly] | |**LastModifiedByUserId** | Pointer to **string** | The unique ID of the user who last modified the S3 key. | [optional] [readonly] | ## Methods ### NewS3KeyMetadata `func NewS3KeyMetadata() *S3KeyMetadata` NewS3KeyMetadata instantiates a new S3KeyMetadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewS3KeyMetadataWithDefaults `func NewS3KeyMetadataWithDefaults() *S3KeyMetadata` NewS3KeyMetadataWithDefaults instantiates a new S3KeyMetadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetEtag `func (o *S3KeyMetadata) GetEtag() string` GetEtag returns the Etag field if non-nil, zero value otherwise. ### GetEtagOk `func (o *S3KeyMetadata) GetEtagOk() (*string, bool)` GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEtag `func (o *S3KeyMetadata) SetEtag(v string)` SetEtag sets Etag field to given value. ### HasEtag `func (o *S3KeyMetadata) HasEtag() bool` HasEtag returns a boolean if a field has been set. ### GetCreatedDate `func (o *S3KeyMetadata) GetCreatedDate() time.Time` GetCreatedDate returns the CreatedDate field if non-nil, zero value otherwise. ### GetCreatedDateOk `func (o *S3KeyMetadata) GetCreatedDateOk() (*time.Time, bool)` GetCreatedDateOk returns a tuple with the CreatedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedDate `func (o *S3KeyMetadata) SetCreatedDate(v time.Time)` SetCreatedDate sets CreatedDate field to given value. ### HasCreatedDate `func (o *S3KeyMetadata) HasCreatedDate() bool` HasCreatedDate returns a boolean if a field has been set. ### GetCreatedBy `func (o *S3KeyMetadata) GetCreatedBy() string` GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. ### GetCreatedByOk `func (o *S3KeyMetadata) GetCreatedByOk() (*string, bool)` GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedBy `func (o *S3KeyMetadata) SetCreatedBy(v string)` SetCreatedBy sets CreatedBy field to given value. ### HasCreatedBy `func (o *S3KeyMetadata) HasCreatedBy() bool` HasCreatedBy returns a boolean if a field has been set. ### GetCreatedByUserId `func (o *S3KeyMetadata) GetCreatedByUserId() string` GetCreatedByUserId returns the CreatedByUserId field if non-nil, zero value otherwise. ### GetCreatedByUserIdOk `func (o *S3KeyMetadata) GetCreatedByUserIdOk() (*string, bool)` GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedByUserId `func (o *S3KeyMetadata) SetCreatedByUserId(v string)` SetCreatedByUserId sets CreatedByUserId field to given value. ### HasCreatedByUserId `func (o *S3KeyMetadata) HasCreatedByUserId() bool` HasCreatedByUserId returns a boolean if a field has been set. ### GetLastModifiedDate `func (o *S3KeyMetadata) GetLastModifiedDate() time.Time` GetLastModifiedDate returns the LastModifiedDate field if non-nil, zero value otherwise. ### GetLastModifiedDateOk `func (o *S3KeyMetadata) GetLastModifiedDateOk() (*time.Time, bool)` GetLastModifiedDateOk returns a tuple with the LastModifiedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastModifiedDate `func (o *S3KeyMetadata) SetLastModifiedDate(v time.Time)` SetLastModifiedDate sets LastModifiedDate field to given value. ### HasLastModifiedDate `func (o *S3KeyMetadata) HasLastModifiedDate() bool` HasLastModifiedDate returns a boolean if a field has been set. ### GetLastModifiedBy `func (o *S3KeyMetadata) GetLastModifiedBy() string` GetLastModifiedBy returns the LastModifiedBy field if non-nil, zero value otherwise. ### GetLastModifiedByOk `func (o *S3KeyMetadata) GetLastModifiedByOk() (*string, bool)` GetLastModifiedByOk returns a tuple with the LastModifiedBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastModifiedBy `func (o *S3KeyMetadata) SetLastModifiedBy(v string)` SetLastModifiedBy sets LastModifiedBy field to given value. ### HasLastModifiedBy `func (o *S3KeyMetadata) HasLastModifiedBy() bool` HasLastModifiedBy returns a boolean if a field has been set. ### GetLastModifiedByUserId `func (o *S3KeyMetadata) GetLastModifiedByUserId() string` GetLastModifiedByUserId returns the LastModifiedByUserId field if non-nil, zero value otherwise. ### GetLastModifiedByUserIdOk `func (o *S3KeyMetadata) GetLastModifiedByUserIdOk() (*string, bool)` GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastModifiedByUserId `func (o *S3KeyMetadata) SetLastModifiedByUserId(v string)` SetLastModifiedByUserId sets LastModifiedByUserId field to given value. ### HasLastModifiedByUserId `func (o *S3KeyMetadata) HasLastModifiedByUserId() bool` HasLastModifiedByUserId returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/S3KeyProperties.md000066400000000000000000000041761465267054300254550ustar00rootroot00000000000000# S3KeyProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**SecretKey** | Pointer to **string** | Secret of the S3 key. | [optional] [readonly] | |**Active** | Pointer to **bool** | Denotes weather the S3 key is active. | [optional] | ## Methods ### NewS3KeyProperties `func NewS3KeyProperties() *S3KeyProperties` NewS3KeyProperties instantiates a new S3KeyProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewS3KeyPropertiesWithDefaults `func NewS3KeyPropertiesWithDefaults() *S3KeyProperties` NewS3KeyPropertiesWithDefaults instantiates a new S3KeyProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetSecretKey `func (o *S3KeyProperties) GetSecretKey() string` GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. ### GetSecretKeyOk `func (o *S3KeyProperties) GetSecretKeyOk() (*string, bool)` GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSecretKey `func (o *S3KeyProperties) SetSecretKey(v string)` SetSecretKey sets SecretKey field to given value. ### HasSecretKey `func (o *S3KeyProperties) HasSecretKey() bool` HasSecretKey returns a boolean if a field has been set. ### GetActive `func (o *S3KeyProperties) GetActive() bool` GetActive returns the Active field if non-nil, zero value otherwise. ### GetActiveOk `func (o *S3KeyProperties) GetActiveOk() (*bool, bool)` GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetActive `func (o *S3KeyProperties) SetActive(v bool)` SetActive sets Active field to given value. ### HasActive `func (o *S3KeyProperties) HasActive() bool` HasActive returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/S3Keys.md000066400000000000000000000060661465267054300235630ustar00rootroot00000000000000# S3Keys ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of the resource. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]S3Key**](S3Key.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewS3Keys `func NewS3Keys() *S3Keys` NewS3Keys instantiates a new S3Keys object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewS3KeysWithDefaults `func NewS3KeysWithDefaults() *S3Keys` NewS3KeysWithDefaults instantiates a new S3Keys object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *S3Keys) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *S3Keys) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *S3Keys) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *S3Keys) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *S3Keys) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *S3Keys) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *S3Keys) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *S3Keys) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *S3Keys) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *S3Keys) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *S3Keys) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *S3Keys) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *S3Keys) GetItems() []S3Key` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *S3Keys) GetItemsOk() (*[]S3Key, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *S3Keys) SetItems(v []S3Key)` SetItems sets Items field to given value. ### HasItems `func (o *S3Keys) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/S3ObjectStorageSSO.md000066400000000000000000000027771465267054300257750ustar00rootroot00000000000000# S3ObjectStorageSSO ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**SsoUrl** | Pointer to **string** | The S3 object storage single sign on url | [optional] [readonly] | ## Methods ### NewS3ObjectStorageSSO `func NewS3ObjectStorageSSO() *S3ObjectStorageSSO` NewS3ObjectStorageSSO instantiates a new S3ObjectStorageSSO object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewS3ObjectStorageSSOWithDefaults `func NewS3ObjectStorageSSOWithDefaults() *S3ObjectStorageSSO` NewS3ObjectStorageSSOWithDefaults instantiates a new S3ObjectStorageSSO object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetSsoUrl `func (o *S3ObjectStorageSSO) GetSsoUrl() string` GetSsoUrl returns the SsoUrl field if non-nil, zero value otherwise. ### GetSsoUrlOk `func (o *S3ObjectStorageSSO) GetSsoUrlOk() (*string, bool)` GetSsoUrlOk returns a tuple with the SsoUrl field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSsoUrl `func (o *S3ObjectStorageSSO) SetSsoUrl(v string)` SetSsoUrl sets SsoUrl field to given value. ### HasSsoUrl `func (o *S3ObjectStorageSSO) HasSsoUrl() bool` HasSsoUrl returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Server.md000066400000000000000000000106501465267054300237020ustar00rootroot00000000000000# Server ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**ServerProperties**](ServerProperties.md) | | | |**Entities** | Pointer to [**ServerEntities**](ServerEntities.md) | | [optional] | ## Methods ### NewServer `func NewServer(properties ServerProperties, ) *Server` NewServer instantiates a new Server object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewServerWithDefaults `func NewServerWithDefaults() *Server` NewServerWithDefaults instantiates a new Server object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Server) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Server) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Server) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Server) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Server) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Server) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Server) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Server) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Server) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Server) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Server) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Server) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Server) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Server) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Server) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Server) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Server) GetProperties() ServerProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Server) GetPropertiesOk() (*ServerProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Server) SetProperties(v ServerProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *Server) GetEntities() ServerEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *Server) GetEntitiesOk() (*ServerEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *Server) SetEntities(v ServerEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *Server) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ServerEntities.md000066400000000000000000000052461465267054300254140ustar00rootroot00000000000000# ServerEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Cdroms** | Pointer to [**Cdroms**](Cdroms.md) | | [optional] | |**Volumes** | Pointer to [**AttachedVolumes**](AttachedVolumes.md) | | [optional] | |**Nics** | Pointer to [**Nics**](Nics.md) | | [optional] | ## Methods ### NewServerEntities `func NewServerEntities() *ServerEntities` NewServerEntities instantiates a new ServerEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewServerEntitiesWithDefaults `func NewServerEntitiesWithDefaults() *ServerEntities` NewServerEntitiesWithDefaults instantiates a new ServerEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetCdroms `func (o *ServerEntities) GetCdroms() Cdroms` GetCdroms returns the Cdroms field if non-nil, zero value otherwise. ### GetCdromsOk `func (o *ServerEntities) GetCdromsOk() (*Cdroms, bool)` GetCdromsOk returns a tuple with the Cdroms field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCdroms `func (o *ServerEntities) SetCdroms(v Cdroms)` SetCdroms sets Cdroms field to given value. ### HasCdroms `func (o *ServerEntities) HasCdroms() bool` HasCdroms returns a boolean if a field has been set. ### GetVolumes `func (o *ServerEntities) GetVolumes() AttachedVolumes` GetVolumes returns the Volumes field if non-nil, zero value otherwise. ### GetVolumesOk `func (o *ServerEntities) GetVolumesOk() (*AttachedVolumes, bool)` GetVolumesOk returns a tuple with the Volumes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetVolumes `func (o *ServerEntities) SetVolumes(v AttachedVolumes)` SetVolumes sets Volumes field to given value. ### HasVolumes `func (o *ServerEntities) HasVolumes() bool` HasVolumes returns a boolean if a field has been set. ### GetNics `func (o *ServerEntities) GetNics() Nics` GetNics returns the Nics field if non-nil, zero value otherwise. ### GetNicsOk `func (o *ServerEntities) GetNicsOk() (*Nics, bool)` GetNicsOk returns a tuple with the Nics field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNics `func (o *ServerEntities) SetNics(v Nics)` SetNics sets Nics field to given value. ### HasNics `func (o *ServerEntities) HasNics() bool` HasNics returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/ServerProperties.md000066400000000000000000000221631465267054300257610ustar00rootroot00000000000000# ServerProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**TemplateUuid** | Pointer to **string** | The ID of the template for creating a CUBE server; the available templates for CUBE servers can be found on the templates resource. | [optional] | |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**Hostname** | Pointer to **string** | The hostname of the resource. Allowed characters are a-z, 0-9 and - (minus). Hostname should not start with minus and should not be longer than 63 characters. | [optional] | |**Cores** | Pointer to **int32** | The total number of cores for the enterprise server. | [optional] | |**Ram** | Pointer to **int32** | The memory size for the enterprise server in MB, such as 2048. Size must be specified in multiples of 256 MB with a minimum of 256 MB; however, if you set ramHotPlug to TRUE then you must use a minimum of 1024 MB. If you set the RAM size more than 240GB, then ramHotPlug will be set to FALSE and can not be set to TRUE unless RAM size not set to less than 240GB. | [optional] | |**AvailabilityZone** | Pointer to **string** | The availability zone in which the server should be provisioned. | [optional] | |**VmState** | Pointer to **string** | Status of the virtual machine. | [optional] [readonly] | |**BootCdrom** | Pointer to [**ResourceReference**](ResourceReference.md) | | [optional] | |**BootVolume** | Pointer to [**ResourceReference**](ResourceReference.md) | | [optional] | |**CpuFamily** | Pointer to **string** | CPU architecture on which server gets provisioned; not all CPU architectures are available in all datacenter regions; available CPU architectures can be retrieved from the datacenter resource; must not be provided for CUBE and VCPU servers. | [optional] | |**Type** | Pointer to **string** | Server type: CUBE, ENTERPRISE or VCPU. | [optional] | ## Methods ### NewServerProperties `func NewServerProperties() *ServerProperties` NewServerProperties instantiates a new ServerProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewServerPropertiesWithDefaults `func NewServerPropertiesWithDefaults() *ServerProperties` NewServerPropertiesWithDefaults instantiates a new ServerProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetTemplateUuid `func (o *ServerProperties) GetTemplateUuid() string` GetTemplateUuid returns the TemplateUuid field if non-nil, zero value otherwise. ### GetTemplateUuidOk `func (o *ServerProperties) GetTemplateUuidOk() (*string, bool)` GetTemplateUuidOk returns a tuple with the TemplateUuid field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTemplateUuid `func (o *ServerProperties) SetTemplateUuid(v string)` SetTemplateUuid sets TemplateUuid field to given value. ### HasTemplateUuid `func (o *ServerProperties) HasTemplateUuid() bool` HasTemplateUuid returns a boolean if a field has been set. ### GetName `func (o *ServerProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *ServerProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *ServerProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *ServerProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetHostname `func (o *ServerProperties) GetHostname() string` GetHostname returns the Hostname field if non-nil, zero value otherwise. ### GetHostnameOk `func (o *ServerProperties) GetHostnameOk() (*string, bool)` GetHostnameOk returns a tuple with the Hostname field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHostname `func (o *ServerProperties) SetHostname(v string)` SetHostname sets Hostname field to given value. ### HasHostname `func (o *ServerProperties) HasHostname() bool` HasHostname returns a boolean if a field has been set. ### GetCores `func (o *ServerProperties) GetCores() int32` GetCores returns the Cores field if non-nil, zero value otherwise. ### GetCoresOk `func (o *ServerProperties) GetCoresOk() (*int32, bool)` GetCoresOk returns a tuple with the Cores field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCores `func (o *ServerProperties) SetCores(v int32)` SetCores sets Cores field to given value. ### HasCores `func (o *ServerProperties) HasCores() bool` HasCores returns a boolean if a field has been set. ### GetRam `func (o *ServerProperties) GetRam() int32` GetRam returns the Ram field if non-nil, zero value otherwise. ### GetRamOk `func (o *ServerProperties) GetRamOk() (*int32, bool)` GetRamOk returns a tuple with the Ram field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRam `func (o *ServerProperties) SetRam(v int32)` SetRam sets Ram field to given value. ### HasRam `func (o *ServerProperties) HasRam() bool` HasRam returns a boolean if a field has been set. ### GetAvailabilityZone `func (o *ServerProperties) GetAvailabilityZone() string` GetAvailabilityZone returns the AvailabilityZone field if non-nil, zero value otherwise. ### GetAvailabilityZoneOk `func (o *ServerProperties) GetAvailabilityZoneOk() (*string, bool)` GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAvailabilityZone `func (o *ServerProperties) SetAvailabilityZone(v string)` SetAvailabilityZone sets AvailabilityZone field to given value. ### HasAvailabilityZone `func (o *ServerProperties) HasAvailabilityZone() bool` HasAvailabilityZone returns a boolean if a field has been set. ### GetVmState `func (o *ServerProperties) GetVmState() string` GetVmState returns the VmState field if non-nil, zero value otherwise. ### GetVmStateOk `func (o *ServerProperties) GetVmStateOk() (*string, bool)` GetVmStateOk returns a tuple with the VmState field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetVmState `func (o *ServerProperties) SetVmState(v string)` SetVmState sets VmState field to given value. ### HasVmState `func (o *ServerProperties) HasVmState() bool` HasVmState returns a boolean if a field has been set. ### GetBootCdrom `func (o *ServerProperties) GetBootCdrom() ResourceReference` GetBootCdrom returns the BootCdrom field if non-nil, zero value otherwise. ### GetBootCdromOk `func (o *ServerProperties) GetBootCdromOk() (*ResourceReference, bool)` GetBootCdromOk returns a tuple with the BootCdrom field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBootCdrom `func (o *ServerProperties) SetBootCdrom(v ResourceReference)` SetBootCdrom sets BootCdrom field to given value. ### HasBootCdrom `func (o *ServerProperties) HasBootCdrom() bool` HasBootCdrom returns a boolean if a field has been set. ### GetBootVolume `func (o *ServerProperties) GetBootVolume() ResourceReference` GetBootVolume returns the BootVolume field if non-nil, zero value otherwise. ### GetBootVolumeOk `func (o *ServerProperties) GetBootVolumeOk() (*ResourceReference, bool)` GetBootVolumeOk returns a tuple with the BootVolume field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBootVolume `func (o *ServerProperties) SetBootVolume(v ResourceReference)` SetBootVolume sets BootVolume field to given value. ### HasBootVolume `func (o *ServerProperties) HasBootVolume() bool` HasBootVolume returns a boolean if a field has been set. ### GetCpuFamily `func (o *ServerProperties) GetCpuFamily() string` GetCpuFamily returns the CpuFamily field if non-nil, zero value otherwise. ### GetCpuFamilyOk `func (o *ServerProperties) GetCpuFamilyOk() (*string, bool)` GetCpuFamilyOk returns a tuple with the CpuFamily field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuFamily `func (o *ServerProperties) SetCpuFamily(v string)` SetCpuFamily sets CpuFamily field to given value. ### HasCpuFamily `func (o *ServerProperties) HasCpuFamily() bool` HasCpuFamily returns a boolean if a field has been set. ### GetType `func (o *ServerProperties) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *ServerProperties) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *ServerProperties) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *ServerProperties) HasType() bool` HasType returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Servers.md000066400000000000000000000117171465267054300240720ustar00rootroot00000000000000# Servers ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Server**](Server.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewServers `func NewServers() *Servers` NewServers instantiates a new Servers object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewServersWithDefaults `func NewServersWithDefaults() *Servers` NewServersWithDefaults instantiates a new Servers object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Servers) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Servers) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Servers) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Servers) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Servers) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Servers) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Servers) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Servers) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Servers) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Servers) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Servers) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Servers) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Servers) GetItems() []Server` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Servers) GetItemsOk() (*[]Server, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Servers) SetItems(v []Server)` SetItems sets Items field to given value. ### HasItems `func (o *Servers) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *Servers) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *Servers) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *Servers) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *Servers) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *Servers) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *Servers) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *Servers) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *Servers) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *Servers) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *Servers) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *Servers) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *Servers) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Snapshot.md000066400000000000000000000075151465267054300242410ustar00rootroot00000000000000# Snapshot ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**SnapshotProperties**](SnapshotProperties.md) | | | ## Methods ### NewSnapshot `func NewSnapshot(properties SnapshotProperties, ) *Snapshot` NewSnapshot instantiates a new Snapshot object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewSnapshotWithDefaults `func NewSnapshotWithDefaults() *Snapshot` NewSnapshotWithDefaults instantiates a new Snapshot object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Snapshot) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Snapshot) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Snapshot) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Snapshot) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Snapshot) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Snapshot) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Snapshot) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Snapshot) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Snapshot) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Snapshot) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Snapshot) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Snapshot) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Snapshot) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Snapshot) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Snapshot) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Snapshot) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Snapshot) GetProperties() SnapshotProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Snapshot) GetPropertiesOk() (*SnapshotProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Snapshot) SetProperties(v SnapshotProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/SnapshotProperties.md000066400000000000000000000340011465267054300263040ustar00rootroot00000000000000# SnapshotProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**Description** | Pointer to **string** | Human-readable description. | [optional] | |**Location** | Pointer to **string** | Location of that image/snapshot. | [optional] [readonly] | |**Size** | Pointer to **float32** | The size of the image in GB. | [optional] [readonly] | |**SecAuthProtection** | Pointer to **bool** | Boolean value representing if the snapshot requires extra protection, such as two-step verification. | [optional] | |**CpuHotPlug** | Pointer to **bool** | Hot-plug capable CPU (no reboot required). | [optional] | |**CpuHotUnplug** | Pointer to **bool** | Hot-unplug capable CPU (no reboot required). | [optional] | |**RamHotPlug** | Pointer to **bool** | Hot-plug capable RAM (no reboot required). | [optional] | |**RamHotUnplug** | Pointer to **bool** | Hot-unplug capable RAM (no reboot required). | [optional] | |**NicHotPlug** | Pointer to **bool** | Hot-plug capable NIC (no reboot required). | [optional] | |**NicHotUnplug** | Pointer to **bool** | Hot-unplug capable NIC (no reboot required). | [optional] | |**DiscVirtioHotPlug** | Pointer to **bool** | Hot-plug capable Virt-IO drive (no reboot required). | [optional] | |**DiscVirtioHotUnplug** | Pointer to **bool** | Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. | [optional] | |**DiscScsiHotPlug** | Pointer to **bool** | Hot-plug capable SCSI drive (no reboot required). | [optional] | |**ExposeSerial** | Pointer to **bool** | If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior | [optional] [default to false]| |**DiscScsiHotUnplug** | Pointer to **bool** | Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines. | [optional] | |**LicenceType** | Pointer to **string** | OS type of this snapshot | [optional] | ## Methods ### NewSnapshotProperties `func NewSnapshotProperties() *SnapshotProperties` NewSnapshotProperties instantiates a new SnapshotProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewSnapshotPropertiesWithDefaults `func NewSnapshotPropertiesWithDefaults() *SnapshotProperties` NewSnapshotPropertiesWithDefaults instantiates a new SnapshotProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *SnapshotProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *SnapshotProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *SnapshotProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *SnapshotProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetDescription `func (o *SnapshotProperties) GetDescription() string` GetDescription returns the Description field if non-nil, zero value otherwise. ### GetDescriptionOk `func (o *SnapshotProperties) GetDescriptionOk() (*string, bool)` GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDescription `func (o *SnapshotProperties) SetDescription(v string)` SetDescription sets Description field to given value. ### HasDescription `func (o *SnapshotProperties) HasDescription() bool` HasDescription returns a boolean if a field has been set. ### GetLocation `func (o *SnapshotProperties) GetLocation() string` GetLocation returns the Location field if non-nil, zero value otherwise. ### GetLocationOk `func (o *SnapshotProperties) GetLocationOk() (*string, bool)` GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLocation `func (o *SnapshotProperties) SetLocation(v string)` SetLocation sets Location field to given value. ### HasLocation `func (o *SnapshotProperties) HasLocation() bool` HasLocation returns a boolean if a field has been set. ### GetSize `func (o *SnapshotProperties) GetSize() float32` GetSize returns the Size field if non-nil, zero value otherwise. ### GetSizeOk `func (o *SnapshotProperties) GetSizeOk() (*float32, bool)` GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSize `func (o *SnapshotProperties) SetSize(v float32)` SetSize sets Size field to given value. ### HasSize `func (o *SnapshotProperties) HasSize() bool` HasSize returns a boolean if a field has been set. ### GetSecAuthProtection `func (o *SnapshotProperties) GetSecAuthProtection() bool` GetSecAuthProtection returns the SecAuthProtection field if non-nil, zero value otherwise. ### GetSecAuthProtectionOk `func (o *SnapshotProperties) GetSecAuthProtectionOk() (*bool, bool)` GetSecAuthProtectionOk returns a tuple with the SecAuthProtection field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSecAuthProtection `func (o *SnapshotProperties) SetSecAuthProtection(v bool)` SetSecAuthProtection sets SecAuthProtection field to given value. ### HasSecAuthProtection `func (o *SnapshotProperties) HasSecAuthProtection() bool` HasSecAuthProtection returns a boolean if a field has been set. ### GetCpuHotPlug `func (o *SnapshotProperties) GetCpuHotPlug() bool` GetCpuHotPlug returns the CpuHotPlug field if non-nil, zero value otherwise. ### GetCpuHotPlugOk `func (o *SnapshotProperties) GetCpuHotPlugOk() (*bool, bool)` GetCpuHotPlugOk returns a tuple with the CpuHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuHotPlug `func (o *SnapshotProperties) SetCpuHotPlug(v bool)` SetCpuHotPlug sets CpuHotPlug field to given value. ### HasCpuHotPlug `func (o *SnapshotProperties) HasCpuHotPlug() bool` HasCpuHotPlug returns a boolean if a field has been set. ### GetCpuHotUnplug `func (o *SnapshotProperties) GetCpuHotUnplug() bool` GetCpuHotUnplug returns the CpuHotUnplug field if non-nil, zero value otherwise. ### GetCpuHotUnplugOk `func (o *SnapshotProperties) GetCpuHotUnplugOk() (*bool, bool)` GetCpuHotUnplugOk returns a tuple with the CpuHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuHotUnplug `func (o *SnapshotProperties) SetCpuHotUnplug(v bool)` SetCpuHotUnplug sets CpuHotUnplug field to given value. ### HasCpuHotUnplug `func (o *SnapshotProperties) HasCpuHotUnplug() bool` HasCpuHotUnplug returns a boolean if a field has been set. ### GetRamHotPlug `func (o *SnapshotProperties) GetRamHotPlug() bool` GetRamHotPlug returns the RamHotPlug field if non-nil, zero value otherwise. ### GetRamHotPlugOk `func (o *SnapshotProperties) GetRamHotPlugOk() (*bool, bool)` GetRamHotPlugOk returns a tuple with the RamHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRamHotPlug `func (o *SnapshotProperties) SetRamHotPlug(v bool)` SetRamHotPlug sets RamHotPlug field to given value. ### HasRamHotPlug `func (o *SnapshotProperties) HasRamHotPlug() bool` HasRamHotPlug returns a boolean if a field has been set. ### GetRamHotUnplug `func (o *SnapshotProperties) GetRamHotUnplug() bool` GetRamHotUnplug returns the RamHotUnplug field if non-nil, zero value otherwise. ### GetRamHotUnplugOk `func (o *SnapshotProperties) GetRamHotUnplugOk() (*bool, bool)` GetRamHotUnplugOk returns a tuple with the RamHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRamHotUnplug `func (o *SnapshotProperties) SetRamHotUnplug(v bool)` SetRamHotUnplug sets RamHotUnplug field to given value. ### HasRamHotUnplug `func (o *SnapshotProperties) HasRamHotUnplug() bool` HasRamHotUnplug returns a boolean if a field has been set. ### GetNicHotPlug `func (o *SnapshotProperties) GetNicHotPlug() bool` GetNicHotPlug returns the NicHotPlug field if non-nil, zero value otherwise. ### GetNicHotPlugOk `func (o *SnapshotProperties) GetNicHotPlugOk() (*bool, bool)` GetNicHotPlugOk returns a tuple with the NicHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNicHotPlug `func (o *SnapshotProperties) SetNicHotPlug(v bool)` SetNicHotPlug sets NicHotPlug field to given value. ### HasNicHotPlug `func (o *SnapshotProperties) HasNicHotPlug() bool` HasNicHotPlug returns a boolean if a field has been set. ### GetNicHotUnplug `func (o *SnapshotProperties) GetNicHotUnplug() bool` GetNicHotUnplug returns the NicHotUnplug field if non-nil, zero value otherwise. ### GetNicHotUnplugOk `func (o *SnapshotProperties) GetNicHotUnplugOk() (*bool, bool)` GetNicHotUnplugOk returns a tuple with the NicHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNicHotUnplug `func (o *SnapshotProperties) SetNicHotUnplug(v bool)` SetNicHotUnplug sets NicHotUnplug field to given value. ### HasNicHotUnplug `func (o *SnapshotProperties) HasNicHotUnplug() bool` HasNicHotUnplug returns a boolean if a field has been set. ### GetDiscVirtioHotPlug `func (o *SnapshotProperties) GetDiscVirtioHotPlug() bool` GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field if non-nil, zero value otherwise. ### GetDiscVirtioHotPlugOk `func (o *SnapshotProperties) GetDiscVirtioHotPlugOk() (*bool, bool)` GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDiscVirtioHotPlug `func (o *SnapshotProperties) SetDiscVirtioHotPlug(v bool)` SetDiscVirtioHotPlug sets DiscVirtioHotPlug field to given value. ### HasDiscVirtioHotPlug `func (o *SnapshotProperties) HasDiscVirtioHotPlug() bool` HasDiscVirtioHotPlug returns a boolean if a field has been set. ### GetDiscVirtioHotUnplug `func (o *SnapshotProperties) GetDiscVirtioHotUnplug() bool` GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field if non-nil, zero value otherwise. ### GetDiscVirtioHotUnplugOk `func (o *SnapshotProperties) GetDiscVirtioHotUnplugOk() (*bool, bool)` GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDiscVirtioHotUnplug `func (o *SnapshotProperties) SetDiscVirtioHotUnplug(v bool)` SetDiscVirtioHotUnplug sets DiscVirtioHotUnplug field to given value. ### HasDiscVirtioHotUnplug `func (o *SnapshotProperties) HasDiscVirtioHotUnplug() bool` HasDiscVirtioHotUnplug returns a boolean if a field has been set. ### GetDiscScsiHotPlug `func (o *SnapshotProperties) GetDiscScsiHotPlug() bool` GetDiscScsiHotPlug returns the DiscScsiHotPlug field if non-nil, zero value otherwise. ### GetDiscScsiHotPlugOk `func (o *SnapshotProperties) GetDiscScsiHotPlugOk() (*bool, bool)` GetDiscScsiHotPlugOk returns a tuple with the DiscScsiHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDiscScsiHotPlug `func (o *SnapshotProperties) SetDiscScsiHotPlug(v bool)` SetDiscScsiHotPlug sets DiscScsiHotPlug field to given value. ### HasDiscScsiHotPlug `func (o *SnapshotProperties) HasDiscScsiHotPlug() bool` HasDiscScsiHotPlug returns a boolean if a field has been set. ### GetExposeSerial `func (o *SnapshotProperties) GetExposeSerial() bool` GetExposeSerial returns the ExposeSerial field if non-nil, zero value otherwise. ### GetExposeSerialOk `func (o *SnapshotProperties) GetExposeSerialOk() (*bool, bool)` GetExposeSerialOk returns a tuple with the ExposeSerial field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExposeSerial `func (o *SnapshotProperties) SetExposeSerial(v bool)` SetExposeSerial sets ExposeSerial field to given value. ### HasExposeSerial `func (o *SnapshotProperties) HasExposeSerial() bool` HasExposeSerial returns a boolean if a field has been set. ### GetDiscScsiHotUnplug `func (o *SnapshotProperties) GetDiscScsiHotUnplug() bool` GetDiscScsiHotUnplug returns the DiscScsiHotUnplug field if non-nil, zero value otherwise. ### GetDiscScsiHotUnplugOk `func (o *SnapshotProperties) GetDiscScsiHotUnplugOk() (*bool, bool)` GetDiscScsiHotUnplugOk returns a tuple with the DiscScsiHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDiscScsiHotUnplug `func (o *SnapshotProperties) SetDiscScsiHotUnplug(v bool)` SetDiscScsiHotUnplug sets DiscScsiHotUnplug field to given value. ### HasDiscScsiHotUnplug `func (o *SnapshotProperties) HasDiscScsiHotUnplug() bool` HasDiscScsiHotUnplug returns a boolean if a field has been set. ### GetLicenceType `func (o *SnapshotProperties) GetLicenceType() string` GetLicenceType returns the LicenceType field if non-nil, zero value otherwise. ### GetLicenceTypeOk `func (o *SnapshotProperties) GetLicenceTypeOk() (*string, bool)` GetLicenceTypeOk returns a tuple with the LicenceType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLicenceType `func (o *SnapshotProperties) SetLicenceType(v string)` SetLicenceType sets LicenceType field to given value. ### HasLicenceType `func (o *SnapshotProperties) HasLicenceType() bool` HasLicenceType returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Snapshots.md000066400000000000000000000062461465267054300244240ustar00rootroot00000000000000# Snapshots ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Snapshot**](Snapshot.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewSnapshots `func NewSnapshots() *Snapshots` NewSnapshots instantiates a new Snapshots object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewSnapshotsWithDefaults `func NewSnapshotsWithDefaults() *Snapshots` NewSnapshotsWithDefaults instantiates a new Snapshots object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Snapshots) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Snapshots) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Snapshots) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Snapshots) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Snapshots) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Snapshots) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Snapshots) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Snapshots) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Snapshots) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Snapshots) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Snapshots) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Snapshots) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Snapshots) GetItems() []Snapshot` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Snapshots) GetItemsOk() (*[]Snapshot, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Snapshots) SetItems(v []Snapshot)` SetItems sets Items field to given value. ### HasItems `func (o *Snapshots) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/TargetGroup.md000066400000000000000000000076751465267054300247140ustar00rootroot00000000000000# TargetGroup ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**TargetGroupProperties**](TargetGroupProperties.md) | | | ## Methods ### NewTargetGroup `func NewTargetGroup(properties TargetGroupProperties, ) *TargetGroup` NewTargetGroup instantiates a new TargetGroup object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTargetGroupWithDefaults `func NewTargetGroupWithDefaults() *TargetGroup` NewTargetGroupWithDefaults instantiates a new TargetGroup object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *TargetGroup) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *TargetGroup) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *TargetGroup) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *TargetGroup) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *TargetGroup) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *TargetGroup) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *TargetGroup) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *TargetGroup) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *TargetGroup) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *TargetGroup) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *TargetGroup) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *TargetGroup) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *TargetGroup) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *TargetGroup) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *TargetGroup) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *TargetGroup) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *TargetGroup) GetProperties() TargetGroupProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *TargetGroup) GetPropertiesOk() (*TargetGroupProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *TargetGroup) SetProperties(v TargetGroupProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/TargetGroupHealthCheck.md000066400000000000000000000067131465267054300267700ustar00rootroot00000000000000# TargetGroupHealthCheck ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**CheckTimeout** | Pointer to **int32** | The maximum time in milliseconds is to wait for a target to respond to a check. For target VMs with a 'Check Interval' set, the smaller of the two values is used once the TCP connection is established. | [optional] | |**CheckInterval** | Pointer to **int32** | The interval in milliseconds between consecutive health checks; the default value is '2000'. | [optional] | |**Retries** | Pointer to **int32** | The maximum number of attempts to reconnect to a target after a connection failure. The valid range is '0 to 65535'; the default value is '3'. | [optional] | ## Methods ### NewTargetGroupHealthCheck `func NewTargetGroupHealthCheck() *TargetGroupHealthCheck` NewTargetGroupHealthCheck instantiates a new TargetGroupHealthCheck object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTargetGroupHealthCheckWithDefaults `func NewTargetGroupHealthCheckWithDefaults() *TargetGroupHealthCheck` NewTargetGroupHealthCheckWithDefaults instantiates a new TargetGroupHealthCheck object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetCheckTimeout `func (o *TargetGroupHealthCheck) GetCheckTimeout() int32` GetCheckTimeout returns the CheckTimeout field if non-nil, zero value otherwise. ### GetCheckTimeoutOk `func (o *TargetGroupHealthCheck) GetCheckTimeoutOk() (*int32, bool)` GetCheckTimeoutOk returns a tuple with the CheckTimeout field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCheckTimeout `func (o *TargetGroupHealthCheck) SetCheckTimeout(v int32)` SetCheckTimeout sets CheckTimeout field to given value. ### HasCheckTimeout `func (o *TargetGroupHealthCheck) HasCheckTimeout() bool` HasCheckTimeout returns a boolean if a field has been set. ### GetCheckInterval `func (o *TargetGroupHealthCheck) GetCheckInterval() int32` GetCheckInterval returns the CheckInterval field if non-nil, zero value otherwise. ### GetCheckIntervalOk `func (o *TargetGroupHealthCheck) GetCheckIntervalOk() (*int32, bool)` GetCheckIntervalOk returns a tuple with the CheckInterval field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCheckInterval `func (o *TargetGroupHealthCheck) SetCheckInterval(v int32)` SetCheckInterval sets CheckInterval field to given value. ### HasCheckInterval `func (o *TargetGroupHealthCheck) HasCheckInterval() bool` HasCheckInterval returns a boolean if a field has been set. ### GetRetries `func (o *TargetGroupHealthCheck) GetRetries() int32` GetRetries returns the Retries field if non-nil, zero value otherwise. ### GetRetriesOk `func (o *TargetGroupHealthCheck) GetRetriesOk() (*int32, bool)` GetRetriesOk returns a tuple with the Retries field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRetries `func (o *TargetGroupHealthCheck) SetRetries(v int32)` SetRetries sets Retries field to given value. ### HasRetries `func (o *TargetGroupHealthCheck) HasRetries() bool` HasRetries returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/TargetGroupHttpHealthCheck.md000066400000000000000000000123011465267054300276160ustar00rootroot00000000000000# TargetGroupHttpHealthCheck ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Path** | Pointer to **string** | The destination URL for HTTP the health check; the default is '/'. | [optional] | |**Method** | Pointer to **string** | The method used for the health check request. | [optional] | |**MatchType** | **string** | Specify the target's response type to match ALB's request. | | |**Response** | **string** | The response returned by the request. It can be a status code or a response body depending on the definition of 'matchType'. | | |**Regex** | Pointer to **bool** | Specifies whether to use a regular expression to parse the response body; the default value is 'FALSE'. By using regular expressions, you can flexibly customize the expected response from a healthy server. | [optional] | |**Negate** | Pointer to **bool** | Specifies whether to negate an individual entry; the default value is 'FALSE'. | [optional] | ## Methods ### NewTargetGroupHttpHealthCheck `func NewTargetGroupHttpHealthCheck(matchType string, response string, ) *TargetGroupHttpHealthCheck` NewTargetGroupHttpHealthCheck instantiates a new TargetGroupHttpHealthCheck object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTargetGroupHttpHealthCheckWithDefaults `func NewTargetGroupHttpHealthCheckWithDefaults() *TargetGroupHttpHealthCheck` NewTargetGroupHttpHealthCheckWithDefaults instantiates a new TargetGroupHttpHealthCheck object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetPath `func (o *TargetGroupHttpHealthCheck) GetPath() string` GetPath returns the Path field if non-nil, zero value otherwise. ### GetPathOk `func (o *TargetGroupHttpHealthCheck) GetPathOk() (*string, bool)` GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPath `func (o *TargetGroupHttpHealthCheck) SetPath(v string)` SetPath sets Path field to given value. ### HasPath `func (o *TargetGroupHttpHealthCheck) HasPath() bool` HasPath returns a boolean if a field has been set. ### GetMethod `func (o *TargetGroupHttpHealthCheck) GetMethod() string` GetMethod returns the Method field if non-nil, zero value otherwise. ### GetMethodOk `func (o *TargetGroupHttpHealthCheck) GetMethodOk() (*string, bool)` GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMethod `func (o *TargetGroupHttpHealthCheck) SetMethod(v string)` SetMethod sets Method field to given value. ### HasMethod `func (o *TargetGroupHttpHealthCheck) HasMethod() bool` HasMethod returns a boolean if a field has been set. ### GetMatchType `func (o *TargetGroupHttpHealthCheck) GetMatchType() string` GetMatchType returns the MatchType field if non-nil, zero value otherwise. ### GetMatchTypeOk `func (o *TargetGroupHttpHealthCheck) GetMatchTypeOk() (*string, bool)` GetMatchTypeOk returns a tuple with the MatchType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMatchType `func (o *TargetGroupHttpHealthCheck) SetMatchType(v string)` SetMatchType sets MatchType field to given value. ### GetResponse `func (o *TargetGroupHttpHealthCheck) GetResponse() string` GetResponse returns the Response field if non-nil, zero value otherwise. ### GetResponseOk `func (o *TargetGroupHttpHealthCheck) GetResponseOk() (*string, bool)` GetResponseOk returns a tuple with the Response field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetResponse `func (o *TargetGroupHttpHealthCheck) SetResponse(v string)` SetResponse sets Response field to given value. ### GetRegex `func (o *TargetGroupHttpHealthCheck) GetRegex() bool` GetRegex returns the Regex field if non-nil, zero value otherwise. ### GetRegexOk `func (o *TargetGroupHttpHealthCheck) GetRegexOk() (*bool, bool)` GetRegexOk returns a tuple with the Regex field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRegex `func (o *TargetGroupHttpHealthCheck) SetRegex(v bool)` SetRegex sets Regex field to given value. ### HasRegex `func (o *TargetGroupHttpHealthCheck) HasRegex() bool` HasRegex returns a boolean if a field has been set. ### GetNegate `func (o *TargetGroupHttpHealthCheck) GetNegate() bool` GetNegate returns the Negate field if non-nil, zero value otherwise. ### GetNegateOk `func (o *TargetGroupHttpHealthCheck) GetNegateOk() (*bool, bool)` GetNegateOk returns a tuple with the Negate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNegate `func (o *TargetGroupHttpHealthCheck) SetNegate(v bool)` SetNegate sets Negate field to given value. ### HasNegate `func (o *TargetGroupHttpHealthCheck) HasNegate() bool` HasNegate returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/TargetGroupProperties.md000066400000000000000000000144741465267054300267640ustar00rootroot00000000000000# TargetGroupProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The target group name. | | |**Algorithm** | **string** | The balancing algorithm. A balancing algorithm consists of predefined rules with the logic that a load balancer uses to distribute network traffic between servers. - **Round Robin**: Targets are served alternately according to their weighting. - **Least Connection**: The target with the least active connection is served. - **Random**: The targets are served based on a consistent pseudorandom algorithm. - **Source IP**: It is ensured that the same client IP address reaches the same target. | | |**Protocol** | **string** | The forwarding protocol. Only the value 'HTTP' is allowed. | | |**ProtocolVersion** | Pointer to **string** | The forwarding protocol version. Value is ignored when protocol is not 'HTTP'. | [optional] | |**Targets** | Pointer to [**[]TargetGroupTarget**](TargetGroupTarget.md) | Array of items in the collection. | [optional] | |**HealthCheck** | Pointer to [**TargetGroupHealthCheck**](TargetGroupHealthCheck.md) | | [optional] | |**HttpHealthCheck** | Pointer to [**TargetGroupHttpHealthCheck**](TargetGroupHttpHealthCheck.md) | | [optional] | ## Methods ### NewTargetGroupProperties `func NewTargetGroupProperties(name string, algorithm string, protocol string, ) *TargetGroupProperties` NewTargetGroupProperties instantiates a new TargetGroupProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTargetGroupPropertiesWithDefaults `func NewTargetGroupPropertiesWithDefaults() *TargetGroupProperties` NewTargetGroupPropertiesWithDefaults instantiates a new TargetGroupProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *TargetGroupProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *TargetGroupProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *TargetGroupProperties) SetName(v string)` SetName sets Name field to given value. ### GetAlgorithm `func (o *TargetGroupProperties) GetAlgorithm() string` GetAlgorithm returns the Algorithm field if non-nil, zero value otherwise. ### GetAlgorithmOk `func (o *TargetGroupProperties) GetAlgorithmOk() (*string, bool)` GetAlgorithmOk returns a tuple with the Algorithm field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAlgorithm `func (o *TargetGroupProperties) SetAlgorithm(v string)` SetAlgorithm sets Algorithm field to given value. ### GetProtocol `func (o *TargetGroupProperties) GetProtocol() string` GetProtocol returns the Protocol field if non-nil, zero value otherwise. ### GetProtocolOk `func (o *TargetGroupProperties) GetProtocolOk() (*string, bool)` GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProtocol `func (o *TargetGroupProperties) SetProtocol(v string)` SetProtocol sets Protocol field to given value. ### GetProtocolVersion `func (o *TargetGroupProperties) GetProtocolVersion() string` GetProtocolVersion returns the ProtocolVersion field if non-nil, zero value otherwise. ### GetProtocolVersionOk `func (o *TargetGroupProperties) GetProtocolVersionOk() (*string, bool)` GetProtocolVersionOk returns a tuple with the ProtocolVersion field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProtocolVersion `func (o *TargetGroupProperties) SetProtocolVersion(v string)` SetProtocolVersion sets ProtocolVersion field to given value. ### HasProtocolVersion `func (o *TargetGroupProperties) HasProtocolVersion() bool` HasProtocolVersion returns a boolean if a field has been set. ### GetTargets `func (o *TargetGroupProperties) GetTargets() []TargetGroupTarget` GetTargets returns the Targets field if non-nil, zero value otherwise. ### GetTargetsOk `func (o *TargetGroupProperties) GetTargetsOk() (*[]TargetGroupTarget, bool)` GetTargetsOk returns a tuple with the Targets field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTargets `func (o *TargetGroupProperties) SetTargets(v []TargetGroupTarget)` SetTargets sets Targets field to given value. ### HasTargets `func (o *TargetGroupProperties) HasTargets() bool` HasTargets returns a boolean if a field has been set. ### GetHealthCheck `func (o *TargetGroupProperties) GetHealthCheck() TargetGroupHealthCheck` GetHealthCheck returns the HealthCheck field if non-nil, zero value otherwise. ### GetHealthCheckOk `func (o *TargetGroupProperties) GetHealthCheckOk() (*TargetGroupHealthCheck, bool)` GetHealthCheckOk returns a tuple with the HealthCheck field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHealthCheck `func (o *TargetGroupProperties) SetHealthCheck(v TargetGroupHealthCheck)` SetHealthCheck sets HealthCheck field to given value. ### HasHealthCheck `func (o *TargetGroupProperties) HasHealthCheck() bool` HasHealthCheck returns a boolean if a field has been set. ### GetHttpHealthCheck `func (o *TargetGroupProperties) GetHttpHealthCheck() TargetGroupHttpHealthCheck` GetHttpHealthCheck returns the HttpHealthCheck field if non-nil, zero value otherwise. ### GetHttpHealthCheckOk `func (o *TargetGroupProperties) GetHttpHealthCheckOk() (*TargetGroupHttpHealthCheck, bool)` GetHttpHealthCheckOk returns a tuple with the HttpHealthCheck field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHttpHealthCheck `func (o *TargetGroupProperties) SetHttpHealthCheck(v TargetGroupHttpHealthCheck)` SetHttpHealthCheck sets HttpHealthCheck field to given value. ### HasHttpHealthCheck `func (o *TargetGroupProperties) HasHttpHealthCheck() bool` HasHttpHealthCheck returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/TargetGroupPut.md000066400000000000000000000064351465267054300253760ustar00rootroot00000000000000# TargetGroupPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Properties** | [**TargetGroupProperties**](TargetGroupProperties.md) | | | ## Methods ### NewTargetGroupPut `func NewTargetGroupPut(properties TargetGroupProperties, ) *TargetGroupPut` NewTargetGroupPut instantiates a new TargetGroupPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTargetGroupPutWithDefaults `func NewTargetGroupPutWithDefaults() *TargetGroupPut` NewTargetGroupPutWithDefaults instantiates a new TargetGroupPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *TargetGroupPut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *TargetGroupPut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *TargetGroupPut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *TargetGroupPut) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *TargetGroupPut) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *TargetGroupPut) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *TargetGroupPut) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *TargetGroupPut) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *TargetGroupPut) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *TargetGroupPut) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *TargetGroupPut) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *TargetGroupPut) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetProperties `func (o *TargetGroupPut) GetProperties() TargetGroupProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *TargetGroupPut) GetPropertiesOk() (*TargetGroupProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *TargetGroupPut) SetProperties(v TargetGroupProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/TargetGroupTarget.md000066400000000000000000000130101465267054300260370ustar00rootroot00000000000000# TargetGroupTarget ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Ip** | **string** | The IP address of the balanced target. | | |**Port** | **int32** | The port of the balanced target service; the valid range is 1 to 65535. | | |**Weight** | **int32** | The traffic is distributed proportionally to target weight, which is the ratio of the total weight of all targets. A target with higher weight receives a larger share of traffic. The valid range is from 0 to 256; the default value is '1'. Targets with a weight of '0' do not participate in load balancing but still accept persistent connections. We recommend using values in the middle range to leave room for later adjustments. | | |**ProxyProtocol** | Pointer to **string** | Proxy protocol version. | [optional] [default to "none"]| |**HealthCheckEnabled** | Pointer to **bool** | When the health check is enabled, the target is available only when it accepts regular TCP or HTTP connection attempts for state checking. The state check consists of one connection attempt with the target's address and port. The default value is 'TRUE'. | [optional] | |**MaintenanceEnabled** | Pointer to **bool** | When the maintenance mode is enabled, the target is prevented from receiving traffic; the default value is 'FALSE'. | [optional] | ## Methods ### NewTargetGroupTarget `func NewTargetGroupTarget(ip string, port int32, weight int32, ) *TargetGroupTarget` NewTargetGroupTarget instantiates a new TargetGroupTarget object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTargetGroupTargetWithDefaults `func NewTargetGroupTargetWithDefaults() *TargetGroupTarget` NewTargetGroupTargetWithDefaults instantiates a new TargetGroupTarget object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetIp `func (o *TargetGroupTarget) GetIp() string` GetIp returns the Ip field if non-nil, zero value otherwise. ### GetIpOk `func (o *TargetGroupTarget) GetIpOk() (*string, bool)` GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIp `func (o *TargetGroupTarget) SetIp(v string)` SetIp sets Ip field to given value. ### GetPort `func (o *TargetGroupTarget) GetPort() int32` GetPort returns the Port field if non-nil, zero value otherwise. ### GetPortOk `func (o *TargetGroupTarget) GetPortOk() (*int32, bool)` GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPort `func (o *TargetGroupTarget) SetPort(v int32)` SetPort sets Port field to given value. ### GetWeight `func (o *TargetGroupTarget) GetWeight() int32` GetWeight returns the Weight field if non-nil, zero value otherwise. ### GetWeightOk `func (o *TargetGroupTarget) GetWeightOk() (*int32, bool)` GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetWeight `func (o *TargetGroupTarget) SetWeight(v int32)` SetWeight sets Weight field to given value. ### GetProxyProtocol `func (o *TargetGroupTarget) GetProxyProtocol() string` GetProxyProtocol returns the ProxyProtocol field if non-nil, zero value otherwise. ### GetProxyProtocolOk `func (o *TargetGroupTarget) GetProxyProtocolOk() (*string, bool)` GetProxyProtocolOk returns a tuple with the ProxyProtocol field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProxyProtocol `func (o *TargetGroupTarget) SetProxyProtocol(v string)` SetProxyProtocol sets ProxyProtocol field to given value. ### HasProxyProtocol `func (o *TargetGroupTarget) HasProxyProtocol() bool` HasProxyProtocol returns a boolean if a field has been set. ### GetHealthCheckEnabled `func (o *TargetGroupTarget) GetHealthCheckEnabled() bool` GetHealthCheckEnabled returns the HealthCheckEnabled field if non-nil, zero value otherwise. ### GetHealthCheckEnabledOk `func (o *TargetGroupTarget) GetHealthCheckEnabledOk() (*bool, bool)` GetHealthCheckEnabledOk returns a tuple with the HealthCheckEnabled field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHealthCheckEnabled `func (o *TargetGroupTarget) SetHealthCheckEnabled(v bool)` SetHealthCheckEnabled sets HealthCheckEnabled field to given value. ### HasHealthCheckEnabled `func (o *TargetGroupTarget) HasHealthCheckEnabled() bool` HasHealthCheckEnabled returns a boolean if a field has been set. ### GetMaintenanceEnabled `func (o *TargetGroupTarget) GetMaintenanceEnabled() bool` GetMaintenanceEnabled returns the MaintenanceEnabled field if non-nil, zero value otherwise. ### GetMaintenanceEnabledOk `func (o *TargetGroupTarget) GetMaintenanceEnabledOk() (*bool, bool)` GetMaintenanceEnabledOk returns a tuple with the MaintenanceEnabled field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMaintenanceEnabled `func (o *TargetGroupTarget) SetMaintenanceEnabled(v bool)` SetMaintenanceEnabled sets MaintenanceEnabled field to given value. ### HasMaintenanceEnabled `func (o *TargetGroupTarget) HasMaintenanceEnabled() bool` HasMaintenanceEnabled returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/TargetGroups.md000066400000000000000000000124331465267054300250630ustar00rootroot00000000000000# TargetGroups ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]TargetGroup**](TargetGroup.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset, specified in the request (if not is specified, 0 is used by default). | [optional] | |**Limit** | Pointer to **float32** | The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewTargetGroups `func NewTargetGroups() *TargetGroups` NewTargetGroups instantiates a new TargetGroups object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTargetGroupsWithDefaults `func NewTargetGroupsWithDefaults() *TargetGroups` NewTargetGroupsWithDefaults instantiates a new TargetGroups object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *TargetGroups) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *TargetGroups) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *TargetGroups) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *TargetGroups) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *TargetGroups) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *TargetGroups) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *TargetGroups) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *TargetGroups) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *TargetGroups) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *TargetGroups) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *TargetGroups) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *TargetGroups) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *TargetGroups) GetItems() []TargetGroup` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *TargetGroups) GetItemsOk() (*[]TargetGroup, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *TargetGroups) SetItems(v []TargetGroup)` SetItems sets Items field to given value. ### HasItems `func (o *TargetGroups) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *TargetGroups) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *TargetGroups) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *TargetGroups) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *TargetGroups) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *TargetGroups) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *TargetGroups) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *TargetGroups) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *TargetGroups) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *TargetGroups) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *TargetGroups) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *TargetGroups) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *TargetGroups) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/TargetPortRange.md000066400000000000000000000041011465267054300254760ustar00rootroot00000000000000# TargetPortRange ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Start** | Pointer to **int32** | Target port range start associated with the NAT Gateway rule. | [optional] | |**End** | Pointer to **int32** | Target port range end associated with the NAT Gateway rule. | [optional] | ## Methods ### NewTargetPortRange `func NewTargetPortRange() *TargetPortRange` NewTargetPortRange instantiates a new TargetPortRange object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTargetPortRangeWithDefaults `func NewTargetPortRangeWithDefaults() *TargetPortRange` NewTargetPortRangeWithDefaults instantiates a new TargetPortRange object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetStart `func (o *TargetPortRange) GetStart() int32` GetStart returns the Start field if non-nil, zero value otherwise. ### GetStartOk `func (o *TargetPortRange) GetStartOk() (*int32, bool)` GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStart `func (o *TargetPortRange) SetStart(v int32)` SetStart sets Start field to given value. ### HasStart `func (o *TargetPortRange) HasStart() bool` HasStart returns a boolean if a field has been set. ### GetEnd `func (o *TargetPortRange) GetEnd() int32` GetEnd returns the End field if non-nil, zero value otherwise. ### GetEndOk `func (o *TargetPortRange) GetEndOk() (*int32, bool)` GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEnd `func (o *TargetPortRange) SetEnd(v int32)` SetEnd sets End field to given value. ### HasEnd `func (o *TargetPortRange) HasEnd() bool` HasEnd returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Template.md000066400000000000000000000075211465267054300242120ustar00rootroot00000000000000# Template ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**TemplateProperties**](TemplateProperties.md) | | | ## Methods ### NewTemplate `func NewTemplate(properties TemplateProperties, ) *Template` NewTemplate instantiates a new Template object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTemplateWithDefaults `func NewTemplateWithDefaults() *Template` NewTemplateWithDefaults instantiates a new Template object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Template) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Template) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Template) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Template) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Template) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Template) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Template) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Template) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Template) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Template) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Template) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Template) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Template) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Template) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Template) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Template) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Template) GetProperties() TemplateProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Template) GetPropertiesOk() (*TemplateProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Template) SetProperties(v TemplateProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/TemplateProperties.md000066400000000000000000000056471465267054300262760ustar00rootroot00000000000000# TemplateProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | **string** | The resource name. | | |**Cores** | **float32** | The CPU cores count. | | |**Ram** | **float32** | The RAM size in MB. | | |**StorageSize** | **float32** | The storage size in GB. | | ## Methods ### NewTemplateProperties `func NewTemplateProperties(name string, cores float32, ram float32, storageSize float32, ) *TemplateProperties` NewTemplateProperties instantiates a new TemplateProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTemplatePropertiesWithDefaults `func NewTemplatePropertiesWithDefaults() *TemplateProperties` NewTemplatePropertiesWithDefaults instantiates a new TemplateProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *TemplateProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *TemplateProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *TemplateProperties) SetName(v string)` SetName sets Name field to given value. ### GetCores `func (o *TemplateProperties) GetCores() float32` GetCores returns the Cores field if non-nil, zero value otherwise. ### GetCoresOk `func (o *TemplateProperties) GetCoresOk() (*float32, bool)` GetCoresOk returns a tuple with the Cores field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCores `func (o *TemplateProperties) SetCores(v float32)` SetCores sets Cores field to given value. ### GetRam `func (o *TemplateProperties) GetRam() float32` GetRam returns the Ram field if non-nil, zero value otherwise. ### GetRamOk `func (o *TemplateProperties) GetRamOk() (*float32, bool)` GetRamOk returns a tuple with the Ram field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRam `func (o *TemplateProperties) SetRam(v float32)` SetRam sets Ram field to given value. ### GetStorageSize `func (o *TemplateProperties) GetStorageSize() float32` GetStorageSize returns the StorageSize field if non-nil, zero value otherwise. ### GetStorageSizeOk `func (o *TemplateProperties) GetStorageSizeOk() (*float32, bool)` GetStorageSizeOk returns a tuple with the StorageSize field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStorageSize `func (o *TemplateProperties) SetStorageSize(v float32)` SetStorageSize sets StorageSize field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Templates.md000066400000000000000000000062521465267054300243750ustar00rootroot00000000000000# Templates ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Template**](Template.md) | Array of items in the collection. | [optional] [readonly] | ## Methods ### NewTemplates `func NewTemplates() *Templates` NewTemplates instantiates a new Templates object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTemplatesWithDefaults `func NewTemplatesWithDefaults() *Templates` NewTemplatesWithDefaults instantiates a new Templates object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Templates) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Templates) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Templates) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Templates) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Templates) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Templates) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Templates) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Templates) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Templates) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Templates) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Templates) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Templates) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Templates) GetItems() []Template` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Templates) GetItemsOk() (*[]Template, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Templates) SetItems(v []Template)` SetItems sets Items field to given value. ### HasItems `func (o *Templates) HasItems() bool` HasItems returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Token.md000066400000000000000000000024371465267054300235200ustar00rootroot00000000000000# Token ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Token** | Pointer to **string** | The jwToken for the server. | [optional] [readonly] | ## Methods ### NewToken `func NewToken() *Token` NewToken instantiates a new Token object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewTokenWithDefaults `func NewTokenWithDefaults() *Token` NewTokenWithDefaults instantiates a new Token object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetToken `func (o *Token) GetToken() string` GetToken returns the Token field if non-nil, zero value otherwise. ### GetTokenOk `func (o *Token) GetTokenOk() (*string, bool)` GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetToken `func (o *Token) SetToken(v string)` SetToken sets Token field to given value. ### HasToken `func (o *Token) HasToken() bool` HasToken returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Type.md000066400000000000000000000001751465267054300233560ustar00rootroot00000000000000# Type ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/User.md000066400000000000000000000104221465267054300233470ustar00rootroot00000000000000# User ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**UserMetadata**](UserMetadata.md) | | [optional] | |**Properties** | [**UserProperties**](UserProperties.md) | | | |**Entities** | Pointer to [**UsersEntities**](UsersEntities.md) | | [optional] | ## Methods ### NewUser `func NewUser(properties UserProperties, ) *User` NewUser instantiates a new User object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewUserWithDefaults `func NewUserWithDefaults() *User` NewUserWithDefaults instantiates a new User object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *User) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *User) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *User) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *User) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *User) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *User) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *User) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *User) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *User) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *User) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *User) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *User) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *User) GetMetadata() UserMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *User) GetMetadataOk() (*UserMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *User) SetMetadata(v UserMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *User) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *User) GetProperties() UserProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *User) GetPropertiesOk() (*UserProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *User) SetProperties(v UserProperties)` SetProperties sets Properties field to given value. ### GetEntities `func (o *User) GetEntities() UsersEntities` GetEntities returns the Entities field if non-nil, zero value otherwise. ### GetEntitiesOk `func (o *User) GetEntitiesOk() (*UsersEntities, bool)` GetEntitiesOk returns a tuple with the Entities field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEntities `func (o *User) SetEntities(v UsersEntities)` SetEntities sets Entities field to given value. ### HasEntities `func (o *User) HasEntities() bool` HasEntities returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/UserMetadata.md000066400000000000000000000060261465267054300250150ustar00rootroot00000000000000# UserMetadata ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Etag** | Pointer to **string** | Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. | [optional] [readonly] | |**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The time the user was created. | [optional] [readonly] | |**LastLogin** | Pointer to [**time.Time**](time.Time.md) | The time of the last login by the user. | [optional] [readonly] | ## Methods ### NewUserMetadata `func NewUserMetadata() *UserMetadata` NewUserMetadata instantiates a new UserMetadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewUserMetadataWithDefaults `func NewUserMetadataWithDefaults() *UserMetadata` NewUserMetadataWithDefaults instantiates a new UserMetadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetEtag `func (o *UserMetadata) GetEtag() string` GetEtag returns the Etag field if non-nil, zero value otherwise. ### GetEtagOk `func (o *UserMetadata) GetEtagOk() (*string, bool)` GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEtag `func (o *UserMetadata) SetEtag(v string)` SetEtag sets Etag field to given value. ### HasEtag `func (o *UserMetadata) HasEtag() bool` HasEtag returns a boolean if a field has been set. ### GetCreatedDate `func (o *UserMetadata) GetCreatedDate() time.Time` GetCreatedDate returns the CreatedDate field if non-nil, zero value otherwise. ### GetCreatedDateOk `func (o *UserMetadata) GetCreatedDateOk() (*time.Time, bool)` GetCreatedDateOk returns a tuple with the CreatedDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedDate `func (o *UserMetadata) SetCreatedDate(v time.Time)` SetCreatedDate sets CreatedDate field to given value. ### HasCreatedDate `func (o *UserMetadata) HasCreatedDate() bool` HasCreatedDate returns a boolean if a field has been set. ### GetLastLogin `func (o *UserMetadata) GetLastLogin() time.Time` GetLastLogin returns the LastLogin field if non-nil, zero value otherwise. ### GetLastLoginOk `func (o *UserMetadata) GetLastLoginOk() (*time.Time, bool)` GetLastLoginOk returns a tuple with the LastLogin field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastLogin `func (o *UserMetadata) SetLastLogin(v time.Time)` SetLastLogin sets LastLogin field to given value. ### HasLastLogin `func (o *UserMetadata) HasLastLogin() bool` HasLastLogin returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/UserPost.md000066400000000000000000000025211465267054300242160ustar00rootroot00000000000000# UserPost ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Properties** | [**UserPropertiesPost**](UserPropertiesPost.md) | | | ## Methods ### NewUserPost `func NewUserPost(properties UserPropertiesPost, ) *UserPost` NewUserPost instantiates a new UserPost object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewUserPostWithDefaults `func NewUserPostWithDefaults() *UserPost` NewUserPostWithDefaults instantiates a new UserPost object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetProperties `func (o *UserPost) GetProperties() UserPropertiesPost` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *UserPost) GetPropertiesOk() (*UserPropertiesPost, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *UserPost) SetProperties(v UserPropertiesPost)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/UserProperties.md000066400000000000000000000147511465267054300254350ustar00rootroot00000000000000# UserProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Firstname** | Pointer to **string** | The first name of the user. | [optional] | |**Lastname** | Pointer to **string** | The last name of the user. | [optional] | |**Email** | Pointer to **string** | The email address of the user. | [optional] | |**Administrator** | Pointer to **bool** | Indicates if the user has admin rights. | [optional] | |**ForceSecAuth** | Pointer to **bool** | Indicates if secure authentication should be forced on the user. | [optional] | |**SecAuthActive** | Pointer to **bool** | Indicates if secure authentication is active for the user. | [optional] | |**S3CanonicalUserId** | Pointer to **string** | Canonical (S3) ID of the user for a given identity. | [optional] | |**Active** | Pointer to **bool** | Indicates if the user is active. | [optional] | ## Methods ### NewUserProperties `func NewUserProperties() *UserProperties` NewUserProperties instantiates a new UserProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewUserPropertiesWithDefaults `func NewUserPropertiesWithDefaults() *UserProperties` NewUserPropertiesWithDefaults instantiates a new UserProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetFirstname `func (o *UserProperties) GetFirstname() string` GetFirstname returns the Firstname field if non-nil, zero value otherwise. ### GetFirstnameOk `func (o *UserProperties) GetFirstnameOk() (*string, bool)` GetFirstnameOk returns a tuple with the Firstname field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFirstname `func (o *UserProperties) SetFirstname(v string)` SetFirstname sets Firstname field to given value. ### HasFirstname `func (o *UserProperties) HasFirstname() bool` HasFirstname returns a boolean if a field has been set. ### GetLastname `func (o *UserProperties) GetLastname() string` GetLastname returns the Lastname field if non-nil, zero value otherwise. ### GetLastnameOk `func (o *UserProperties) GetLastnameOk() (*string, bool)` GetLastnameOk returns a tuple with the Lastname field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastname `func (o *UserProperties) SetLastname(v string)` SetLastname sets Lastname field to given value. ### HasLastname `func (o *UserProperties) HasLastname() bool` HasLastname returns a boolean if a field has been set. ### GetEmail `func (o *UserProperties) GetEmail() string` GetEmail returns the Email field if non-nil, zero value otherwise. ### GetEmailOk `func (o *UserProperties) GetEmailOk() (*string, bool)` GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEmail `func (o *UserProperties) SetEmail(v string)` SetEmail sets Email field to given value. ### HasEmail `func (o *UserProperties) HasEmail() bool` HasEmail returns a boolean if a field has been set. ### GetAdministrator `func (o *UserProperties) GetAdministrator() bool` GetAdministrator returns the Administrator field if non-nil, zero value otherwise. ### GetAdministratorOk `func (o *UserProperties) GetAdministratorOk() (*bool, bool)` GetAdministratorOk returns a tuple with the Administrator field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAdministrator `func (o *UserProperties) SetAdministrator(v bool)` SetAdministrator sets Administrator field to given value. ### HasAdministrator `func (o *UserProperties) HasAdministrator() bool` HasAdministrator returns a boolean if a field has been set. ### GetForceSecAuth `func (o *UserProperties) GetForceSecAuth() bool` GetForceSecAuth returns the ForceSecAuth field if non-nil, zero value otherwise. ### GetForceSecAuthOk `func (o *UserProperties) GetForceSecAuthOk() (*bool, bool)` GetForceSecAuthOk returns a tuple with the ForceSecAuth field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetForceSecAuth `func (o *UserProperties) SetForceSecAuth(v bool)` SetForceSecAuth sets ForceSecAuth field to given value. ### HasForceSecAuth `func (o *UserProperties) HasForceSecAuth() bool` HasForceSecAuth returns a boolean if a field has been set. ### GetSecAuthActive `func (o *UserProperties) GetSecAuthActive() bool` GetSecAuthActive returns the SecAuthActive field if non-nil, zero value otherwise. ### GetSecAuthActiveOk `func (o *UserProperties) GetSecAuthActiveOk() (*bool, bool)` GetSecAuthActiveOk returns a tuple with the SecAuthActive field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSecAuthActive `func (o *UserProperties) SetSecAuthActive(v bool)` SetSecAuthActive sets SecAuthActive field to given value. ### HasSecAuthActive `func (o *UserProperties) HasSecAuthActive() bool` HasSecAuthActive returns a boolean if a field has been set. ### GetS3CanonicalUserId `func (o *UserProperties) GetS3CanonicalUserId() string` GetS3CanonicalUserId returns the S3CanonicalUserId field if non-nil, zero value otherwise. ### GetS3CanonicalUserIdOk `func (o *UserProperties) GetS3CanonicalUserIdOk() (*string, bool)` GetS3CanonicalUserIdOk returns a tuple with the S3CanonicalUserId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetS3CanonicalUserId `func (o *UserProperties) SetS3CanonicalUserId(v string)` SetS3CanonicalUserId sets S3CanonicalUserId field to given value. ### HasS3CanonicalUserId `func (o *UserProperties) HasS3CanonicalUserId() bool` HasS3CanonicalUserId returns a boolean if a field has been set. ### GetActive `func (o *UserProperties) GetActive() bool` GetActive returns the Active field if non-nil, zero value otherwise. ### GetActiveOk `func (o *UserProperties) GetActiveOk() (*bool, bool)` GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetActive `func (o *UserProperties) SetActive(v bool)` SetActive sets Active field to given value. ### HasActive `func (o *UserProperties) HasActive() bool` HasActive returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/UserPropertiesPost.md000066400000000000000000000147401465267054300263010ustar00rootroot00000000000000# UserPropertiesPost ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Firstname** | Pointer to **string** | The first name of the user. | [optional] | |**Lastname** | Pointer to **string** | The last name of the user. | [optional] | |**Email** | Pointer to **string** | The email address of the user. | [optional] | |**Administrator** | Pointer to **bool** | Indicates if the user has admin rights. | [optional] | |**ForceSecAuth** | Pointer to **bool** | Indicates if secure authentication should be forced on the user. | [optional] | |**SecAuthActive** | Pointer to **bool** | Indicates if secure authentication is active for the user. | [optional] | |**Password** | Pointer to **string** | User password. | [optional] | |**Active** | Pointer to **bool** | Indicates if the user is active. | [optional] | ## Methods ### NewUserPropertiesPost `func NewUserPropertiesPost() *UserPropertiesPost` NewUserPropertiesPost instantiates a new UserPropertiesPost object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewUserPropertiesPostWithDefaults `func NewUserPropertiesPostWithDefaults() *UserPropertiesPost` NewUserPropertiesPostWithDefaults instantiates a new UserPropertiesPost object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetFirstname `func (o *UserPropertiesPost) GetFirstname() string` GetFirstname returns the Firstname field if non-nil, zero value otherwise. ### GetFirstnameOk `func (o *UserPropertiesPost) GetFirstnameOk() (*string, bool)` GetFirstnameOk returns a tuple with the Firstname field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFirstname `func (o *UserPropertiesPost) SetFirstname(v string)` SetFirstname sets Firstname field to given value. ### HasFirstname `func (o *UserPropertiesPost) HasFirstname() bool` HasFirstname returns a boolean if a field has been set. ### GetLastname `func (o *UserPropertiesPost) GetLastname() string` GetLastname returns the Lastname field if non-nil, zero value otherwise. ### GetLastnameOk `func (o *UserPropertiesPost) GetLastnameOk() (*string, bool)` GetLastnameOk returns a tuple with the Lastname field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastname `func (o *UserPropertiesPost) SetLastname(v string)` SetLastname sets Lastname field to given value. ### HasLastname `func (o *UserPropertiesPost) HasLastname() bool` HasLastname returns a boolean if a field has been set. ### GetEmail `func (o *UserPropertiesPost) GetEmail() string` GetEmail returns the Email field if non-nil, zero value otherwise. ### GetEmailOk `func (o *UserPropertiesPost) GetEmailOk() (*string, bool)` GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEmail `func (o *UserPropertiesPost) SetEmail(v string)` SetEmail sets Email field to given value. ### HasEmail `func (o *UserPropertiesPost) HasEmail() bool` HasEmail returns a boolean if a field has been set. ### GetAdministrator `func (o *UserPropertiesPost) GetAdministrator() bool` GetAdministrator returns the Administrator field if non-nil, zero value otherwise. ### GetAdministratorOk `func (o *UserPropertiesPost) GetAdministratorOk() (*bool, bool)` GetAdministratorOk returns a tuple with the Administrator field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAdministrator `func (o *UserPropertiesPost) SetAdministrator(v bool)` SetAdministrator sets Administrator field to given value. ### HasAdministrator `func (o *UserPropertiesPost) HasAdministrator() bool` HasAdministrator returns a boolean if a field has been set. ### GetForceSecAuth `func (o *UserPropertiesPost) GetForceSecAuth() bool` GetForceSecAuth returns the ForceSecAuth field if non-nil, zero value otherwise. ### GetForceSecAuthOk `func (o *UserPropertiesPost) GetForceSecAuthOk() (*bool, bool)` GetForceSecAuthOk returns a tuple with the ForceSecAuth field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetForceSecAuth `func (o *UserPropertiesPost) SetForceSecAuth(v bool)` SetForceSecAuth sets ForceSecAuth field to given value. ### HasForceSecAuth `func (o *UserPropertiesPost) HasForceSecAuth() bool` HasForceSecAuth returns a boolean if a field has been set. ### GetSecAuthActive `func (o *UserPropertiesPost) GetSecAuthActive() bool` GetSecAuthActive returns the SecAuthActive field if non-nil, zero value otherwise. ### GetSecAuthActiveOk `func (o *UserPropertiesPost) GetSecAuthActiveOk() (*bool, bool)` GetSecAuthActiveOk returns a tuple with the SecAuthActive field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSecAuthActive `func (o *UserPropertiesPost) SetSecAuthActive(v bool)` SetSecAuthActive sets SecAuthActive field to given value. ### HasSecAuthActive `func (o *UserPropertiesPost) HasSecAuthActive() bool` HasSecAuthActive returns a boolean if a field has been set. ### GetPassword `func (o *UserPropertiesPost) GetPassword() string` GetPassword returns the Password field if non-nil, zero value otherwise. ### GetPasswordOk `func (o *UserPropertiesPost) GetPasswordOk() (*string, bool)` GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPassword `func (o *UserPropertiesPost) SetPassword(v string)` SetPassword sets Password field to given value. ### HasPassword `func (o *UserPropertiesPost) HasPassword() bool` HasPassword returns a boolean if a field has been set. ### GetActive `func (o *UserPropertiesPost) GetActive() bool` GetActive returns the Active field if non-nil, zero value otherwise. ### GetActiveOk `func (o *UserPropertiesPost) GetActiveOk() (*bool, bool)` GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetActive `func (o *UserPropertiesPost) SetActive(v bool)` SetActive sets Active field to given value. ### HasActive `func (o *UserPropertiesPost) HasActive() bool` HasActive returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/UserPropertiesPut.md000066400000000000000000000146731465267054300261310ustar00rootroot00000000000000# UserPropertiesPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Firstname** | Pointer to **string** | The first name of the user. | [optional] | |**Lastname** | Pointer to **string** | The last name of the user. | [optional] | |**Email** | Pointer to **string** | The email address of the user. | [optional] | |**Password** | Pointer to **string** | password of the user | [optional] | |**Administrator** | Pointer to **bool** | Indicates if the user has admin rights. | [optional] | |**ForceSecAuth** | Pointer to **bool** | Indicates if secure authentication should be forced on the user. | [optional] | |**SecAuthActive** | Pointer to **bool** | Indicates if secure authentication is active for the user. | [optional] | |**Active** | Pointer to **bool** | Indicates if the user is active. | [optional] | ## Methods ### NewUserPropertiesPut `func NewUserPropertiesPut() *UserPropertiesPut` NewUserPropertiesPut instantiates a new UserPropertiesPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewUserPropertiesPutWithDefaults `func NewUserPropertiesPutWithDefaults() *UserPropertiesPut` NewUserPropertiesPutWithDefaults instantiates a new UserPropertiesPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetFirstname `func (o *UserPropertiesPut) GetFirstname() string` GetFirstname returns the Firstname field if non-nil, zero value otherwise. ### GetFirstnameOk `func (o *UserPropertiesPut) GetFirstnameOk() (*string, bool)` GetFirstnameOk returns a tuple with the Firstname field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFirstname `func (o *UserPropertiesPut) SetFirstname(v string)` SetFirstname sets Firstname field to given value. ### HasFirstname `func (o *UserPropertiesPut) HasFirstname() bool` HasFirstname returns a boolean if a field has been set. ### GetLastname `func (o *UserPropertiesPut) GetLastname() string` GetLastname returns the Lastname field if non-nil, zero value otherwise. ### GetLastnameOk `func (o *UserPropertiesPut) GetLastnameOk() (*string, bool)` GetLastnameOk returns a tuple with the Lastname field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLastname `func (o *UserPropertiesPut) SetLastname(v string)` SetLastname sets Lastname field to given value. ### HasLastname `func (o *UserPropertiesPut) HasLastname() bool` HasLastname returns a boolean if a field has been set. ### GetEmail `func (o *UserPropertiesPut) GetEmail() string` GetEmail returns the Email field if non-nil, zero value otherwise. ### GetEmailOk `func (o *UserPropertiesPut) GetEmailOk() (*string, bool)` GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEmail `func (o *UserPropertiesPut) SetEmail(v string)` SetEmail sets Email field to given value. ### HasEmail `func (o *UserPropertiesPut) HasEmail() bool` HasEmail returns a boolean if a field has been set. ### GetPassword `func (o *UserPropertiesPut) GetPassword() string` GetPassword returns the Password field if non-nil, zero value otherwise. ### GetPasswordOk `func (o *UserPropertiesPut) GetPasswordOk() (*string, bool)` GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPassword `func (o *UserPropertiesPut) SetPassword(v string)` SetPassword sets Password field to given value. ### HasPassword `func (o *UserPropertiesPut) HasPassword() bool` HasPassword returns a boolean if a field has been set. ### GetAdministrator `func (o *UserPropertiesPut) GetAdministrator() bool` GetAdministrator returns the Administrator field if non-nil, zero value otherwise. ### GetAdministratorOk `func (o *UserPropertiesPut) GetAdministratorOk() (*bool, bool)` GetAdministratorOk returns a tuple with the Administrator field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAdministrator `func (o *UserPropertiesPut) SetAdministrator(v bool)` SetAdministrator sets Administrator field to given value. ### HasAdministrator `func (o *UserPropertiesPut) HasAdministrator() bool` HasAdministrator returns a boolean if a field has been set. ### GetForceSecAuth `func (o *UserPropertiesPut) GetForceSecAuth() bool` GetForceSecAuth returns the ForceSecAuth field if non-nil, zero value otherwise. ### GetForceSecAuthOk `func (o *UserPropertiesPut) GetForceSecAuthOk() (*bool, bool)` GetForceSecAuthOk returns a tuple with the ForceSecAuth field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetForceSecAuth `func (o *UserPropertiesPut) SetForceSecAuth(v bool)` SetForceSecAuth sets ForceSecAuth field to given value. ### HasForceSecAuth `func (o *UserPropertiesPut) HasForceSecAuth() bool` HasForceSecAuth returns a boolean if a field has been set. ### GetSecAuthActive `func (o *UserPropertiesPut) GetSecAuthActive() bool` GetSecAuthActive returns the SecAuthActive field if non-nil, zero value otherwise. ### GetSecAuthActiveOk `func (o *UserPropertiesPut) GetSecAuthActiveOk() (*bool, bool)` GetSecAuthActiveOk returns a tuple with the SecAuthActive field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSecAuthActive `func (o *UserPropertiesPut) SetSecAuthActive(v bool)` SetSecAuthActive sets SecAuthActive field to given value. ### HasSecAuthActive `func (o *UserPropertiesPut) HasSecAuthActive() bool` HasSecAuthActive returns a boolean if a field has been set. ### GetActive `func (o *UserPropertiesPut) GetActive() bool` GetActive returns the Active field if non-nil, zero value otherwise. ### GetActiveOk `func (o *UserPropertiesPut) GetActiveOk() (*bool, bool)` GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetActive `func (o *UserPropertiesPut) SetActive(v bool)` SetActive sets Active field to given value. ### HasActive `func (o *UserPropertiesPut) HasActive() bool` HasActive returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/UserPut.md000066400000000000000000000035641465267054300240510ustar00rootroot00000000000000# UserPut ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] | |**Properties** | [**UserPropertiesPut**](UserPropertiesPut.md) | | | ## Methods ### NewUserPut `func NewUserPut(properties UserPropertiesPut, ) *UserPut` NewUserPut instantiates a new UserPut object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewUserPutWithDefaults `func NewUserPutWithDefaults() *UserPut` NewUserPutWithDefaults instantiates a new UserPut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *UserPut) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *UserPut) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *UserPut) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *UserPut) HasId() bool` HasId returns a boolean if a field has been set. ### GetProperties `func (o *UserPut) GetProperties() UserPropertiesPut` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *UserPut) GetPropertiesOk() (*UserPropertiesPut, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *UserPut) SetProperties(v UserPropertiesPut)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Users.md000066400000000000000000000115671465267054300235450ustar00rootroot00000000000000# Users ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]User**](User.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewUsers `func NewUsers() *Users` NewUsers instantiates a new Users object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewUsersWithDefaults `func NewUsersWithDefaults() *Users` NewUsersWithDefaults instantiates a new Users object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Users) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Users) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Users) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Users) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Users) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Users) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Users) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Users) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Users) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Users) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Users) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Users) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Users) GetItems() []User` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Users) GetItemsOk() (*[]User, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Users) SetItems(v []User)` SetItems sets Items field to given value. ### HasItems `func (o *Users) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *Users) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *Users) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *Users) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *Users) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *Users) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *Users) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *Users) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *Users) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *Users) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *Users) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *Users) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *Users) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/UsersEntities.md000066400000000000000000000040411465267054300252370ustar00rootroot00000000000000# UsersEntities ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Owns** | Pointer to [**ResourcesUsers**](ResourcesUsers.md) | | [optional] | |**Groups** | Pointer to [**GroupUsers**](GroupUsers.md) | | [optional] | ## Methods ### NewUsersEntities `func NewUsersEntities() *UsersEntities` NewUsersEntities instantiates a new UsersEntities object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewUsersEntitiesWithDefaults `func NewUsersEntitiesWithDefaults() *UsersEntities` NewUsersEntitiesWithDefaults instantiates a new UsersEntities object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetOwns `func (o *UsersEntities) GetOwns() ResourcesUsers` GetOwns returns the Owns field if non-nil, zero value otherwise. ### GetOwnsOk `func (o *UsersEntities) GetOwnsOk() (*ResourcesUsers, bool)` GetOwnsOk returns a tuple with the Owns field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOwns `func (o *UsersEntities) SetOwns(v ResourcesUsers)` SetOwns sets Owns field to given value. ### HasOwns `func (o *UsersEntities) HasOwns() bool` HasOwns returns a boolean if a field has been set. ### GetGroups `func (o *UsersEntities) GetGroups() GroupUsers` GetGroups returns the Groups field if non-nil, zero value otherwise. ### GetGroupsOk `func (o *UsersEntities) GetGroupsOk() (*GroupUsers, bool)` GetGroupsOk returns a tuple with the Groups field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGroups `func (o *UsersEntities) SetGroups(v GroupUsers)` SetGroups sets Groups field to given value. ### HasGroups `func (o *UsersEntities) HasGroups() bool` HasGroups returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Volume.md000066400000000000000000000074111465267054300237040ustar00rootroot00000000000000# Volume ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | The URL to the object representation (absolute path). | [optional] [readonly] | |**Metadata** | Pointer to [**DatacenterElementMetadata**](DatacenterElementMetadata.md) | | [optional] | |**Properties** | [**VolumeProperties**](VolumeProperties.md) | | | ## Methods ### NewVolume `func NewVolume(properties VolumeProperties, ) *Volume` NewVolume instantiates a new Volume object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewVolumeWithDefaults `func NewVolumeWithDefaults() *Volume` NewVolumeWithDefaults instantiates a new Volume object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Volume) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Volume) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Volume) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Volume) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Volume) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Volume) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Volume) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Volume) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Volume) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Volume) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Volume) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Volume) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetMetadata `func (o *Volume) GetMetadata() DatacenterElementMetadata` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk `func (o *Volume) GetMetadataOk() (*DatacenterElementMetadata, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata `func (o *Volume) SetMetadata(v DatacenterElementMetadata)` SetMetadata sets Metadata field to given value. ### HasMetadata `func (o *Volume) HasMetadata() bool` HasMetadata returns a boolean if a field has been set. ### GetProperties `func (o *Volume) GetProperties() VolumeProperties` GetProperties returns the Properties field if non-nil, zero value otherwise. ### GetPropertiesOk `func (o *Volume) GetPropertiesOk() (*VolumeProperties, bool)` GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProperties `func (o *Volume) SetProperties(v VolumeProperties)` SetProperties sets Properties field to given value. golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/VolumeProperties.md000066400000000000000000000467271465267054300257760ustar00rootroot00000000000000# VolumeProperties ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Name** | Pointer to **string** | The name of the resource. | [optional] | |**Type** | Pointer to **string** | Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server. | [optional] | |**Size** | **float32** | The size of the volume in GB. | | |**AvailabilityZone** | Pointer to **string** | The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD. | [optional] | |**Image** | Pointer to **string** | Image or snapshot ID to be used as template for this volume. | [optional] | |**ImagePassword** | Pointer to **string** | Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9. | [optional] | |**ImageAlias** | Pointer to **string** | | [optional] | |**SshKeys** | Pointer to **[]string** | Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation. | [optional] | |**Bus** | Pointer to **string** | The bus type for this volume; default is VIRTIO. | [optional] | |**LicenceType** | Pointer to **string** | OS type for this volume. | [optional] | |**CpuHotPlug** | Pointer to **bool** | Hot-plug capable CPU (no reboot required). | [optional] | |**RamHotPlug** | Pointer to **bool** | Hot-plug capable RAM (no reboot required). | [optional] | |**NicHotPlug** | Pointer to **bool** | Hot-plug capable NIC (no reboot required). | [optional] | |**NicHotUnplug** | Pointer to **bool** | Hot-unplug capable NIC (no reboot required). | [optional] | |**DiscVirtioHotPlug** | Pointer to **bool** | Hot-plug capable Virt-IO drive (no reboot required). | [optional] | |**DiscVirtioHotUnplug** | Pointer to **bool** | Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. | [optional] | |**ExposeSerial** | Pointer to **bool** | If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior | [optional] [default to false]| |**DeviceNumber** | Pointer to **int64** | The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM. | [optional] [readonly] | |**PciSlot** | Pointer to **int32** | The PCI slot number of the storage volume. Null for volumes, not mounted to a VM. | [optional] [readonly] | |**BackupunitId** | Pointer to **string** | The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property. | [optional] | |**UserData** | Pointer to **string** | The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property. | [optional] | |**BootServer** | Pointer to **string** | The UUID of the attached server. | [optional] [readonly] | |**BootOrder** | Pointer to **NullableString** | Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices. | [optional] [default to "AUTO"]| ## Methods ### NewVolumeProperties `func NewVolumeProperties(size float32, ) *VolumeProperties` NewVolumeProperties instantiates a new VolumeProperties object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewVolumePropertiesWithDefaults `func NewVolumePropertiesWithDefaults() *VolumeProperties` NewVolumePropertiesWithDefaults instantiates a new VolumeProperties object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName `func (o *VolumeProperties) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk `func (o *VolumeProperties) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName `func (o *VolumeProperties) SetName(v string)` SetName sets Name field to given value. ### HasName `func (o *VolumeProperties) HasName() bool` HasName returns a boolean if a field has been set. ### GetType `func (o *VolumeProperties) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *VolumeProperties) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *VolumeProperties) SetType(v string)` SetType sets Type field to given value. ### HasType `func (o *VolumeProperties) HasType() bool` HasType returns a boolean if a field has been set. ### GetSize `func (o *VolumeProperties) GetSize() float32` GetSize returns the Size field if non-nil, zero value otherwise. ### GetSizeOk `func (o *VolumeProperties) GetSizeOk() (*float32, bool)` GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSize `func (o *VolumeProperties) SetSize(v float32)` SetSize sets Size field to given value. ### GetAvailabilityZone `func (o *VolumeProperties) GetAvailabilityZone() string` GetAvailabilityZone returns the AvailabilityZone field if non-nil, zero value otherwise. ### GetAvailabilityZoneOk `func (o *VolumeProperties) GetAvailabilityZoneOk() (*string, bool)` GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAvailabilityZone `func (o *VolumeProperties) SetAvailabilityZone(v string)` SetAvailabilityZone sets AvailabilityZone field to given value. ### HasAvailabilityZone `func (o *VolumeProperties) HasAvailabilityZone() bool` HasAvailabilityZone returns a boolean if a field has been set. ### GetImage `func (o *VolumeProperties) GetImage() string` GetImage returns the Image field if non-nil, zero value otherwise. ### GetImageOk `func (o *VolumeProperties) GetImageOk() (*string, bool)` GetImageOk returns a tuple with the Image field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetImage `func (o *VolumeProperties) SetImage(v string)` SetImage sets Image field to given value. ### HasImage `func (o *VolumeProperties) HasImage() bool` HasImage returns a boolean if a field has been set. ### GetImagePassword `func (o *VolumeProperties) GetImagePassword() string` GetImagePassword returns the ImagePassword field if non-nil, zero value otherwise. ### GetImagePasswordOk `func (o *VolumeProperties) GetImagePasswordOk() (*string, bool)` GetImagePasswordOk returns a tuple with the ImagePassword field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetImagePassword `func (o *VolumeProperties) SetImagePassword(v string)` SetImagePassword sets ImagePassword field to given value. ### HasImagePassword `func (o *VolumeProperties) HasImagePassword() bool` HasImagePassword returns a boolean if a field has been set. ### GetImageAlias `func (o *VolumeProperties) GetImageAlias() string` GetImageAlias returns the ImageAlias field if non-nil, zero value otherwise. ### GetImageAliasOk `func (o *VolumeProperties) GetImageAliasOk() (*string, bool)` GetImageAliasOk returns a tuple with the ImageAlias field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetImageAlias `func (o *VolumeProperties) SetImageAlias(v string)` SetImageAlias sets ImageAlias field to given value. ### HasImageAlias `func (o *VolumeProperties) HasImageAlias() bool` HasImageAlias returns a boolean if a field has been set. ### GetSshKeys `func (o *VolumeProperties) GetSshKeys() []string` GetSshKeys returns the SshKeys field if non-nil, zero value otherwise. ### GetSshKeysOk `func (o *VolumeProperties) GetSshKeysOk() (*[]string, bool)` GetSshKeysOk returns a tuple with the SshKeys field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSshKeys `func (o *VolumeProperties) SetSshKeys(v []string)` SetSshKeys sets SshKeys field to given value. ### HasSshKeys `func (o *VolumeProperties) HasSshKeys() bool` HasSshKeys returns a boolean if a field has been set. ### GetBus `func (o *VolumeProperties) GetBus() string` GetBus returns the Bus field if non-nil, zero value otherwise. ### GetBusOk `func (o *VolumeProperties) GetBusOk() (*string, bool)` GetBusOk returns a tuple with the Bus field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBus `func (o *VolumeProperties) SetBus(v string)` SetBus sets Bus field to given value. ### HasBus `func (o *VolumeProperties) HasBus() bool` HasBus returns a boolean if a field has been set. ### GetLicenceType `func (o *VolumeProperties) GetLicenceType() string` GetLicenceType returns the LicenceType field if non-nil, zero value otherwise. ### GetLicenceTypeOk `func (o *VolumeProperties) GetLicenceTypeOk() (*string, bool)` GetLicenceTypeOk returns a tuple with the LicenceType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLicenceType `func (o *VolumeProperties) SetLicenceType(v string)` SetLicenceType sets LicenceType field to given value. ### HasLicenceType `func (o *VolumeProperties) HasLicenceType() bool` HasLicenceType returns a boolean if a field has been set. ### GetCpuHotPlug `func (o *VolumeProperties) GetCpuHotPlug() bool` GetCpuHotPlug returns the CpuHotPlug field if non-nil, zero value otherwise. ### GetCpuHotPlugOk `func (o *VolumeProperties) GetCpuHotPlugOk() (*bool, bool)` GetCpuHotPlugOk returns a tuple with the CpuHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCpuHotPlug `func (o *VolumeProperties) SetCpuHotPlug(v bool)` SetCpuHotPlug sets CpuHotPlug field to given value. ### HasCpuHotPlug `func (o *VolumeProperties) HasCpuHotPlug() bool` HasCpuHotPlug returns a boolean if a field has been set. ### GetRamHotPlug `func (o *VolumeProperties) GetRamHotPlug() bool` GetRamHotPlug returns the RamHotPlug field if non-nil, zero value otherwise. ### GetRamHotPlugOk `func (o *VolumeProperties) GetRamHotPlugOk() (*bool, bool)` GetRamHotPlugOk returns a tuple with the RamHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRamHotPlug `func (o *VolumeProperties) SetRamHotPlug(v bool)` SetRamHotPlug sets RamHotPlug field to given value. ### HasRamHotPlug `func (o *VolumeProperties) HasRamHotPlug() bool` HasRamHotPlug returns a boolean if a field has been set. ### GetNicHotPlug `func (o *VolumeProperties) GetNicHotPlug() bool` GetNicHotPlug returns the NicHotPlug field if non-nil, zero value otherwise. ### GetNicHotPlugOk `func (o *VolumeProperties) GetNicHotPlugOk() (*bool, bool)` GetNicHotPlugOk returns a tuple with the NicHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNicHotPlug `func (o *VolumeProperties) SetNicHotPlug(v bool)` SetNicHotPlug sets NicHotPlug field to given value. ### HasNicHotPlug `func (o *VolumeProperties) HasNicHotPlug() bool` HasNicHotPlug returns a boolean if a field has been set. ### GetNicHotUnplug `func (o *VolumeProperties) GetNicHotUnplug() bool` GetNicHotUnplug returns the NicHotUnplug field if non-nil, zero value otherwise. ### GetNicHotUnplugOk `func (o *VolumeProperties) GetNicHotUnplugOk() (*bool, bool)` GetNicHotUnplugOk returns a tuple with the NicHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNicHotUnplug `func (o *VolumeProperties) SetNicHotUnplug(v bool)` SetNicHotUnplug sets NicHotUnplug field to given value. ### HasNicHotUnplug `func (o *VolumeProperties) HasNicHotUnplug() bool` HasNicHotUnplug returns a boolean if a field has been set. ### GetDiscVirtioHotPlug `func (o *VolumeProperties) GetDiscVirtioHotPlug() bool` GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field if non-nil, zero value otherwise. ### GetDiscVirtioHotPlugOk `func (o *VolumeProperties) GetDiscVirtioHotPlugOk() (*bool, bool)` GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDiscVirtioHotPlug `func (o *VolumeProperties) SetDiscVirtioHotPlug(v bool)` SetDiscVirtioHotPlug sets DiscVirtioHotPlug field to given value. ### HasDiscVirtioHotPlug `func (o *VolumeProperties) HasDiscVirtioHotPlug() bool` HasDiscVirtioHotPlug returns a boolean if a field has been set. ### GetDiscVirtioHotUnplug `func (o *VolumeProperties) GetDiscVirtioHotUnplug() bool` GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field if non-nil, zero value otherwise. ### GetDiscVirtioHotUnplugOk `func (o *VolumeProperties) GetDiscVirtioHotUnplugOk() (*bool, bool)` GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDiscVirtioHotUnplug `func (o *VolumeProperties) SetDiscVirtioHotUnplug(v bool)` SetDiscVirtioHotUnplug sets DiscVirtioHotUnplug field to given value. ### HasDiscVirtioHotUnplug `func (o *VolumeProperties) HasDiscVirtioHotUnplug() bool` HasDiscVirtioHotUnplug returns a boolean if a field has been set. ### GetExposeSerial `func (o *VolumeProperties) GetExposeSerial() bool` GetExposeSerial returns the ExposeSerial field if non-nil, zero value otherwise. ### GetExposeSerialOk `func (o *VolumeProperties) GetExposeSerialOk() (*bool, bool)` GetExposeSerialOk returns a tuple with the ExposeSerial field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExposeSerial `func (o *VolumeProperties) SetExposeSerial(v bool)` SetExposeSerial sets ExposeSerial field to given value. ### HasExposeSerial `func (o *VolumeProperties) HasExposeSerial() bool` HasExposeSerial returns a boolean if a field has been set. ### GetDeviceNumber `func (o *VolumeProperties) GetDeviceNumber() int64` GetDeviceNumber returns the DeviceNumber field if non-nil, zero value otherwise. ### GetDeviceNumberOk `func (o *VolumeProperties) GetDeviceNumberOk() (*int64, bool)` GetDeviceNumberOk returns a tuple with the DeviceNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDeviceNumber `func (o *VolumeProperties) SetDeviceNumber(v int64)` SetDeviceNumber sets DeviceNumber field to given value. ### HasDeviceNumber `func (o *VolumeProperties) HasDeviceNumber() bool` HasDeviceNumber returns a boolean if a field has been set. ### GetPciSlot `func (o *VolumeProperties) GetPciSlot() int32` GetPciSlot returns the PciSlot field if non-nil, zero value otherwise. ### GetPciSlotOk `func (o *VolumeProperties) GetPciSlotOk() (*int32, bool)` GetPciSlotOk returns a tuple with the PciSlot field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPciSlot `func (o *VolumeProperties) SetPciSlot(v int32)` SetPciSlot sets PciSlot field to given value. ### HasPciSlot `func (o *VolumeProperties) HasPciSlot() bool` HasPciSlot returns a boolean if a field has been set. ### GetBackupunitId `func (o *VolumeProperties) GetBackupunitId() string` GetBackupunitId returns the BackupunitId field if non-nil, zero value otherwise. ### GetBackupunitIdOk `func (o *VolumeProperties) GetBackupunitIdOk() (*string, bool)` GetBackupunitIdOk returns a tuple with the BackupunitId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBackupunitId `func (o *VolumeProperties) SetBackupunitId(v string)` SetBackupunitId sets BackupunitId field to given value. ### HasBackupunitId `func (o *VolumeProperties) HasBackupunitId() bool` HasBackupunitId returns a boolean if a field has been set. ### GetUserData `func (o *VolumeProperties) GetUserData() string` GetUserData returns the UserData field if non-nil, zero value otherwise. ### GetUserDataOk `func (o *VolumeProperties) GetUserDataOk() (*string, bool)` GetUserDataOk returns a tuple with the UserData field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUserData `func (o *VolumeProperties) SetUserData(v string)` SetUserData sets UserData field to given value. ### HasUserData `func (o *VolumeProperties) HasUserData() bool` HasUserData returns a boolean if a field has been set. ### GetBootServer `func (o *VolumeProperties) GetBootServer() string` GetBootServer returns the BootServer field if non-nil, zero value otherwise. ### GetBootServerOk `func (o *VolumeProperties) GetBootServerOk() (*string, bool)` GetBootServerOk returns a tuple with the BootServer field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBootServer `func (o *VolumeProperties) SetBootServer(v string)` SetBootServer sets BootServer field to given value. ### HasBootServer `func (o *VolumeProperties) HasBootServer() bool` HasBootServer returns a boolean if a field has been set. ### GetBootOrder `func (o *VolumeProperties) GetBootOrder() string` GetBootOrder returns the BootOrder field if non-nil, zero value otherwise. ### GetBootOrderOk `func (o *VolumeProperties) GetBootOrderOk() (*string, bool)` GetBootOrderOk returns a tuple with the BootOrder field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBootOrder `func (o *VolumeProperties) SetBootOrder(v string)` SetBootOrder sets BootOrder field to given value. ### HasBootOrder `func (o *VolumeProperties) HasBootOrder() bool` HasBootOrder returns a boolean if a field has been set. ### SetBootOrderNil `func (o *VolumeProperties) SetBootOrderNil()` SetBootOrderNil sets the value for BootOrder to be marshalled as an explicit nil Alternatively BootOrder can be set directly to the address `&Nilstring`, which is a sentinel value that is checked when marshalling. ### UnsetBootOrder `func (o *VolumeProperties) UnsetBootOrder()` golang-github-ionos-cloud-sdk-go-6.2.0/docs/models/Volumes.md000066400000000000000000000117171465267054300240730ustar00rootroot00000000000000# Volumes ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| |**Id** | Pointer to **string** | The resource's unique identifier. | [optional] [readonly] | |**Type** | Pointer to [**Type**](Type.md) | The type of object that has been created. | [optional] | |**Href** | Pointer to **string** | URL to the object representation (absolute path). | [optional] [readonly] | |**Items** | Pointer to [**[]Volume**](Volume.md) | Array of items in the collection. | [optional] [readonly] | |**Offset** | Pointer to **float32** | The offset (if specified in the request). | [optional] | |**Limit** | Pointer to **float32** | The limit (if specified in the request). | [optional] | |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods ### NewVolumes `func NewVolumes() *Volumes` NewVolumes instantiates a new Volumes object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed ### NewVolumesWithDefaults `func NewVolumesWithDefaults() *Volumes` NewVolumesWithDefaults instantiates a new Volumes object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId `func (o *Volumes) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk `func (o *Volumes) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId `func (o *Volumes) SetId(v string)` SetId sets Id field to given value. ### HasId `func (o *Volumes) HasId() bool` HasId returns a boolean if a field has been set. ### GetType `func (o *Volumes) GetType() Type` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk `func (o *Volumes) GetTypeOk() (*Type, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType `func (o *Volumes) SetType(v Type)` SetType sets Type field to given value. ### HasType `func (o *Volumes) HasType() bool` HasType returns a boolean if a field has been set. ### GetHref `func (o *Volumes) GetHref() string` GetHref returns the Href field if non-nil, zero value otherwise. ### GetHrefOk `func (o *Volumes) GetHrefOk() (*string, bool)` GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHref `func (o *Volumes) SetHref(v string)` SetHref sets Href field to given value. ### HasHref `func (o *Volumes) HasHref() bool` HasHref returns a boolean if a field has been set. ### GetItems `func (o *Volumes) GetItems() []Volume` GetItems returns the Items field if non-nil, zero value otherwise. ### GetItemsOk `func (o *Volumes) GetItemsOk() (*[]Volume, bool)` GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetItems `func (o *Volumes) SetItems(v []Volume)` SetItems sets Items field to given value. ### HasItems `func (o *Volumes) HasItems() bool` HasItems returns a boolean if a field has been set. ### GetOffset `func (o *Volumes) GetOffset() float32` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk `func (o *Volumes) GetOffsetOk() (*float32, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset `func (o *Volumes) SetOffset(v float32)` SetOffset sets Offset field to given value. ### HasOffset `func (o *Volumes) HasOffset() bool` HasOffset returns a boolean if a field has been set. ### GetLimit `func (o *Volumes) GetLimit() float32` GetLimit returns the Limit field if non-nil, zero value otherwise. ### GetLimitOk `func (o *Volumes) GetLimitOk() (*float32, bool)` GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLimit `func (o *Volumes) SetLimit(v float32)` SetLimit sets Limit field to given value. ### HasLimit `func (o *Volumes) HasLimit() bool` HasLimit returns a boolean if a field has been set. ### GetLinks `func (o *Volumes) GetLinks() PaginationLinks` GetLinks returns the Links field if non-nil, zero value otherwise. ### GetLinksOk `func (o *Volumes) GetLinksOk() (*PaginationLinks, bool)` GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinks `func (o *Volumes) SetLinks(v PaginationLinks)` SetLinks sets Links field to given value. ### HasLinks `func (o *Volumes) HasLinks() bool` HasLinks returns a boolean if a field has been set. golang-github-ionos-cloud-sdk-go-6.2.0/docs/summary.md000066400000000000000000000244471465267054300226570ustar00rootroot00000000000000# Table of contents * [Introduction](README.md) * [Changelog](CHANGELOG.md) ## API * [DefaultApi](api/DefaultApi.md) * [ApplicationLoadBalancersApi](api/ApplicationLoadBalancersApi.md) * [BackupUnitsApi](api/BackupUnitsApi.md) * [ContractResourcesApi](api/ContractResourcesApi.md) * [DataCentersApi](api/DataCentersApi.md) * [FirewallRulesApi](api/FirewallRulesApi.md) * [FlowLogsApi](api/FlowLogsApi.md) * [IPBlocksApi](api/IPBlocksApi.md) * [ImagesApi](api/ImagesApi.md) * [KubernetesApi](api/KubernetesApi.md) * [LANsApi](api/LANsApi.md) * [LabelsApi](api/LabelsApi.md) * [LoadBalancersApi](api/LoadBalancersApi.md) * [LocationsApi](api/LocationsApi.md) * [NATGatewaysApi](api/NATGatewaysApi.md) * [NetworkInterfacesApi](api/NetworkInterfacesApi.md) * [NetworkLoadBalancersApi](api/NetworkLoadBalancersApi.md) * [PrivateCrossConnectsApi](api/PrivateCrossConnectsApi.md) * [RequestsApi](api/RequestsApi.md) * [ServersApi](api/ServersApi.md) * [SnapshotsApi](api/SnapshotsApi.md) * [TargetGroupsApi](api/TargetGroupsApi.md) * [TemplatesApi](api/TemplatesApi.md) * [UserManagementApi](api/UserManagementApi.md) * [UserS3KeysApi](api/UserS3KeysApi.md) * [VolumesApi](api/VolumesApi.md) ## Models * [ApplicationLoadBalancer](models/ApplicationLoadBalancer.md) * [ApplicationLoadBalancerEntities](models/ApplicationLoadBalancerEntities.md) * [ApplicationLoadBalancerForwardingRule](models/ApplicationLoadBalancerForwardingRule.md) * [ApplicationLoadBalancerForwardingRuleProperties](models/ApplicationLoadBalancerForwardingRuleProperties.md) * [ApplicationLoadBalancerForwardingRulePut](models/ApplicationLoadBalancerForwardingRulePut.md) * [ApplicationLoadBalancerForwardingRules](models/ApplicationLoadBalancerForwardingRules.md) * [ApplicationLoadBalancerHttpRule](models/ApplicationLoadBalancerHttpRule.md) * [ApplicationLoadBalancerHttpRuleCondition](models/ApplicationLoadBalancerHttpRuleCondition.md) * [ApplicationLoadBalancerProperties](models/ApplicationLoadBalancerProperties.md) * [ApplicationLoadBalancerPut](models/ApplicationLoadBalancerPut.md) * [ApplicationLoadBalancers](models/ApplicationLoadBalancers.md) * [AttachedVolumes](models/AttachedVolumes.md) * [BackupUnit](models/BackupUnit.md) * [BackupUnitProperties](models/BackupUnitProperties.md) * [BackupUnitSSO](models/BackupUnitSSO.md) * [BackupUnits](models/BackupUnits.md) * [BalancedNics](models/BalancedNics.md) * [Cdroms](models/Cdroms.md) * [ConnectableDatacenter](models/ConnectableDatacenter.md) * [Contract](models/Contract.md) * [ContractProperties](models/ContractProperties.md) * [Contracts](models/Contracts.md) * [CpuArchitectureProperties](models/CpuArchitectureProperties.md) * [DataCenterEntities](models/DataCenterEntities.md) * [Datacenter](models/Datacenter.md) * [DatacenterElementMetadata](models/DatacenterElementMetadata.md) * [DatacenterProperties](models/DatacenterProperties.md) * [Datacenters](models/Datacenters.md) * [Error](models/Error.md) * [ErrorMessage](models/ErrorMessage.md) * [FirewallRule](models/FirewallRule.md) * [FirewallRules](models/FirewallRules.md) * [FirewallruleProperties](models/FirewallruleProperties.md) * [FlowLog](models/FlowLog.md) * [FlowLogProperties](models/FlowLogProperties.md) * [FlowLogPut](models/FlowLogPut.md) * [FlowLogs](models/FlowLogs.md) * [Group](models/Group.md) * [GroupEntities](models/GroupEntities.md) * [GroupMembers](models/GroupMembers.md) * [GroupProperties](models/GroupProperties.md) * [GroupShare](models/GroupShare.md) * [GroupShareProperties](models/GroupShareProperties.md) * [GroupShares](models/GroupShares.md) * [GroupUsers](models/GroupUsers.md) * [Groups](models/Groups.md) * [IPFailover](models/IPFailover.md) * [Image](models/Image.md) * [ImageProperties](models/ImageProperties.md) * [Images](models/Images.md) * [Info](models/Info.md) * [IpBlock](models/IpBlock.md) * [IpBlockProperties](models/IpBlockProperties.md) * [IpBlocks](models/IpBlocks.md) * [IpConsumer](models/IpConsumer.md) * [KubernetesAutoScaling](models/KubernetesAutoScaling.md) * [KubernetesCluster](models/KubernetesCluster.md) * [KubernetesClusterEntities](models/KubernetesClusterEntities.md) * [KubernetesClusterForPost](models/KubernetesClusterForPost.md) * [KubernetesClusterForPut](models/KubernetesClusterForPut.md) * [KubernetesClusterProperties](models/KubernetesClusterProperties.md) * [KubernetesClusterPropertiesForPost](models/KubernetesClusterPropertiesForPost.md) * [KubernetesClusterPropertiesForPut](models/KubernetesClusterPropertiesForPut.md) * [KubernetesClusters](models/KubernetesClusters.md) * [KubernetesMaintenanceWindow](models/KubernetesMaintenanceWindow.md) * [KubernetesNode](models/KubernetesNode.md) * [KubernetesNodeMetadata](models/KubernetesNodeMetadata.md) * [KubernetesNodePool](models/KubernetesNodePool.md) * [KubernetesNodePoolForPost](models/KubernetesNodePoolForPost.md) * [KubernetesNodePoolForPut](models/KubernetesNodePoolForPut.md) * [KubernetesNodePoolLan](models/KubernetesNodePoolLan.md) * [KubernetesNodePoolLanRoutes](models/KubernetesNodePoolLanRoutes.md) * [KubernetesNodePoolProperties](models/KubernetesNodePoolProperties.md) * [KubernetesNodePoolPropertiesForPost](models/KubernetesNodePoolPropertiesForPost.md) * [KubernetesNodePoolPropertiesForPut](models/KubernetesNodePoolPropertiesForPut.md) * [KubernetesNodePools](models/KubernetesNodePools.md) * [KubernetesNodeProperties](models/KubernetesNodeProperties.md) * [KubernetesNodes](models/KubernetesNodes.md) * [Label](models/Label.md) * [LabelProperties](models/LabelProperties.md) * [LabelResource](models/LabelResource.md) * [LabelResourceProperties](models/LabelResourceProperties.md) * [LabelResources](models/LabelResources.md) * [Labels](models/Labels.md) * [Lan](models/Lan.md) * [LanEntities](models/LanEntities.md) * [LanNics](models/LanNics.md) * [LanProperties](models/LanProperties.md) * [Lans](models/Lans.md) * [Loadbalancer](models/Loadbalancer.md) * [LoadbalancerEntities](models/LoadbalancerEntities.md) * [LoadbalancerProperties](models/LoadbalancerProperties.md) * [Loadbalancers](models/Loadbalancers.md) * [Location](models/Location.md) * [LocationProperties](models/LocationProperties.md) * [Locations](models/Locations.md) * [NatGateway](models/NatGateway.md) * [NatGatewayEntities](models/NatGatewayEntities.md) * [NatGatewayLanProperties](models/NatGatewayLanProperties.md) * [NatGatewayProperties](models/NatGatewayProperties.md) * [NatGatewayPut](models/NatGatewayPut.md) * [NatGatewayRule](models/NatGatewayRule.md) * [NatGatewayRuleProperties](models/NatGatewayRuleProperties.md) * [NatGatewayRuleProtocol](models/NatGatewayRuleProtocol.md) * [NatGatewayRulePut](models/NatGatewayRulePut.md) * [NatGatewayRuleType](models/NatGatewayRuleType.md) * [NatGatewayRules](models/NatGatewayRules.md) * [NatGateways](models/NatGateways.md) * [NetworkLoadBalancer](models/NetworkLoadBalancer.md) * [NetworkLoadBalancerEntities](models/NetworkLoadBalancerEntities.md) * [NetworkLoadBalancerForwardingRule](models/NetworkLoadBalancerForwardingRule.md) * [NetworkLoadBalancerForwardingRuleHealthCheck](models/NetworkLoadBalancerForwardingRuleHealthCheck.md) * [NetworkLoadBalancerForwardingRuleProperties](models/NetworkLoadBalancerForwardingRuleProperties.md) * [NetworkLoadBalancerForwardingRulePut](models/NetworkLoadBalancerForwardingRulePut.md) * [NetworkLoadBalancerForwardingRuleTarget](models/NetworkLoadBalancerForwardingRuleTarget.md) * [NetworkLoadBalancerForwardingRuleTargetHealthCheck](models/NetworkLoadBalancerForwardingRuleTargetHealthCheck.md) * [NetworkLoadBalancerForwardingRules](models/NetworkLoadBalancerForwardingRules.md) * [NetworkLoadBalancerProperties](models/NetworkLoadBalancerProperties.md) * [NetworkLoadBalancerPut](models/NetworkLoadBalancerPut.md) * [NetworkLoadBalancers](models/NetworkLoadBalancers.md) * [Nic](models/Nic.md) * [NicEntities](models/NicEntities.md) * [NicProperties](models/NicProperties.md) * [NicPut](models/NicPut.md) * [Nics](models/Nics.md) * [NoStateMetaData](models/NoStateMetaData.md) * [PaginationLinks](models/PaginationLinks.md) * [Peer](models/Peer.md) * [PrivateCrossConnect](models/PrivateCrossConnect.md) * [PrivateCrossConnectProperties](models/PrivateCrossConnectProperties.md) * [PrivateCrossConnects](models/PrivateCrossConnects.md) * [RemoteConsoleUrl](models/RemoteConsoleUrl.md) * [Request](models/Request.md) * [RequestMetadata](models/RequestMetadata.md) * [RequestProperties](models/RequestProperties.md) * [RequestStatus](models/RequestStatus.md) * [RequestStatusMetadata](models/RequestStatusMetadata.md) * [RequestTarget](models/RequestTarget.md) * [Requests](models/Requests.md) * [Resource](models/Resource.md) * [ResourceEntities](models/ResourceEntities.md) * [ResourceGroups](models/ResourceGroups.md) * [ResourceLimits](models/ResourceLimits.md) * [ResourceProperties](models/ResourceProperties.md) * [ResourceReference](models/ResourceReference.md) * [Resources](models/Resources.md) * [ResourcesUsers](models/ResourcesUsers.md) * [S3Bucket](models/S3Bucket.md) * [S3Key](models/S3Key.md) * [S3KeyMetadata](models/S3KeyMetadata.md) * [S3KeyProperties](models/S3KeyProperties.md) * [S3Keys](models/S3Keys.md) * [S3ObjectStorageSSO](models/S3ObjectStorageSSO.md) * [Server](models/Server.md) * [ServerEntities](models/ServerEntities.md) * [ServerProperties](models/ServerProperties.md) * [Servers](models/Servers.md) * [Snapshot](models/Snapshot.md) * [SnapshotProperties](models/SnapshotProperties.md) * [Snapshots](models/Snapshots.md) * [TargetGroup](models/TargetGroup.md) * [TargetGroupHealthCheck](models/TargetGroupHealthCheck.md) * [TargetGroupHttpHealthCheck](models/TargetGroupHttpHealthCheck.md) * [TargetGroupProperties](models/TargetGroupProperties.md) * [TargetGroupPut](models/TargetGroupPut.md) * [TargetGroupTarget](models/TargetGroupTarget.md) * [TargetGroups](models/TargetGroups.md) * [TargetPortRange](models/TargetPortRange.md) * [Template](models/Template.md) * [TemplateProperties](models/TemplateProperties.md) * [Templates](models/Templates.md) * [Token](models/Token.md) * [Type](models/Type.md) * [User](models/User.md) * [UserMetadata](models/UserMetadata.md) * [UserPost](models/UserPost.md) * [UserProperties](models/UserProperties.md) * [UserPropertiesPost](models/UserPropertiesPost.md) * [UserPropertiesPut](models/UserPropertiesPut.md) * [UserPut](models/UserPut.md) * [Users](models/Users.md) * [UsersEntities](models/UsersEntities.md) * [Volume](models/Volume.md) * [VolumeProperties](models/VolumeProperties.md) * [Volumes](models/Volumes.md) golang-github-ionos-cloud-sdk-go-6.2.0/examples/000077500000000000000000000000001465267054300215135ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/examples/createServer.go000066400000000000000000000154521465267054300245030ustar00rootroot00000000000000package main import ( "context" "fmt" "log" "time" ionoscloud "github.com/ionos-cloud/sdk-go/v6" ) // apiService - a wrapper to have access to the computeEngine client and context type apiService struct { computeEngine *ionoscloud.APIClient ctx context.Context } func main() { err := createDataCenterAndServer() if err != nil { log.Fatal("err : ", err) } } // createDataCenterAndServer - creates a server and datacenter and waits for the resources to finish being created func createDataCenterAndServer() error { as := newApiService() var cancelFunc func() // If creation takes more than 10 minutes, cancel and release resources duration := 10 * time.Minute as.ctx, cancelFunc = context.WithTimeout(as.ctx, duration) // Ensure the ctx is canceled. // See ctx package for more information, https://golang.org/pkg/context/ if cancelFunc != nil { defer cancelFunc() } dc, err := as.createDcAndWaitUntilDone() if err != nil { return fmt.Errorf( "error creating datacenter (%w)", err) } dcId := *dc.Id _, err = as.createServerAndWaitUntilDone(dcId) if err != nil { return fmt.Errorf( "error creating server (%w)", err) } return nil } // newApiService - creates apiClient(used to make requests to IONOS Cloud API) and context needed for operations func newApiService() apiService { // NewConfigurationFromEnv looks for the following variables in the environment: IONOS_USERNAME, IONOS_PASSWORD, IONOS_TOKEN, IONOS_API_URL // You can either export IONOS_USERNAME and IONOS_PASSWORD, or IONOS_TOKEN // IONOS_API_URL - should be set only if you with to overwrite the default ionoscloud.DefaultIonosServerUrl cfg := ionoscloud.NewConfigurationFromEnv() // Uncomment line if you want to see request/response packets // We recommend you only set this field for debugging purposes. // Disable it in your production environments because it can log sensitive data. // It logs the full request and response without encryption, even for an HTTPS call. // Verbose request and response logging can also significantly impact your application's performance. //cfg.Debug = true computeClient := ionoscloud.NewAPIClient(cfg) ctx := context.Background() return apiService{ computeEngine: computeClient, ctx: ctx, } } // createDcAndWaitUntilDone - creates datacenter and waits until provisioning is successful // return - datacenter object created, or error func (as apiService) createDcAndWaitUntilDone() (*ionoscloud.Datacenter, error) { datacenterName := "testDatacenter" description := "this is the test datacenter" loc := "de/txl" // other location values: de/fra", "us/las", "us/ewr", "de/txl", gb/lhr", "es/vit" dc, apiResponse, err := as.createDatacenter(datacenterName, description, loc) if err != nil { return nil, fmt.Errorf( "error creating data center (%w)", err) } // gets the Location Header value, where Request ID is stored, to interrogate the request status requestPath := getRequestPath(apiResponse) if requestPath == "" { return nil, fmt.Errorf("error getting location from header for datacenter") } // Waits for the datacenter creation to finish. Polls until it receives an answer that // provisioning is successful err = as.waitForRequestToBeDone(requestPath) if err != nil { return nil, fmt.Errorf("error while waiting for datacenter creation to finish (%w)", err) } return &dc, nil } // createServerAndWaitUntilDone - creates server and waits until provisioning is successful // return - server object created, or error func (as apiService) createServerAndWaitUntilDone(dcId string) (*ionoscloud.Server, error) { serverName := "testServer" var cores int32 = 1 var ram int32 = 1024 // must be a multiple of 1024 : 1024, 2048, 3072, 4096, etc cpuFamily := "INTEL_SKYLAKE" // other valid values: AMD_OPTERON,INTEL_XEON, INTEL_SKYLAKE. // cpu_family should be in sync with what is available in the location you choose for the datacenter server, apiResponse, err := as.createServer(dcId, serverName, cores, ram, cpuFamily) if err != nil { return nil, fmt.Errorf( "error creating server (%w)", err) } // The initial response from the cloud is a HTTP/2.0 202 Accepted - after this response, the IONOS Cloud API // starts to actually create the server // Gets path to interrogate server creation status requestPath := getRequestPath(apiResponse) if requestPath == "" { return nil, fmt.Errorf("error getting server path") } // Waits for the server creation to finish. It takes some time to create // a compute resource, so we poll until provisioning is successful err = as.waitForRequestToBeDone(requestPath) if err != nil { return nil, fmt.Errorf("error while waiting for server creation to finish (%w)", err) } return &server, nil } func (as apiService) createDatacenter(name, description, location string) (ionoscloud.Datacenter, *ionoscloud.APIResponse, error) { // The required parameter for datacenter creation is: 'location'. // Creates the datacenter structure and populates it dc := ionoscloud.Datacenter{ Properties: &ionoscloud.DatacenterProperties{ Name: &name, Description: &description, Location: &location, }, } // The computeClient has access to all the resources in the ionos compute ecosystem. First we get the DatacenterApi. // The datacenter is the basic building block in which to create your infrastructure. // Builder pattern is used, to allow for easier creation and cleaner code. // In this case, the order is DatacentersPost -> Datacenter (loads datacenter structure) -> Execute // The final step that actually sends the request is 'execute'. return as.computeEngine.DataCentersApi.DatacentersPost(as.ctx).Datacenter(dc).Execute() } func (as apiService) createServer(datacenterId, name string, cores, ram int32, cpuFamily string) (ionoscloud.Server, *ionoscloud.APIResponse, error) { // Required parameters for server creation: 'cores' and 'ram'. // Creates the server structure and populates it server := ionoscloud.Server{ Properties: &ionoscloud.ServerProperties{ Name: &name, Cores: &cores, Ram: &ram, CpuFamily: &cpuFamily, }, } return as.computeEngine.ServersApi.DatacentersServersPost(as.ctx, datacenterId).Server(server).Execute() } // waitForRequestToBeDone - polls until the request is 'Done', or // until the context timeout expires func (as apiService) waitForRequestToBeDone(path string) error { // Polls until context timeout expires _, err := as.computeEngine.WaitForRequest(as.ctx, path) if err != nil { return fmt.Errorf("error waiting for status for %s : (%w)", path, err) } log.Printf("resource created for path %s", path) return nil } // getRequestPath - returns location header value which is the path // used to poll the request for readiness func getRequestPath(resp *ionoscloud.APIResponse) string { if resp != nil { return resp.Header.Get("location") } return "" } golang-github-ionos-cloud-sdk-go-6.2.0/examples/useWaitForDeletionAsyncFunction.go000066400000000000000000000023571465267054300303310ustar00rootroot00000000000000package main import ( "context" "fmt" ionoscloud "github.com/ionos-cloud/sdk-go/v6" "log" "net/http" "sync" ) func processRequestClusterDelete(apiClient *ionoscloud.APIClient, resourceID string) (*ionoscloud.APIResponse, error) { apiRequest := apiClient.KubernetesApi.K8sFindByClusterId(context.Background(), resourceID) _, apiResp, err := apiRequest.Execute() if err != nil { return apiResp, fmt.Errorf("error occurred when executing the api get resource operation: %w", err) } return apiResp, nil } func main() { cfg := ionoscloud.NewConfigurationFromEnv() apiClient := ionoscloud.NewAPIClient(cfg) resourceId := "c376e371-51bb-45f2-9b24-3da0fc3a6cfc" // you can pass the resource id after you create a resource using resource.GetId() ch := make(chan ionoscloud.DeleteStateChannel) var wg sync.WaitGroup wg.Add(1) go func() { apiClient.WaitForDeletionAsync(context.Background(), processRequestClusterDelete, resourceId, ch) for res := range ch { if res.Err != nil { log.Fatal(res.Err) } if res.Msg == http.StatusNotFound { // if statement will be true when the resource was deleted // put your code here(for example you can delete a k8s nodepool and after that a cluster) wg.Done() } } }() wg.Wait() } golang-github-ionos-cloud-sdk-go-6.2.0/examples/useWaitForDeletionFunction.go000066400000000000000000000017501465267054300273270ustar00rootroot00000000000000package main import ( "context" "fmt" ionoscloud "github.com/ionos-cloud/sdk-go/v6" "log" ) func processRequestClusterDelete(apiClient *ionoscloud.APIClient, resourceID string) (*ionoscloud.APIResponse, error) { apiRequest := apiClient.KubernetesApi.K8sFindByClusterId(context.Background(), resourceID) _, apiResp, err := apiRequest.Execute() if err != nil { return apiResp, fmt.Errorf("error occurred when executing the api get resource operation: %w", err) } return apiResp, nil } func main() { cfg := ionoscloud.NewConfigurationFromEnv() apiClient := ionoscloud.NewAPIClient(cfg) resourceId := "c376e371-51bb-45f2-9b24-3da0fc3a6cfc" // you can pass the resource id after you create a resource using resource.GetId() deleted, err := apiClient.WaitForDeletion(context.Background(), processRequestClusterDelete, resourceId) if err != nil { log.Fatal(err) } if deleted == true { // put your code here(for example you can delete a k8s nodepool and after that a cluster) } } golang-github-ionos-cloud-sdk-go-6.2.0/examples/useWaitForStateAsyncFunction.go000066400000000000000000000022161465267054300276400ustar00rootroot00000000000000package main import ( "context" "fmt" ionoscloud "github.com/ionos-cloud/sdk-go/v6" "log" "sync" ) func processRequestCluster(apiClient *ionoscloud.APIClient, resourceID string) (ionoscloud.ResourceHandler, error) { apiRequest := apiClient.KubernetesApi.K8sFindByClusterId(context.Background(), resourceID) dc, _, err := apiRequest.Execute() if err != nil { return nil, err } return &dc, nil } func main() { cfg := ionoscloud.NewConfigurationFromEnv() apiClient := ionoscloud.NewAPIClient(cfg) resourceId := "c376e371-51bb-45f2-9b24-3da0fc3a6cfc" // you can pass the resource id after you create a resource using resource.GetId() ch := make(chan ionoscloud.StateChannel) var wg sync.WaitGroup wg.Add(1) go func() { apiClient.WaitForStateAsync(context.Background(), processRequestCluster, resourceId, ch) for res := range ch { if res.Err != nil { log.Fatal(res.Err) } if res.Msg == ionoscloud.Available || res.Msg == ionoscloud.Active { fmt.Printf("%v ", "DONE Creating the Cluster") // put your code here(for example you can create a k8s nodepool after a cluster is created) wg.Done() } } }() wg.Wait() } golang-github-ionos-cloud-sdk-go-6.2.0/examples/useWaitForStateFunction.go000066400000000000000000000014531465267054300266440ustar00rootroot00000000000000package main import ( "context" "fmt" ionoscloud "github.com/ionos-cloud/sdk-go/v6" "log" ) func processRequestCluster(apiClient *ionoscloud.APIClient, resourceID string) (ionoscloud.ResourceHandler, error) { apiRequest := apiClient.KubernetesApi.K8sFindByClusterId(context.Background(), resourceID) dc, _, err := apiRequest.Execute() if err != nil { return nil, err } return &dc, nil } func main() { cfg := ionoscloud.NewConfigurationFromEnv() apiClient := ionoscloud.NewAPIClient(cfg) resourceId := "c376e371-51bb-45f2-9b24-3da0fc3a6cfc" active, err := apiClient.WaitForState(context.Background(), processRequestCluster, resourceId) if err != nil { log.Fatal(err) } if active == true { // put your code here(for example you can create a k8s nodepool after a cluster is created) } } golang-github-ionos-cloud-sdk-go-6.2.0/git_push.sh000066400000000000000000000031271465267054300220560ustar00rootroot00000000000000#!/bin/sh git_user_id=$1 git_repo_id=$2 release_note=$3 git_host=$4 if [ "$git_host" = "" ]; then git_host="github.com" echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi if [ "$git_user_id" = "" ]; then git_user_id="ionos-cloud" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then git_repo_id="sdk-go" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi if [ "$release_note" = "" ]; then release_note="Minor update" echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository git init # Adds the files in the local repository and stages them for commit. git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' golang-github-ionos-cloud-sdk-go-6.2.0/go.mod000066400000000000000000000005041465267054300210020ustar00rootroot00000000000000module github.com/ionos-cloud/sdk-go/v6 go 1.19 require golang.org/x/oauth2 v0.6.0 require ( github.com/golang/protobuf v1.5.2 // indirect golang.org/x/net v0.8.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.0 // indirect ) retract v6.0.5851 // Published accidentally. golang-github-ionos-cloud-sdk-go-6.2.0/go.sum000066400000000000000000000055611465267054300210370ustar00rootroot00000000000000cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= golang-github-ionos-cloud-sdk-go-6.2.0/logger.go000066400000000000000000000041571465267054300215120ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "log" "os" "strings" ) type LogLevel uint func (l *LogLevel) Get() LogLevel { if l != nil { return *l } return Off } // Satisfies returns true if this LogLevel is at least high enough for v func (l *LogLevel) Satisfies(v LogLevel) bool { return l.Get() >= v } const ( Off LogLevel = 0x100 * iota Debug // Trace We recommend you only set this field for debugging purposes. // Disable it in your production environments because it can log sensitive data. // It logs the full request and response without encryption, even for an HTTPS call. // Verbose request and response logging can also significantly impact your application's performance. Trace ) var LogLevelMap = map[string]LogLevel{ "off": Off, "debug": Debug, "trace": Trace, } // getLogLevelFromEnv - gets LogLevel type from env variable IONOS_LOG_LEVEL // returns Off if an invalid log level is encountered func getLogLevelFromEnv() LogLevel { strLogLevel := "off" if os.Getenv(IonosLogLevelEnvVar) != "" { strLogLevel = os.Getenv(IonosLogLevelEnvVar) } logLevel, ok := LogLevelMap[strings.ToLower(strLogLevel)] if !ok { log.Printf("Cannot set logLevel for value: %s, setting loglevel to Off", strLogLevel) } return logLevel } type Logger interface { Printf(format string, args ...interface{}) } func NewDefaultLogger() Logger { return &defaultLogger{ logger: log.New(os.Stderr, "IONOSLOG ", log.LstdFlags), } } type defaultLogger struct { logger *log.Logger } func (l defaultLogger) Printf(format string, args ...interface{}) { l.logger.Printf(format, args...) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancer.go000066400000000000000000000204221465267054300265350ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancer struct for ApplicationLoadBalancer type ApplicationLoadBalancer struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *ApplicationLoadBalancerProperties `json:"properties"` Entities *ApplicationLoadBalancerEntities `json:"entities,omitempty"` } // NewApplicationLoadBalancer instantiates a new ApplicationLoadBalancer object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancer(properties ApplicationLoadBalancerProperties) *ApplicationLoadBalancer { this := ApplicationLoadBalancer{} this.Properties = &properties return &this } // NewApplicationLoadBalancerWithDefaults instantiates a new ApplicationLoadBalancer object // This 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 NewApplicationLoadBalancerWithDefaults() *ApplicationLoadBalancer { this := ApplicationLoadBalancer{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancer) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancer) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *ApplicationLoadBalancer) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *ApplicationLoadBalancer) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancer) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancer) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ApplicationLoadBalancer) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ApplicationLoadBalancer) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancer) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancer) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *ApplicationLoadBalancer) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *ApplicationLoadBalancer) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancer) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancer) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *ApplicationLoadBalancer) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *ApplicationLoadBalancer) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancer) GetProperties() *ApplicationLoadBalancerProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancer) GetPropertiesOk() (*ApplicationLoadBalancerProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *ApplicationLoadBalancer) SetProperties(v ApplicationLoadBalancerProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *ApplicationLoadBalancer) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancer) GetEntities() *ApplicationLoadBalancerEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancer) GetEntitiesOk() (*ApplicationLoadBalancerEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *ApplicationLoadBalancer) SetEntities(v ApplicationLoadBalancerEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *ApplicationLoadBalancer) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o ApplicationLoadBalancer) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancer struct { value *ApplicationLoadBalancer isSet bool } func (v NullableApplicationLoadBalancer) Get() *ApplicationLoadBalancer { return v.value } func (v *NullableApplicationLoadBalancer) Set(val *ApplicationLoadBalancer) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancer) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancer) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancer(val *ApplicationLoadBalancer) *NullableApplicationLoadBalancer { return &NullableApplicationLoadBalancer{value: val, isSet: true} } func (v NullableApplicationLoadBalancer) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancer_entities.go000066400000000000000000000076071465267054300304530ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancerEntities struct for ApplicationLoadBalancerEntities type ApplicationLoadBalancerEntities struct { Forwardingrules *ApplicationLoadBalancerForwardingRules `json:"forwardingrules,omitempty"` } // NewApplicationLoadBalancerEntities instantiates a new ApplicationLoadBalancerEntities object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancerEntities() *ApplicationLoadBalancerEntities { this := ApplicationLoadBalancerEntities{} return &this } // NewApplicationLoadBalancerEntitiesWithDefaults instantiates a new ApplicationLoadBalancerEntities object // This 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 NewApplicationLoadBalancerEntitiesWithDefaults() *ApplicationLoadBalancerEntities { this := ApplicationLoadBalancerEntities{} return &this } // GetForwardingrules returns the Forwardingrules field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerEntities) GetForwardingrules() *ApplicationLoadBalancerForwardingRules { if o == nil { return nil } return o.Forwardingrules } // GetForwardingrulesOk returns a tuple with the Forwardingrules field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerEntities) GetForwardingrulesOk() (*ApplicationLoadBalancerForwardingRules, bool) { if o == nil { return nil, false } return o.Forwardingrules, true } // SetForwardingrules sets field value func (o *ApplicationLoadBalancerEntities) SetForwardingrules(v ApplicationLoadBalancerForwardingRules) { o.Forwardingrules = &v } // HasForwardingrules returns a boolean if a field has been set. func (o *ApplicationLoadBalancerEntities) HasForwardingrules() bool { if o != nil && o.Forwardingrules != nil { return true } return false } func (o ApplicationLoadBalancerEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Forwardingrules != nil { toSerialize["forwardingrules"] = o.Forwardingrules } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancerEntities struct { value *ApplicationLoadBalancerEntities isSet bool } func (v NullableApplicationLoadBalancerEntities) Get() *ApplicationLoadBalancerEntities { return v.value } func (v *NullableApplicationLoadBalancerEntities) Set(val *ApplicationLoadBalancerEntities) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancerEntities) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancerEntities) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancerEntities(val *ApplicationLoadBalancerEntities) *NullableApplicationLoadBalancerEntities { return &NullableApplicationLoadBalancerEntities{value: val, isSet: true} } func (v NullableApplicationLoadBalancerEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancerEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancer_forwarding_rule.go000066400000000000000000000177771465267054300320310ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancerForwardingRule struct for ApplicationLoadBalancerForwardingRule type ApplicationLoadBalancerForwardingRule struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *ApplicationLoadBalancerForwardingRuleProperties `json:"properties"` } // NewApplicationLoadBalancerForwardingRule instantiates a new ApplicationLoadBalancerForwardingRule object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancerForwardingRule(properties ApplicationLoadBalancerForwardingRuleProperties) *ApplicationLoadBalancerForwardingRule { this := ApplicationLoadBalancerForwardingRule{} this.Properties = &properties return &this } // NewApplicationLoadBalancerForwardingRuleWithDefaults instantiates a new ApplicationLoadBalancerForwardingRule object // This 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 NewApplicationLoadBalancerForwardingRuleWithDefaults() *ApplicationLoadBalancerForwardingRule { this := ApplicationLoadBalancerForwardingRule{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRule) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRule) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *ApplicationLoadBalancerForwardingRule) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRule) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRule) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRule) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ApplicationLoadBalancerForwardingRule) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRule) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRule) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRule) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *ApplicationLoadBalancerForwardingRule) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRule) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRule) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *ApplicationLoadBalancerForwardingRule) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRule) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRule) GetProperties() *ApplicationLoadBalancerForwardingRuleProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRule) GetPropertiesOk() (*ApplicationLoadBalancerForwardingRuleProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *ApplicationLoadBalancerForwardingRule) SetProperties(v ApplicationLoadBalancerForwardingRuleProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRule) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o ApplicationLoadBalancerForwardingRule) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancerForwardingRule struct { value *ApplicationLoadBalancerForwardingRule isSet bool } func (v NullableApplicationLoadBalancerForwardingRule) Get() *ApplicationLoadBalancerForwardingRule { return v.value } func (v *NullableApplicationLoadBalancerForwardingRule) Set(val *ApplicationLoadBalancerForwardingRule) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancerForwardingRule) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancerForwardingRule) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancerForwardingRule(val *ApplicationLoadBalancerForwardingRule) *NullableApplicationLoadBalancerForwardingRule { return &NullableApplicationLoadBalancerForwardingRule{value: val, isSet: true} } func (v NullableApplicationLoadBalancerForwardingRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancerForwardingRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancer_forwarding_rule_properties.go000066400000000000000000000266371465267054300343000ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancerForwardingRuleProperties struct for ApplicationLoadBalancerForwardingRuleProperties type ApplicationLoadBalancerForwardingRuleProperties struct { // The name of the Application Load Balancer forwarding rule. Name *string `json:"name"` // The balancing protocol. Protocol *string `json:"protocol"` // The listening (inbound) IP. ListenerIp *string `json:"listenerIp"` // The listening (inbound) port number; the valid range is 1 to 65535. ListenerPort *int32 `json:"listenerPort"` // The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). ClientTimeout *int32 `json:"clientTimeout,omitempty"` // Array of items in the collection. ServerCertificates *[]string `json:"serverCertificates,omitempty"` // An array of items in the collection. The original order of rules is preserved during processing, except that rules of the 'FORWARD' type are processed after the rules with other defined actions. The relative order of the 'FORWARD' type rules is also preserved during the processing. HttpRules *[]ApplicationLoadBalancerHttpRule `json:"httpRules,omitempty"` } // NewApplicationLoadBalancerForwardingRuleProperties instantiates a new ApplicationLoadBalancerForwardingRuleProperties object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancerForwardingRuleProperties(name string, protocol string, listenerIp string, listenerPort int32) *ApplicationLoadBalancerForwardingRuleProperties { this := ApplicationLoadBalancerForwardingRuleProperties{} this.Name = &name this.Protocol = &protocol this.ListenerIp = &listenerIp this.ListenerPort = &listenerPort return &this } // NewApplicationLoadBalancerForwardingRulePropertiesWithDefaults instantiates a new ApplicationLoadBalancerForwardingRuleProperties object // This 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 NewApplicationLoadBalancerForwardingRulePropertiesWithDefaults() *ApplicationLoadBalancerForwardingRuleProperties { this := ApplicationLoadBalancerForwardingRuleProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *ApplicationLoadBalancerForwardingRuleProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRuleProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetProtocol returns the Protocol field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetProtocol() *string { if o == nil { return nil } return o.Protocol } // GetProtocolOk returns a tuple with the Protocol field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetProtocolOk() (*string, bool) { if o == nil { return nil, false } return o.Protocol, true } // SetProtocol sets field value func (o *ApplicationLoadBalancerForwardingRuleProperties) SetProtocol(v string) { o.Protocol = &v } // HasProtocol returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRuleProperties) HasProtocol() bool { if o != nil && o.Protocol != nil { return true } return false } // GetListenerIp returns the ListenerIp field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerIp() *string { if o == nil { return nil } return o.ListenerIp } // GetListenerIpOk returns a tuple with the ListenerIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerIpOk() (*string, bool) { if o == nil { return nil, false } return o.ListenerIp, true } // SetListenerIp sets field value func (o *ApplicationLoadBalancerForwardingRuleProperties) SetListenerIp(v string) { o.ListenerIp = &v } // HasListenerIp returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRuleProperties) HasListenerIp() bool { if o != nil && o.ListenerIp != nil { return true } return false } // GetListenerPort returns the ListenerPort field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerPort() *int32 { if o == nil { return nil } return o.ListenerPort } // GetListenerPortOk returns a tuple with the ListenerPort field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetListenerPortOk() (*int32, bool) { if o == nil { return nil, false } return o.ListenerPort, true } // SetListenerPort sets field value func (o *ApplicationLoadBalancerForwardingRuleProperties) SetListenerPort(v int32) { o.ListenerPort = &v } // HasListenerPort returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRuleProperties) HasListenerPort() bool { if o != nil && o.ListenerPort != nil { return true } return false } // GetClientTimeout returns the ClientTimeout field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetClientTimeout() *int32 { if o == nil { return nil } return o.ClientTimeout } // GetClientTimeoutOk returns a tuple with the ClientTimeout field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetClientTimeoutOk() (*int32, bool) { if o == nil { return nil, false } return o.ClientTimeout, true } // SetClientTimeout sets field value func (o *ApplicationLoadBalancerForwardingRuleProperties) SetClientTimeout(v int32) { o.ClientTimeout = &v } // HasClientTimeout returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRuleProperties) HasClientTimeout() bool { if o != nil && o.ClientTimeout != nil { return true } return false } // GetServerCertificates returns the ServerCertificates field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetServerCertificates() *[]string { if o == nil { return nil } return o.ServerCertificates } // GetServerCertificatesOk returns a tuple with the ServerCertificates field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetServerCertificatesOk() (*[]string, bool) { if o == nil { return nil, false } return o.ServerCertificates, true } // SetServerCertificates sets field value func (o *ApplicationLoadBalancerForwardingRuleProperties) SetServerCertificates(v []string) { o.ServerCertificates = &v } // HasServerCertificates returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRuleProperties) HasServerCertificates() bool { if o != nil && o.ServerCertificates != nil { return true } return false } // GetHttpRules returns the HttpRules field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetHttpRules() *[]ApplicationLoadBalancerHttpRule { if o == nil { return nil } return o.HttpRules } // GetHttpRulesOk returns a tuple with the HttpRules field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRuleProperties) GetHttpRulesOk() (*[]ApplicationLoadBalancerHttpRule, bool) { if o == nil { return nil, false } return o.HttpRules, true } // SetHttpRules sets field value func (o *ApplicationLoadBalancerForwardingRuleProperties) SetHttpRules(v []ApplicationLoadBalancerHttpRule) { o.HttpRules = &v } // HasHttpRules returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRuleProperties) HasHttpRules() bool { if o != nil && o.HttpRules != nil { return true } return false } func (o ApplicationLoadBalancerForwardingRuleProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Protocol != nil { toSerialize["protocol"] = o.Protocol } if o.ListenerIp != nil { toSerialize["listenerIp"] = o.ListenerIp } if o.ListenerPort != nil { toSerialize["listenerPort"] = o.ListenerPort } if o.ClientTimeout != nil { toSerialize["clientTimeout"] = o.ClientTimeout } if o.ServerCertificates != nil { toSerialize["serverCertificates"] = o.ServerCertificates } if o.HttpRules != nil { toSerialize["httpRules"] = o.HttpRules } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancerForwardingRuleProperties struct { value *ApplicationLoadBalancerForwardingRuleProperties isSet bool } func (v NullableApplicationLoadBalancerForwardingRuleProperties) Get() *ApplicationLoadBalancerForwardingRuleProperties { return v.value } func (v *NullableApplicationLoadBalancerForwardingRuleProperties) Set(val *ApplicationLoadBalancerForwardingRuleProperties) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancerForwardingRuleProperties) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancerForwardingRuleProperties) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancerForwardingRuleProperties(val *ApplicationLoadBalancerForwardingRuleProperties) *NullableApplicationLoadBalancerForwardingRuleProperties { return &NullableApplicationLoadBalancerForwardingRuleProperties{value: val, isSet: true} } func (v NullableApplicationLoadBalancerForwardingRuleProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancerForwardingRuleProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancer_forwarding_rule_put.go000066400000000000000000000160721465267054300327040ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancerForwardingRulePut struct for ApplicationLoadBalancerForwardingRulePut type ApplicationLoadBalancerForwardingRulePut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *ApplicationLoadBalancerForwardingRuleProperties `json:"properties"` } // NewApplicationLoadBalancerForwardingRulePut instantiates a new ApplicationLoadBalancerForwardingRulePut object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancerForwardingRulePut(properties ApplicationLoadBalancerForwardingRuleProperties) *ApplicationLoadBalancerForwardingRulePut { this := ApplicationLoadBalancerForwardingRulePut{} this.Properties = &properties return &this } // NewApplicationLoadBalancerForwardingRulePutWithDefaults instantiates a new ApplicationLoadBalancerForwardingRulePut object // This 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 NewApplicationLoadBalancerForwardingRulePutWithDefaults() *ApplicationLoadBalancerForwardingRulePut { this := ApplicationLoadBalancerForwardingRulePut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRulePut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRulePut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *ApplicationLoadBalancerForwardingRulePut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRulePut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRulePut) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRulePut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ApplicationLoadBalancerForwardingRulePut) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRulePut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRulePut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRulePut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *ApplicationLoadBalancerForwardingRulePut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRulePut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRulePut) GetProperties() *ApplicationLoadBalancerForwardingRuleProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRulePut) GetPropertiesOk() (*ApplicationLoadBalancerForwardingRuleProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *ApplicationLoadBalancerForwardingRulePut) SetProperties(v ApplicationLoadBalancerForwardingRuleProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRulePut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o ApplicationLoadBalancerForwardingRulePut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancerForwardingRulePut struct { value *ApplicationLoadBalancerForwardingRulePut isSet bool } func (v NullableApplicationLoadBalancerForwardingRulePut) Get() *ApplicationLoadBalancerForwardingRulePut { return v.value } func (v *NullableApplicationLoadBalancerForwardingRulePut) Set(val *ApplicationLoadBalancerForwardingRulePut) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancerForwardingRulePut) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancerForwardingRulePut) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancerForwardingRulePut(val *ApplicationLoadBalancerForwardingRulePut) *NullableApplicationLoadBalancerForwardingRulePut { return &NullableApplicationLoadBalancerForwardingRulePut{value: val, isSet: true} } func (v NullableApplicationLoadBalancerForwardingRulePut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancerForwardingRulePut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancer_forwarding_rules.go000066400000000000000000000232761465267054300322030ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancerForwardingRules struct for ApplicationLoadBalancerForwardingRules type ApplicationLoadBalancerForwardingRules struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]ApplicationLoadBalancerForwardingRule `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewApplicationLoadBalancerForwardingRules instantiates a new ApplicationLoadBalancerForwardingRules object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancerForwardingRules() *ApplicationLoadBalancerForwardingRules { this := ApplicationLoadBalancerForwardingRules{} return &this } // NewApplicationLoadBalancerForwardingRulesWithDefaults instantiates a new ApplicationLoadBalancerForwardingRules object // This 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 NewApplicationLoadBalancerForwardingRulesWithDefaults() *ApplicationLoadBalancerForwardingRules { this := ApplicationLoadBalancerForwardingRules{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRules) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRules) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *ApplicationLoadBalancerForwardingRules) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRules) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRules) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRules) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ApplicationLoadBalancerForwardingRules) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRules) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRules) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRules) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *ApplicationLoadBalancerForwardingRules) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRules) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRules) GetItems() *[]ApplicationLoadBalancerForwardingRule { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRules) GetItemsOk() (*[]ApplicationLoadBalancerForwardingRule, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *ApplicationLoadBalancerForwardingRules) SetItems(v []ApplicationLoadBalancerForwardingRule) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRules) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRules) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRules) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *ApplicationLoadBalancerForwardingRules) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRules) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRules) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRules) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *ApplicationLoadBalancerForwardingRules) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRules) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerForwardingRules) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerForwardingRules) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *ApplicationLoadBalancerForwardingRules) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *ApplicationLoadBalancerForwardingRules) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o ApplicationLoadBalancerForwardingRules) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancerForwardingRules struct { value *ApplicationLoadBalancerForwardingRules isSet bool } func (v NullableApplicationLoadBalancerForwardingRules) Get() *ApplicationLoadBalancerForwardingRules { return v.value } func (v *NullableApplicationLoadBalancerForwardingRules) Set(val *ApplicationLoadBalancerForwardingRules) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancerForwardingRules) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancerForwardingRules) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancerForwardingRules(val *ApplicationLoadBalancerForwardingRules) *NullableApplicationLoadBalancerForwardingRules { return &NullableApplicationLoadBalancerForwardingRules{value: val, isSet: true} } func (v NullableApplicationLoadBalancerForwardingRules) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancerForwardingRules) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancer_http_rule.go000066400000000000000000000312111465267054300306210ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancerHttpRule struct for ApplicationLoadBalancerHttpRule type ApplicationLoadBalancerHttpRule struct { // The unique name of the Application Load Balancer HTTP rule. Name *string `json:"name"` // The HTTP rule type. Type *string `json:"type"` // The ID of the target group; this parameter is mandatory and is valid only for 'FORWARD' actions. TargetGroup *string `json:"targetGroup,omitempty"` // Indicates whether the query part of the URI should be dropped and is valid only for 'REDIRECT' actions. Default value is 'FALSE', the redirect URI does not contain any query parameters. DropQuery *bool `json:"dropQuery,omitempty"` // The location for the redirection; this parameter is mandatory and valid only for 'REDIRECT' actions. Location *string `json:"location,omitempty"` // The status code is for 'REDIRECT' and 'STATIC' actions only. If the HTTP rule is 'REDIRECT' the valid values are: 301, 302, 303, 307, 308; default value is '301'. If the HTTP rule is 'STATIC' the valid values are from the range 200-599; default value is '503'. StatusCode *int32 `json:"statusCode,omitempty"` // The response message of the request; this parameter is mandatory for 'STATIC' actions. ResponseMessage *string `json:"responseMessage,omitempty"` // Specifies the content type and is valid only for 'STATIC' actions. ContentType *string `json:"contentType,omitempty"` // An array of items in the collection. The action will be executed only if each condition is met; the rule will always be applied if no conditions are set. Conditions *[]ApplicationLoadBalancerHttpRuleCondition `json:"conditions,omitempty"` } // NewApplicationLoadBalancerHttpRule instantiates a new ApplicationLoadBalancerHttpRule object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancerHttpRule(name string, type_ string) *ApplicationLoadBalancerHttpRule { this := ApplicationLoadBalancerHttpRule{} this.Name = &name this.Type = &type_ return &this } // NewApplicationLoadBalancerHttpRuleWithDefaults instantiates a new ApplicationLoadBalancerHttpRule object // This 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 NewApplicationLoadBalancerHttpRuleWithDefaults() *ApplicationLoadBalancerHttpRule { this := ApplicationLoadBalancerHttpRule{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRule) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRule) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *ApplicationLoadBalancerHttpRule) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRule) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRule) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRule) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ApplicationLoadBalancerHttpRule) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRule) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetTargetGroup returns the TargetGroup field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRule) GetTargetGroup() *string { if o == nil { return nil } return o.TargetGroup } // GetTargetGroupOk returns a tuple with the TargetGroup field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRule) GetTargetGroupOk() (*string, bool) { if o == nil { return nil, false } return o.TargetGroup, true } // SetTargetGroup sets field value func (o *ApplicationLoadBalancerHttpRule) SetTargetGroup(v string) { o.TargetGroup = &v } // HasTargetGroup returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRule) HasTargetGroup() bool { if o != nil && o.TargetGroup != nil { return true } return false } // GetDropQuery returns the DropQuery field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRule) GetDropQuery() *bool { if o == nil { return nil } return o.DropQuery } // GetDropQueryOk returns a tuple with the DropQuery field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRule) GetDropQueryOk() (*bool, bool) { if o == nil { return nil, false } return o.DropQuery, true } // SetDropQuery sets field value func (o *ApplicationLoadBalancerHttpRule) SetDropQuery(v bool) { o.DropQuery = &v } // HasDropQuery returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRule) HasDropQuery() bool { if o != nil && o.DropQuery != nil { return true } return false } // GetLocation returns the Location field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRule) GetLocation() *string { if o == nil { return nil } return o.Location } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRule) GetLocationOk() (*string, bool) { if o == nil { return nil, false } return o.Location, true } // SetLocation sets field value func (o *ApplicationLoadBalancerHttpRule) SetLocation(v string) { o.Location = &v } // HasLocation returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRule) HasLocation() bool { if o != nil && o.Location != nil { return true } return false } // GetStatusCode returns the StatusCode field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRule) GetStatusCode() *int32 { if o == nil { return nil } return o.StatusCode } // GetStatusCodeOk returns a tuple with the StatusCode field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRule) GetStatusCodeOk() (*int32, bool) { if o == nil { return nil, false } return o.StatusCode, true } // SetStatusCode sets field value func (o *ApplicationLoadBalancerHttpRule) SetStatusCode(v int32) { o.StatusCode = &v } // HasStatusCode returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRule) HasStatusCode() bool { if o != nil && o.StatusCode != nil { return true } return false } // GetResponseMessage returns the ResponseMessage field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRule) GetResponseMessage() *string { if o == nil { return nil } return o.ResponseMessage } // GetResponseMessageOk returns a tuple with the ResponseMessage field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRule) GetResponseMessageOk() (*string, bool) { if o == nil { return nil, false } return o.ResponseMessage, true } // SetResponseMessage sets field value func (o *ApplicationLoadBalancerHttpRule) SetResponseMessage(v string) { o.ResponseMessage = &v } // HasResponseMessage returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRule) HasResponseMessage() bool { if o != nil && o.ResponseMessage != nil { return true } return false } // GetContentType returns the ContentType field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRule) GetContentType() *string { if o == nil { return nil } return o.ContentType } // GetContentTypeOk returns a tuple with the ContentType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRule) GetContentTypeOk() (*string, bool) { if o == nil { return nil, false } return o.ContentType, true } // SetContentType sets field value func (o *ApplicationLoadBalancerHttpRule) SetContentType(v string) { o.ContentType = &v } // HasContentType returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRule) HasContentType() bool { if o != nil && o.ContentType != nil { return true } return false } // GetConditions returns the Conditions field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRule) GetConditions() *[]ApplicationLoadBalancerHttpRuleCondition { if o == nil { return nil } return o.Conditions } // GetConditionsOk returns a tuple with the Conditions field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRule) GetConditionsOk() (*[]ApplicationLoadBalancerHttpRuleCondition, bool) { if o == nil { return nil, false } return o.Conditions, true } // SetConditions sets field value func (o *ApplicationLoadBalancerHttpRule) SetConditions(v []ApplicationLoadBalancerHttpRuleCondition) { o.Conditions = &v } // HasConditions returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRule) HasConditions() bool { if o != nil && o.Conditions != nil { return true } return false } func (o ApplicationLoadBalancerHttpRule) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Type != nil { toSerialize["type"] = o.Type } if o.TargetGroup != nil { toSerialize["targetGroup"] = o.TargetGroup } if o.DropQuery != nil { toSerialize["dropQuery"] = o.DropQuery } if o.Location != nil { toSerialize["location"] = o.Location } if o.StatusCode != nil { toSerialize["statusCode"] = o.StatusCode } if o.ResponseMessage != nil { toSerialize["responseMessage"] = o.ResponseMessage } if o.ContentType != nil { toSerialize["contentType"] = o.ContentType } if o.Conditions != nil { toSerialize["conditions"] = o.Conditions } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancerHttpRule struct { value *ApplicationLoadBalancerHttpRule isSet bool } func (v NullableApplicationLoadBalancerHttpRule) Get() *ApplicationLoadBalancerHttpRule { return v.value } func (v *NullableApplicationLoadBalancerHttpRule) Set(val *ApplicationLoadBalancerHttpRule) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancerHttpRule) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancerHttpRule) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancerHttpRule(val *ApplicationLoadBalancerHttpRule) *NullableApplicationLoadBalancerHttpRule { return &NullableApplicationLoadBalancerHttpRule{value: val, isSet: true} } func (v NullableApplicationLoadBalancerHttpRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancerHttpRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancer_http_rule_condition.go000066400000000000000000000205651465267054300327010ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancerHttpRuleCondition struct for ApplicationLoadBalancerHttpRuleCondition type ApplicationLoadBalancerHttpRuleCondition struct { // The HTTP rule condition type. Type *string `json:"type"` // The matching rule for the HTTP rule condition attribute; this parameter is mandatory for 'HEADER', 'PATH', 'QUERY', 'METHOD', 'HOST', and 'COOKIE' types. It must be 'null' if the type is 'SOURCE_IP'. Condition *string `json:"condition"` // Specifies whether the condition should be negated; the default value is 'FALSE'. Negate *bool `json:"negate,omitempty"` // The key can only be set when the HTTP rule condition type is 'COOKIES', 'HEADER', or 'QUERY'. For the type 'PATH', 'METHOD', 'HOST', or 'SOURCE_IP' the value must be 'null'. Key *string `json:"key,omitempty"` // This parameter is mandatory for the conditions 'CONTAINS', 'EQUALS', 'MATCHES', 'STARTS_WITH', 'ENDS_WITH', or if the type is 'SOURCE_IP'. Specify a valid CIDR. If the condition is 'EXISTS', the value must be 'null'. Value *string `json:"value,omitempty"` } // NewApplicationLoadBalancerHttpRuleCondition instantiates a new ApplicationLoadBalancerHttpRuleCondition object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancerHttpRuleCondition(type_ string, condition string) *ApplicationLoadBalancerHttpRuleCondition { this := ApplicationLoadBalancerHttpRuleCondition{} this.Type = &type_ this.Condition = &condition return &this } // NewApplicationLoadBalancerHttpRuleConditionWithDefaults instantiates a new ApplicationLoadBalancerHttpRuleCondition object // This 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 NewApplicationLoadBalancerHttpRuleConditionWithDefaults() *ApplicationLoadBalancerHttpRuleCondition { this := ApplicationLoadBalancerHttpRuleCondition{} return &this } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRuleCondition) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRuleCondition) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ApplicationLoadBalancerHttpRuleCondition) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRuleCondition) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetCondition returns the Condition field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRuleCondition) GetCondition() *string { if o == nil { return nil } return o.Condition } // GetConditionOk returns a tuple with the Condition field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRuleCondition) GetConditionOk() (*string, bool) { if o == nil { return nil, false } return o.Condition, true } // SetCondition sets field value func (o *ApplicationLoadBalancerHttpRuleCondition) SetCondition(v string) { o.Condition = &v } // HasCondition returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRuleCondition) HasCondition() bool { if o != nil && o.Condition != nil { return true } return false } // GetNegate returns the Negate field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRuleCondition) GetNegate() *bool { if o == nil { return nil } return o.Negate } // GetNegateOk returns a tuple with the Negate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRuleCondition) GetNegateOk() (*bool, bool) { if o == nil { return nil, false } return o.Negate, true } // SetNegate sets field value func (o *ApplicationLoadBalancerHttpRuleCondition) SetNegate(v bool) { o.Negate = &v } // HasNegate returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRuleCondition) HasNegate() bool { if o != nil && o.Negate != nil { return true } return false } // GetKey returns the Key field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRuleCondition) GetKey() *string { if o == nil { return nil } return o.Key } // GetKeyOk returns a tuple with the Key field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRuleCondition) GetKeyOk() (*string, bool) { if o == nil { return nil, false } return o.Key, true } // SetKey sets field value func (o *ApplicationLoadBalancerHttpRuleCondition) SetKey(v string) { o.Key = &v } // HasKey returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRuleCondition) HasKey() bool { if o != nil && o.Key != nil { return true } return false } // GetValue returns the Value field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerHttpRuleCondition) GetValue() *string { if o == nil { return nil } return o.Value } // GetValueOk returns a tuple with the Value field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerHttpRuleCondition) GetValueOk() (*string, bool) { if o == nil { return nil, false } return o.Value, true } // SetValue sets field value func (o *ApplicationLoadBalancerHttpRuleCondition) SetValue(v string) { o.Value = &v } // HasValue returns a boolean if a field has been set. func (o *ApplicationLoadBalancerHttpRuleCondition) HasValue() bool { if o != nil && o.Value != nil { return true } return false } func (o ApplicationLoadBalancerHttpRuleCondition) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Type != nil { toSerialize["type"] = o.Type } if o.Condition != nil { toSerialize["condition"] = o.Condition } if o.Negate != nil { toSerialize["negate"] = o.Negate } if o.Key != nil { toSerialize["key"] = o.Key } if o.Value != nil { toSerialize["value"] = o.Value } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancerHttpRuleCondition struct { value *ApplicationLoadBalancerHttpRuleCondition isSet bool } func (v NullableApplicationLoadBalancerHttpRuleCondition) Get() *ApplicationLoadBalancerHttpRuleCondition { return v.value } func (v *NullableApplicationLoadBalancerHttpRuleCondition) Set(val *ApplicationLoadBalancerHttpRuleCondition) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancerHttpRuleCondition) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancerHttpRuleCondition) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancerHttpRuleCondition(val *ApplicationLoadBalancerHttpRuleCondition) *NullableApplicationLoadBalancerHttpRuleCondition { return &NullableApplicationLoadBalancerHttpRuleCondition{value: val, isSet: true} } func (v NullableApplicationLoadBalancerHttpRuleCondition) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancerHttpRuleCondition) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancer_properties.go000066400000000000000000000246041465267054300310170ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancerProperties struct for ApplicationLoadBalancerProperties type ApplicationLoadBalancerProperties struct { // The Application Load Balancer name. Name *string `json:"name"` // The ID of the listening (inbound) LAN. ListenerLan *int32 `json:"listenerLan"` // Collection of the Application Load Balancer IP addresses. (Inbound and outbound) IPs of the 'listenerLan' are customer-reserved public IPs for the public load balancers, and private IPs for the private load balancers. Ips *[]string `json:"ips,omitempty"` // The ID of the balanced private target LAN (outbound). TargetLan *int32 `json:"targetLan"` // Collection of private IP addresses with the subnet mask of the Application Load Balancer. IPs must contain valid a subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. LbPrivateIps *[]string `json:"lbPrivateIps,omitempty"` // Turn logging on and off for this product. Default value is 'false'. CentralLogging *bool `json:"centralLogging,omitempty"` // Specifies the format of the logs. LoggingFormat *string `json:"loggingFormat,omitempty"` } // NewApplicationLoadBalancerProperties instantiates a new ApplicationLoadBalancerProperties object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancerProperties(name string, listenerLan int32, targetLan int32) *ApplicationLoadBalancerProperties { this := ApplicationLoadBalancerProperties{} this.Name = &name this.ListenerLan = &listenerLan this.TargetLan = &targetLan return &this } // NewApplicationLoadBalancerPropertiesWithDefaults instantiates a new ApplicationLoadBalancerProperties object // This 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 NewApplicationLoadBalancerPropertiesWithDefaults() *ApplicationLoadBalancerProperties { this := ApplicationLoadBalancerProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *ApplicationLoadBalancerProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *ApplicationLoadBalancerProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetListenerLan returns the ListenerLan field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerProperties) GetListenerLan() *int32 { if o == nil { return nil } return o.ListenerLan } // GetListenerLanOk returns a tuple with the ListenerLan field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerProperties) GetListenerLanOk() (*int32, bool) { if o == nil { return nil, false } return o.ListenerLan, true } // SetListenerLan sets field value func (o *ApplicationLoadBalancerProperties) SetListenerLan(v int32) { o.ListenerLan = &v } // HasListenerLan returns a boolean if a field has been set. func (o *ApplicationLoadBalancerProperties) HasListenerLan() bool { if o != nil && o.ListenerLan != nil { return true } return false } // GetIps returns the Ips field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerProperties) GetIps() *[]string { if o == nil { return nil } return o.Ips } // GetIpsOk returns a tuple with the Ips field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerProperties) GetIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.Ips, true } // SetIps sets field value func (o *ApplicationLoadBalancerProperties) SetIps(v []string) { o.Ips = &v } // HasIps returns a boolean if a field has been set. func (o *ApplicationLoadBalancerProperties) HasIps() bool { if o != nil && o.Ips != nil { return true } return false } // GetTargetLan returns the TargetLan field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerProperties) GetTargetLan() *int32 { if o == nil { return nil } return o.TargetLan } // GetTargetLanOk returns a tuple with the TargetLan field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerProperties) GetTargetLanOk() (*int32, bool) { if o == nil { return nil, false } return o.TargetLan, true } // SetTargetLan sets field value func (o *ApplicationLoadBalancerProperties) SetTargetLan(v int32) { o.TargetLan = &v } // HasTargetLan returns a boolean if a field has been set. func (o *ApplicationLoadBalancerProperties) HasTargetLan() bool { if o != nil && o.TargetLan != nil { return true } return false } // GetLbPrivateIps returns the LbPrivateIps field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerProperties) GetLbPrivateIps() *[]string { if o == nil { return nil } return o.LbPrivateIps } // GetLbPrivateIpsOk returns a tuple with the LbPrivateIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerProperties) GetLbPrivateIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.LbPrivateIps, true } // SetLbPrivateIps sets field value func (o *ApplicationLoadBalancerProperties) SetLbPrivateIps(v []string) { o.LbPrivateIps = &v } // HasLbPrivateIps returns a boolean if a field has been set. func (o *ApplicationLoadBalancerProperties) HasLbPrivateIps() bool { if o != nil && o.LbPrivateIps != nil { return true } return false } // GetCentralLogging returns the CentralLogging field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerProperties) GetCentralLogging() *bool { if o == nil { return nil } return o.CentralLogging } // GetCentralLoggingOk returns a tuple with the CentralLogging field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerProperties) GetCentralLoggingOk() (*bool, bool) { if o == nil { return nil, false } return o.CentralLogging, true } // SetCentralLogging sets field value func (o *ApplicationLoadBalancerProperties) SetCentralLogging(v bool) { o.CentralLogging = &v } // HasCentralLogging returns a boolean if a field has been set. func (o *ApplicationLoadBalancerProperties) HasCentralLogging() bool { if o != nil && o.CentralLogging != nil { return true } return false } // GetLoggingFormat returns the LoggingFormat field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerProperties) GetLoggingFormat() *string { if o == nil { return nil } return o.LoggingFormat } // GetLoggingFormatOk returns a tuple with the LoggingFormat field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerProperties) GetLoggingFormatOk() (*string, bool) { if o == nil { return nil, false } return o.LoggingFormat, true } // SetLoggingFormat sets field value func (o *ApplicationLoadBalancerProperties) SetLoggingFormat(v string) { o.LoggingFormat = &v } // HasLoggingFormat returns a boolean if a field has been set. func (o *ApplicationLoadBalancerProperties) HasLoggingFormat() bool { if o != nil && o.LoggingFormat != nil { return true } return false } func (o ApplicationLoadBalancerProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.ListenerLan != nil { toSerialize["listenerLan"] = o.ListenerLan } if o.Ips != nil { toSerialize["ips"] = o.Ips } if o.TargetLan != nil { toSerialize["targetLan"] = o.TargetLan } if o.LbPrivateIps != nil { toSerialize["lbPrivateIps"] = o.LbPrivateIps } if o.CentralLogging != nil { toSerialize["centralLogging"] = o.CentralLogging } if o.LoggingFormat != nil { toSerialize["loggingFormat"] = o.LoggingFormat } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancerProperties struct { value *ApplicationLoadBalancerProperties isSet bool } func (v NullableApplicationLoadBalancerProperties) Get() *ApplicationLoadBalancerProperties { return v.value } func (v *NullableApplicationLoadBalancerProperties) Set(val *ApplicationLoadBalancerProperties) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancerProperties) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancerProperties) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancerProperties(val *ApplicationLoadBalancerProperties) *NullableApplicationLoadBalancerProperties { return &NullableApplicationLoadBalancerProperties{value: val, isSet: true} } func (v NullableApplicationLoadBalancerProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancerProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancer_put.go000066400000000000000000000145761465267054300274420ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancerPut struct for ApplicationLoadBalancerPut type ApplicationLoadBalancerPut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *ApplicationLoadBalancerProperties `json:"properties"` } // NewApplicationLoadBalancerPut instantiates a new ApplicationLoadBalancerPut object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancerPut(properties ApplicationLoadBalancerProperties) *ApplicationLoadBalancerPut { this := ApplicationLoadBalancerPut{} this.Properties = &properties return &this } // NewApplicationLoadBalancerPutWithDefaults instantiates a new ApplicationLoadBalancerPut object // This 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 NewApplicationLoadBalancerPutWithDefaults() *ApplicationLoadBalancerPut { this := ApplicationLoadBalancerPut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerPut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *ApplicationLoadBalancerPut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *ApplicationLoadBalancerPut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerPut) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ApplicationLoadBalancerPut) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ApplicationLoadBalancerPut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerPut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *ApplicationLoadBalancerPut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *ApplicationLoadBalancerPut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancerPut) GetProperties() *ApplicationLoadBalancerProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancerPut) GetPropertiesOk() (*ApplicationLoadBalancerProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *ApplicationLoadBalancerPut) SetProperties(v ApplicationLoadBalancerProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *ApplicationLoadBalancerPut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o ApplicationLoadBalancerPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancerPut struct { value *ApplicationLoadBalancerPut isSet bool } func (v NullableApplicationLoadBalancerPut) Get() *ApplicationLoadBalancerPut { return v.value } func (v *NullableApplicationLoadBalancerPut) Set(val *ApplicationLoadBalancerPut) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancerPut) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancerPut) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancerPut(val *ApplicationLoadBalancerPut) *NullableApplicationLoadBalancerPut { return &NullableApplicationLoadBalancerPut{value: val, isSet: true} } func (v NullableApplicationLoadBalancerPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancerPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_application_load_balancers.go000066400000000000000000000215661465267054300267320ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ApplicationLoadBalancers struct for ApplicationLoadBalancers type ApplicationLoadBalancers struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]ApplicationLoadBalancer `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewApplicationLoadBalancers instantiates a new ApplicationLoadBalancers object // This constructor will assign default values to properties that have it defined, // 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 NewApplicationLoadBalancers() *ApplicationLoadBalancers { this := ApplicationLoadBalancers{} return &this } // NewApplicationLoadBalancersWithDefaults instantiates a new ApplicationLoadBalancers object // This 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 NewApplicationLoadBalancersWithDefaults() *ApplicationLoadBalancers { this := ApplicationLoadBalancers{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancers) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancers) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *ApplicationLoadBalancers) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *ApplicationLoadBalancers) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancers) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ApplicationLoadBalancers) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ApplicationLoadBalancers) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancers) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *ApplicationLoadBalancers) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *ApplicationLoadBalancers) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancers) GetItems() *[]ApplicationLoadBalancer { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancers) GetItemsOk() (*[]ApplicationLoadBalancer, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *ApplicationLoadBalancers) SetItems(v []ApplicationLoadBalancer) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *ApplicationLoadBalancers) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancers) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancers) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *ApplicationLoadBalancers) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *ApplicationLoadBalancers) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancers) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancers) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *ApplicationLoadBalancers) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *ApplicationLoadBalancers) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *ApplicationLoadBalancers) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ApplicationLoadBalancers) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *ApplicationLoadBalancers) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *ApplicationLoadBalancers) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o ApplicationLoadBalancers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableApplicationLoadBalancers struct { value *ApplicationLoadBalancers isSet bool } func (v NullableApplicationLoadBalancers) Get() *ApplicationLoadBalancers { return v.value } func (v *NullableApplicationLoadBalancers) Set(val *ApplicationLoadBalancers) { v.value = val v.isSet = true } func (v NullableApplicationLoadBalancers) IsSet() bool { return v.isSet } func (v *NullableApplicationLoadBalancers) Unset() { v.value = nil v.isSet = false } func NewNullableApplicationLoadBalancers(val *ApplicationLoadBalancers) *NullableApplicationLoadBalancers { return &NullableApplicationLoadBalancers{value: val, isSet: true} } func (v NullableApplicationLoadBalancers) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableApplicationLoadBalancers) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_attached_volumes.go000066400000000000000000000204721465267054300247400ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // AttachedVolumes struct for AttachedVolumes type AttachedVolumes struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Volume `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewAttachedVolumes instantiates a new AttachedVolumes object // This constructor will assign default values to properties that have it defined, // 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 NewAttachedVolumes() *AttachedVolumes { this := AttachedVolumes{} return &this } // NewAttachedVolumesWithDefaults instantiates a new AttachedVolumes object // This 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 NewAttachedVolumesWithDefaults() *AttachedVolumes { this := AttachedVolumes{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *AttachedVolumes) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AttachedVolumes) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *AttachedVolumes) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *AttachedVolumes) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *AttachedVolumes) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AttachedVolumes) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *AttachedVolumes) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *AttachedVolumes) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *AttachedVolumes) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AttachedVolumes) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *AttachedVolumes) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *AttachedVolumes) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *AttachedVolumes) GetItems() *[]Volume { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AttachedVolumes) GetItemsOk() (*[]Volume, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *AttachedVolumes) SetItems(v []Volume) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *AttachedVolumes) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *AttachedVolumes) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AttachedVolumes) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *AttachedVolumes) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *AttachedVolumes) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *AttachedVolumes) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AttachedVolumes) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *AttachedVolumes) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *AttachedVolumes) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *AttachedVolumes) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *AttachedVolumes) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *AttachedVolumes) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *AttachedVolumes) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o AttachedVolumes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableAttachedVolumes struct { value *AttachedVolumes isSet bool } func (v NullableAttachedVolumes) Get() *AttachedVolumes { return v.value } func (v *NullableAttachedVolumes) Set(val *AttachedVolumes) { v.value = val v.isSet = true } func (v NullableAttachedVolumes) IsSet() bool { return v.isSet } func (v *NullableAttachedVolumes) Unset() { v.value = nil v.isSet = false } func NewNullableAttachedVolumes(val *AttachedVolumes) *NullableAttachedVolumes { return &NullableAttachedVolumes{value: val, isSet: true} } func (v NullableAttachedVolumes) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableAttachedVolumes) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_backup_unit.go000066400000000000000000000151051465267054300237120ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // BackupUnit struct for BackupUnit type BackupUnit struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *string `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *BackupUnitProperties `json:"properties"` } // NewBackupUnit instantiates a new BackupUnit object // This constructor will assign default values to properties that have it defined, // 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 NewBackupUnit(properties BackupUnitProperties) *BackupUnit { this := BackupUnit{} this.Properties = &properties return &this } // NewBackupUnitWithDefaults instantiates a new BackupUnit object // This 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 NewBackupUnitWithDefaults() *BackupUnit { this := BackupUnit{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *BackupUnit) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnit) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *BackupUnit) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *BackupUnit) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *BackupUnit) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnit) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *BackupUnit) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *BackupUnit) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *BackupUnit) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnit) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *BackupUnit) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *BackupUnit) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *BackupUnit) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnit) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *BackupUnit) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *BackupUnit) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *BackupUnit) GetProperties() *BackupUnitProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnit) GetPropertiesOk() (*BackupUnitProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *BackupUnit) SetProperties(v BackupUnitProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *BackupUnit) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o BackupUnit) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableBackupUnit struct { value *BackupUnit isSet bool } func (v NullableBackupUnit) Get() *BackupUnit { return v.value } func (v *NullableBackupUnit) Set(val *BackupUnit) { v.value = val v.isSet = true } func (v NullableBackupUnit) IsSet() bool { return v.isSet } func (v *NullableBackupUnit) Unset() { v.value = nil v.isSet = false } func NewNullableBackupUnit(val *BackupUnit) *NullableBackupUnit { return &NullableBackupUnit{value: val, isSet: true} } func (v NullableBackupUnit) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableBackupUnit) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_backup_unit_properties.go000066400000000000000000000123311465267054300261640ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // BackupUnitProperties struct for BackupUnitProperties type BackupUnitProperties struct { // The name of the resource (alphanumeric characters only). Name *string `json:"name"` // The password associated with that resource. Password *string `json:"password,omitempty"` // The email associated with the backup unit. Bear in mind that this email does not be the same email as of the user. Email *string `json:"email,omitempty"` } // NewBackupUnitProperties instantiates a new BackupUnitProperties object // This constructor will assign default values to properties that have it defined, // 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 NewBackupUnitProperties(name string) *BackupUnitProperties { this := BackupUnitProperties{} this.Name = &name return &this } // NewBackupUnitPropertiesWithDefaults instantiates a new BackupUnitProperties object // This 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 NewBackupUnitPropertiesWithDefaults() *BackupUnitProperties { this := BackupUnitProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *BackupUnitProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnitProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *BackupUnitProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *BackupUnitProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetPassword returns the Password field value // If the value is explicit nil, nil is returned func (o *BackupUnitProperties) GetPassword() *string { if o == nil { return nil } return o.Password } // GetPasswordOk returns a tuple with the Password field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnitProperties) GetPasswordOk() (*string, bool) { if o == nil { return nil, false } return o.Password, true } // SetPassword sets field value func (o *BackupUnitProperties) SetPassword(v string) { o.Password = &v } // HasPassword returns a boolean if a field has been set. func (o *BackupUnitProperties) HasPassword() bool { if o != nil && o.Password != nil { return true } return false } // GetEmail returns the Email field value // If the value is explicit nil, nil is returned func (o *BackupUnitProperties) GetEmail() *string { if o == nil { return nil } return o.Email } // GetEmailOk returns a tuple with the Email field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnitProperties) GetEmailOk() (*string, bool) { if o == nil { return nil, false } return o.Email, true } // SetEmail sets field value func (o *BackupUnitProperties) SetEmail(v string) { o.Email = &v } // HasEmail returns a boolean if a field has been set. func (o *BackupUnitProperties) HasEmail() bool { if o != nil && o.Email != nil { return true } return false } func (o BackupUnitProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Password != nil { toSerialize["password"] = o.Password } if o.Email != nil { toSerialize["email"] = o.Email } return json.Marshal(toSerialize) } type NullableBackupUnitProperties struct { value *BackupUnitProperties isSet bool } func (v NullableBackupUnitProperties) Get() *BackupUnitProperties { return v.value } func (v *NullableBackupUnitProperties) Set(val *BackupUnitProperties) { v.value = val v.isSet = true } func (v NullableBackupUnitProperties) IsSet() bool { return v.isSet } func (v *NullableBackupUnitProperties) Unset() { v.value = nil v.isSet = false } func NewNullableBackupUnitProperties(val *BackupUnitProperties) *NullableBackupUnitProperties { return &NullableBackupUnitProperties{value: val, isSet: true} } func (v NullableBackupUnitProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableBackupUnitProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_backup_unit_sso.go000066400000000000000000000061031465267054300245740ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // BackupUnitSSO struct for BackupUnitSSO type BackupUnitSSO struct { // The backup unit single sign on url SsoUrl *string `json:"ssoUrl,omitempty"` } // NewBackupUnitSSO instantiates a new BackupUnitSSO object // This constructor will assign default values to properties that have it defined, // 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 NewBackupUnitSSO() *BackupUnitSSO { this := BackupUnitSSO{} return &this } // NewBackupUnitSSOWithDefaults instantiates a new BackupUnitSSO object // This 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 NewBackupUnitSSOWithDefaults() *BackupUnitSSO { this := BackupUnitSSO{} return &this } // GetSsoUrl returns the SsoUrl field value // If the value is explicit nil, nil is returned func (o *BackupUnitSSO) GetSsoUrl() *string { if o == nil { return nil } return o.SsoUrl } // GetSsoUrlOk returns a tuple with the SsoUrl field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnitSSO) GetSsoUrlOk() (*string, bool) { if o == nil { return nil, false } return o.SsoUrl, true } // SetSsoUrl sets field value func (o *BackupUnitSSO) SetSsoUrl(v string) { o.SsoUrl = &v } // HasSsoUrl returns a boolean if a field has been set. func (o *BackupUnitSSO) HasSsoUrl() bool { if o != nil && o.SsoUrl != nil { return true } return false } func (o BackupUnitSSO) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.SsoUrl != nil { toSerialize["ssoUrl"] = o.SsoUrl } return json.Marshal(toSerialize) } type NullableBackupUnitSSO struct { value *BackupUnitSSO isSet bool } func (v NullableBackupUnitSSO) Get() *BackupUnitSSO { return v.value } func (v *NullableBackupUnitSSO) Set(val *BackupUnitSSO) { v.value = val v.isSet = true } func (v NullableBackupUnitSSO) IsSet() bool { return v.isSet } func (v *NullableBackupUnitSSO) Unset() { v.value = nil v.isSet = false } func NewNullableBackupUnitSSO(val *BackupUnitSSO) *NullableBackupUnitSSO { return &NullableBackupUnitSSO{value: val, isSet: true} } func (v NullableBackupUnitSSO) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableBackupUnitSSO) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_backup_units.go000066400000000000000000000127761465267054300241100ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // BackupUnits struct for BackupUnits type BackupUnits struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *string `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]BackupUnit `json:"items,omitempty"` } // NewBackupUnits instantiates a new BackupUnits object // This constructor will assign default values to properties that have it defined, // 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 NewBackupUnits() *BackupUnits { this := BackupUnits{} return &this } // NewBackupUnitsWithDefaults instantiates a new BackupUnits object // This 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 NewBackupUnitsWithDefaults() *BackupUnits { this := BackupUnits{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *BackupUnits) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnits) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *BackupUnits) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *BackupUnits) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *BackupUnits) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnits) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *BackupUnits) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *BackupUnits) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *BackupUnits) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnits) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *BackupUnits) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *BackupUnits) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *BackupUnits) GetItems() *[]BackupUnit { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BackupUnits) GetItemsOk() (*[]BackupUnit, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *BackupUnits) SetItems(v []BackupUnit) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *BackupUnits) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o BackupUnits) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableBackupUnits struct { value *BackupUnits isSet bool } func (v NullableBackupUnits) Get() *BackupUnits { return v.value } func (v *NullableBackupUnits) Set(val *BackupUnits) { v.value = val v.isSet = true } func (v NullableBackupUnits) IsSet() bool { return v.isSet } func (v *NullableBackupUnits) Unset() { v.value = nil v.isSet = false } func NewNullableBackupUnits(val *BackupUnits) *NullableBackupUnits { return &NullableBackupUnits{value: val, isSet: true} } func (v NullableBackupUnits) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableBackupUnits) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_balanced_nics.go000066400000000000000000000202021465267054300241450ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // BalancedNics struct for BalancedNics type BalancedNics struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Nic `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewBalancedNics instantiates a new BalancedNics object // This constructor will assign default values to properties that have it defined, // 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 NewBalancedNics() *BalancedNics { this := BalancedNics{} return &this } // NewBalancedNicsWithDefaults instantiates a new BalancedNics object // This 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 NewBalancedNicsWithDefaults() *BalancedNics { this := BalancedNics{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *BalancedNics) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BalancedNics) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *BalancedNics) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *BalancedNics) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *BalancedNics) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BalancedNics) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *BalancedNics) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *BalancedNics) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *BalancedNics) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BalancedNics) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *BalancedNics) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *BalancedNics) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *BalancedNics) GetItems() *[]Nic { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BalancedNics) GetItemsOk() (*[]Nic, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *BalancedNics) SetItems(v []Nic) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *BalancedNics) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *BalancedNics) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BalancedNics) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *BalancedNics) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *BalancedNics) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *BalancedNics) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BalancedNics) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *BalancedNics) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *BalancedNics) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *BalancedNics) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *BalancedNics) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *BalancedNics) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *BalancedNics) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o BalancedNics) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableBalancedNics struct { value *BalancedNics isSet bool } func (v NullableBalancedNics) Get() *BalancedNics { return v.value } func (v *NullableBalancedNics) Set(val *BalancedNics) { v.value = val v.isSet = true } func (v NullableBalancedNics) IsSet() bool { return v.isSet } func (v *NullableBalancedNics) Unset() { v.value = nil v.isSet = false } func NewNullableBalancedNics(val *BalancedNics) *NullableBalancedNics { return &NullableBalancedNics{value: val, isSet: true} } func (v NullableBalancedNics) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableBalancedNics) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_cdroms.go000066400000000000000000000174721465267054300227060ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Cdroms struct for Cdroms type Cdroms struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Image `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewCdroms instantiates a new Cdroms object // This constructor will assign default values to properties that have it defined, // 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 NewCdroms() *Cdroms { this := Cdroms{} return &this } // NewCdromsWithDefaults instantiates a new Cdroms object // This 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 NewCdromsWithDefaults() *Cdroms { this := Cdroms{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Cdroms) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Cdroms) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Cdroms) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Cdroms) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Cdroms) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Cdroms) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Cdroms) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Cdroms) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Cdroms) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Cdroms) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Cdroms) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Cdroms) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Cdroms) GetItems() *[]Image { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Cdroms) GetItemsOk() (*[]Image, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Cdroms) SetItems(v []Image) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Cdroms) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *Cdroms) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Cdroms) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *Cdroms) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *Cdroms) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *Cdroms) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Cdroms) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *Cdroms) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *Cdroms) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *Cdroms) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Cdroms) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *Cdroms) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *Cdroms) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o Cdroms) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableCdroms struct { value *Cdroms isSet bool } func (v NullableCdroms) Get() *Cdroms { return v.value } func (v *NullableCdroms) Set(val *Cdroms) { v.value = val v.isSet = true } func (v NullableCdroms) IsSet() bool { return v.isSet } func (v *NullableCdroms) Unset() { v.value = nil v.isSet = false } func NewNullableCdroms(val *Cdroms) *NullableCdroms { return &NullableCdroms{value: val, isSet: true} } func (v NullableCdroms) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableCdroms) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_connectable_datacenter.go000066400000000000000000000123101465267054300260500ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ConnectableDatacenter struct for ConnectableDatacenter type ConnectableDatacenter struct { // Identifier of the virtual data center that can be connected to the Cross Connect. Id *string `json:"id,omitempty"` // Name of the virtual data center that can be connected to the Cross Connect. Name *string `json:"name,omitempty"` // Location of the virtual data center that can be connected to the Cross Connect. Location *string `json:"location,omitempty"` } // NewConnectableDatacenter instantiates a new ConnectableDatacenter object // This constructor will assign default values to properties that have it defined, // 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 NewConnectableDatacenter() *ConnectableDatacenter { this := ConnectableDatacenter{} return &this } // NewConnectableDatacenterWithDefaults instantiates a new ConnectableDatacenter object // This 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 NewConnectableDatacenterWithDefaults() *ConnectableDatacenter { this := ConnectableDatacenter{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *ConnectableDatacenter) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ConnectableDatacenter) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *ConnectableDatacenter) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *ConnectableDatacenter) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *ConnectableDatacenter) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ConnectableDatacenter) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *ConnectableDatacenter) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *ConnectableDatacenter) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetLocation returns the Location field value // If the value is explicit nil, nil is returned func (o *ConnectableDatacenter) GetLocation() *string { if o == nil { return nil } return o.Location } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ConnectableDatacenter) GetLocationOk() (*string, bool) { if o == nil { return nil, false } return o.Location, true } // SetLocation sets field value func (o *ConnectableDatacenter) SetLocation(v string) { o.Location = &v } // HasLocation returns a boolean if a field has been set. func (o *ConnectableDatacenter) HasLocation() bool { if o != nil && o.Location != nil { return true } return false } func (o ConnectableDatacenter) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Name != nil { toSerialize["name"] = o.Name } if o.Location != nil { toSerialize["location"] = o.Location } return json.Marshal(toSerialize) } type NullableConnectableDatacenter struct { value *ConnectableDatacenter isSet bool } func (v NullableConnectableDatacenter) Get() *ConnectableDatacenter { return v.value } func (v *NullableConnectableDatacenter) Set(val *ConnectableDatacenter) { v.value = val v.isSet = true } func (v NullableConnectableDatacenter) IsSet() bool { return v.isSet } func (v *NullableConnectableDatacenter) Unset() { v.value = nil v.isSet = false } func NewNullableConnectableDatacenter(val *ConnectableDatacenter) *NullableConnectableDatacenter { return &NullableConnectableDatacenter{value: val, isSet: true} } func (v NullableConnectableDatacenter) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableConnectableDatacenter) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_contract.go000066400000000000000000000075721465267054300232340ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Contract struct for Contract type Contract struct { // The type of the resource. Type *Type `json:"type,omitempty"` Properties *ContractProperties `json:"properties"` } // NewContract instantiates a new Contract object // This constructor will assign default values to properties that have it defined, // 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 NewContract(properties ContractProperties) *Contract { this := Contract{} this.Properties = &properties return &this } // NewContractWithDefaults instantiates a new Contract object // This 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 NewContractWithDefaults() *Contract { this := Contract{} return &this } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Contract) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Contract) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Contract) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Contract) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Contract) GetProperties() *ContractProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Contract) GetPropertiesOk() (*ContractProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Contract) SetProperties(v ContractProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Contract) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o Contract) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Type != nil { toSerialize["type"] = o.Type } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableContract struct { value *Contract isSet bool } func (v NullableContract) Get() *Contract { return v.value } func (v *NullableContract) Set(val *Contract) { v.value = val v.isSet = true } func (v NullableContract) IsSet() bool { return v.isSet } func (v *NullableContract) Unset() { v.value = nil v.isSet = false } func NewNullableContract(val *Contract) *NullableContract { return &NullableContract{value: val, isSet: true} } func (v NullableContract) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableContract) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_contract_properties.go000066400000000000000000000162121465267054300254770ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ContractProperties struct for ContractProperties type ContractProperties struct { // The contract number. ContractNumber *int64 `json:"contractNumber,omitempty"` // The contract owner's user name. Owner *string `json:"owner,omitempty"` // The contract status. Status *string `json:"status,omitempty"` // The registration domain of the contract. RegDomain *string `json:"regDomain,omitempty"` ResourceLimits *ResourceLimits `json:"resourceLimits,omitempty"` } // NewContractProperties instantiates a new ContractProperties object // This constructor will assign default values to properties that have it defined, // 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 NewContractProperties() *ContractProperties { this := ContractProperties{} return &this } // NewContractPropertiesWithDefaults instantiates a new ContractProperties object // This 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 NewContractPropertiesWithDefaults() *ContractProperties { this := ContractProperties{} return &this } // GetContractNumber returns the ContractNumber field value // If the value is explicit nil, nil is returned func (o *ContractProperties) GetContractNumber() *int64 { if o == nil { return nil } return o.ContractNumber } // GetContractNumberOk returns a tuple with the ContractNumber field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ContractProperties) GetContractNumberOk() (*int64, bool) { if o == nil { return nil, false } return o.ContractNumber, true } // SetContractNumber sets field value func (o *ContractProperties) SetContractNumber(v int64) { o.ContractNumber = &v } // HasContractNumber returns a boolean if a field has been set. func (o *ContractProperties) HasContractNumber() bool { if o != nil && o.ContractNumber != nil { return true } return false } // GetOwner returns the Owner field value // If the value is explicit nil, nil is returned func (o *ContractProperties) GetOwner() *string { if o == nil { return nil } return o.Owner } // GetOwnerOk returns a tuple with the Owner field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ContractProperties) GetOwnerOk() (*string, bool) { if o == nil { return nil, false } return o.Owner, true } // SetOwner sets field value func (o *ContractProperties) SetOwner(v string) { o.Owner = &v } // HasOwner returns a boolean if a field has been set. func (o *ContractProperties) HasOwner() bool { if o != nil && o.Owner != nil { return true } return false } // GetStatus returns the Status field value // If the value is explicit nil, nil is returned func (o *ContractProperties) GetStatus() *string { if o == nil { return nil } return o.Status } // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ContractProperties) GetStatusOk() (*string, bool) { if o == nil { return nil, false } return o.Status, true } // SetStatus sets field value func (o *ContractProperties) SetStatus(v string) { o.Status = &v } // HasStatus returns a boolean if a field has been set. func (o *ContractProperties) HasStatus() bool { if o != nil && o.Status != nil { return true } return false } // GetRegDomain returns the RegDomain field value // If the value is explicit nil, nil is returned func (o *ContractProperties) GetRegDomain() *string { if o == nil { return nil } return o.RegDomain } // GetRegDomainOk returns a tuple with the RegDomain field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ContractProperties) GetRegDomainOk() (*string, bool) { if o == nil { return nil, false } return o.RegDomain, true } // SetRegDomain sets field value func (o *ContractProperties) SetRegDomain(v string) { o.RegDomain = &v } // HasRegDomain returns a boolean if a field has been set. func (o *ContractProperties) HasRegDomain() bool { if o != nil && o.RegDomain != nil { return true } return false } // GetResourceLimits returns the ResourceLimits field value // If the value is explicit nil, nil is returned func (o *ContractProperties) GetResourceLimits() *ResourceLimits { if o == nil { return nil } return o.ResourceLimits } // GetResourceLimitsOk returns a tuple with the ResourceLimits field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ContractProperties) GetResourceLimitsOk() (*ResourceLimits, bool) { if o == nil { return nil, false } return o.ResourceLimits, true } // SetResourceLimits sets field value func (o *ContractProperties) SetResourceLimits(v ResourceLimits) { o.ResourceLimits = &v } // HasResourceLimits returns a boolean if a field has been set. func (o *ContractProperties) HasResourceLimits() bool { if o != nil && o.ResourceLimits != nil { return true } return false } func (o ContractProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ContractNumber != nil { toSerialize["contractNumber"] = o.ContractNumber } if o.Owner != nil { toSerialize["owner"] = o.Owner } if o.Status != nil { toSerialize["status"] = o.Status } if o.RegDomain != nil { toSerialize["regDomain"] = o.RegDomain } if o.ResourceLimits != nil { toSerialize["resourceLimits"] = o.ResourceLimits } return json.Marshal(toSerialize) } type NullableContractProperties struct { value *ContractProperties isSet bool } func (v NullableContractProperties) Get() *ContractProperties { return v.value } func (v *NullableContractProperties) Set(val *ContractProperties) { v.value = val v.isSet = true } func (v NullableContractProperties) IsSet() bool { return v.isSet } func (v *NullableContractProperties) Unset() { v.value = nil v.isSet = false } func NewNullableContractProperties(val *ContractProperties) *NullableContractProperties { return &NullableContractProperties{value: val, isSet: true} } func (v NullableContractProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableContractProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_contracts.go000066400000000000000000000126321465267054300234100ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Contracts struct for Contracts type Contracts struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Contract `json:"items,omitempty"` } // NewContracts instantiates a new Contracts object // This constructor will assign default values to properties that have it defined, // 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 NewContracts() *Contracts { this := Contracts{} return &this } // NewContractsWithDefaults instantiates a new Contracts object // This 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 NewContractsWithDefaults() *Contracts { this := Contracts{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Contracts) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Contracts) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Contracts) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Contracts) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Contracts) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Contracts) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Contracts) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Contracts) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Contracts) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Contracts) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Contracts) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Contracts) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Contracts) GetItems() *[]Contract { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Contracts) GetItemsOk() (*[]Contract, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Contracts) SetItems(v []Contract) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Contracts) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o Contracts) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableContracts struct { value *Contracts isSet bool } func (v NullableContracts) Get() *Contracts { return v.value } func (v *NullableContracts) Set(val *Contracts) { v.value = val v.isSet = true } func (v NullableContracts) IsSet() bool { return v.isSet } func (v *NullableContracts) Unset() { v.value = nil v.isSet = false } func NewNullableContracts(val *Contracts) *NullableContracts { return &NullableContracts{value: val, isSet: true} } func (v NullableContracts) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableContracts) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_cpu_architecture_properties.go000066400000000000000000000144451465267054300272210ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // CpuArchitectureProperties struct for CpuArchitectureProperties type CpuArchitectureProperties struct { // A valid CPU family name. CpuFamily *string `json:"cpuFamily,omitempty"` // The maximum number of cores available. MaxCores *int32 `json:"maxCores,omitempty"` // The maximum RAM size in MB. MaxRam *int32 `json:"maxRam,omitempty"` // A valid CPU vendor name. Vendor *string `json:"vendor,omitempty"` } // NewCpuArchitectureProperties instantiates a new CpuArchitectureProperties object // This constructor will assign default values to properties that have it defined, // 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 NewCpuArchitectureProperties() *CpuArchitectureProperties { this := CpuArchitectureProperties{} return &this } // NewCpuArchitecturePropertiesWithDefaults instantiates a new CpuArchitectureProperties object // This 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 NewCpuArchitecturePropertiesWithDefaults() *CpuArchitectureProperties { this := CpuArchitectureProperties{} return &this } // GetCpuFamily returns the CpuFamily field value // If the value is explicit nil, nil is returned func (o *CpuArchitectureProperties) GetCpuFamily() *string { if o == nil { return nil } return o.CpuFamily } // GetCpuFamilyOk returns a tuple with the CpuFamily field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CpuArchitectureProperties) GetCpuFamilyOk() (*string, bool) { if o == nil { return nil, false } return o.CpuFamily, true } // SetCpuFamily sets field value func (o *CpuArchitectureProperties) SetCpuFamily(v string) { o.CpuFamily = &v } // HasCpuFamily returns a boolean if a field has been set. func (o *CpuArchitectureProperties) HasCpuFamily() bool { if o != nil && o.CpuFamily != nil { return true } return false } // GetMaxCores returns the MaxCores field value // If the value is explicit nil, nil is returned func (o *CpuArchitectureProperties) GetMaxCores() *int32 { if o == nil { return nil } return o.MaxCores } // GetMaxCoresOk returns a tuple with the MaxCores field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CpuArchitectureProperties) GetMaxCoresOk() (*int32, bool) { if o == nil { return nil, false } return o.MaxCores, true } // SetMaxCores sets field value func (o *CpuArchitectureProperties) SetMaxCores(v int32) { o.MaxCores = &v } // HasMaxCores returns a boolean if a field has been set. func (o *CpuArchitectureProperties) HasMaxCores() bool { if o != nil && o.MaxCores != nil { return true } return false } // GetMaxRam returns the MaxRam field value // If the value is explicit nil, nil is returned func (o *CpuArchitectureProperties) GetMaxRam() *int32 { if o == nil { return nil } return o.MaxRam } // GetMaxRamOk returns a tuple with the MaxRam field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CpuArchitectureProperties) GetMaxRamOk() (*int32, bool) { if o == nil { return nil, false } return o.MaxRam, true } // SetMaxRam sets field value func (o *CpuArchitectureProperties) SetMaxRam(v int32) { o.MaxRam = &v } // HasMaxRam returns a boolean if a field has been set. func (o *CpuArchitectureProperties) HasMaxRam() bool { if o != nil && o.MaxRam != nil { return true } return false } // GetVendor returns the Vendor field value // If the value is explicit nil, nil is returned func (o *CpuArchitectureProperties) GetVendor() *string { if o == nil { return nil } return o.Vendor } // GetVendorOk returns a tuple with the Vendor field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CpuArchitectureProperties) GetVendorOk() (*string, bool) { if o == nil { return nil, false } return o.Vendor, true } // SetVendor sets field value func (o *CpuArchitectureProperties) SetVendor(v string) { o.Vendor = &v } // HasVendor returns a boolean if a field has been set. func (o *CpuArchitectureProperties) HasVendor() bool { if o != nil && o.Vendor != nil { return true } return false } func (o CpuArchitectureProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.CpuFamily != nil { toSerialize["cpuFamily"] = o.CpuFamily } if o.MaxCores != nil { toSerialize["maxCores"] = o.MaxCores } if o.MaxRam != nil { toSerialize["maxRam"] = o.MaxRam } if o.Vendor != nil { toSerialize["vendor"] = o.Vendor } return json.Marshal(toSerialize) } type NullableCpuArchitectureProperties struct { value *CpuArchitectureProperties isSet bool } func (v NullableCpuArchitectureProperties) Get() *CpuArchitectureProperties { return v.value } func (v *NullableCpuArchitectureProperties) Set(val *CpuArchitectureProperties) { v.value = val v.isSet = true } func (v NullableCpuArchitectureProperties) IsSet() bool { return v.isSet } func (v *NullableCpuArchitectureProperties) Unset() { v.value = nil v.isSet = false } func NewNullableCpuArchitectureProperties(val *CpuArchitectureProperties) *NullableCpuArchitectureProperties { return &NullableCpuArchitectureProperties{value: val, isSet: true} } func (v NullableCpuArchitectureProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableCpuArchitectureProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_data_center_entities.go000066400000000000000000000203051465267054300255610ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // DataCenterEntities struct for DataCenterEntities type DataCenterEntities struct { Servers *Servers `json:"servers,omitempty"` Volumes *Volumes `json:"volumes,omitempty"` Loadbalancers *Loadbalancers `json:"loadbalancers,omitempty"` Lans *Lans `json:"lans,omitempty"` Networkloadbalancers *NetworkLoadBalancers `json:"networkloadbalancers,omitempty"` Natgateways *NatGateways `json:"natgateways,omitempty"` } // NewDataCenterEntities instantiates a new DataCenterEntities object // This constructor will assign default values to properties that have it defined, // 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 NewDataCenterEntities() *DataCenterEntities { this := DataCenterEntities{} return &this } // NewDataCenterEntitiesWithDefaults instantiates a new DataCenterEntities object // This 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 NewDataCenterEntitiesWithDefaults() *DataCenterEntities { this := DataCenterEntities{} return &this } // GetServers returns the Servers field value // If the value is explicit nil, nil is returned func (o *DataCenterEntities) GetServers() *Servers { if o == nil { return nil } return o.Servers } // GetServersOk returns a tuple with the Servers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DataCenterEntities) GetServersOk() (*Servers, bool) { if o == nil { return nil, false } return o.Servers, true } // SetServers sets field value func (o *DataCenterEntities) SetServers(v Servers) { o.Servers = &v } // HasServers returns a boolean if a field has been set. func (o *DataCenterEntities) HasServers() bool { if o != nil && o.Servers != nil { return true } return false } // GetVolumes returns the Volumes field value // If the value is explicit nil, nil is returned func (o *DataCenterEntities) GetVolumes() *Volumes { if o == nil { return nil } return o.Volumes } // GetVolumesOk returns a tuple with the Volumes field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DataCenterEntities) GetVolumesOk() (*Volumes, bool) { if o == nil { return nil, false } return o.Volumes, true } // SetVolumes sets field value func (o *DataCenterEntities) SetVolumes(v Volumes) { o.Volumes = &v } // HasVolumes returns a boolean if a field has been set. func (o *DataCenterEntities) HasVolumes() bool { if o != nil && o.Volumes != nil { return true } return false } // GetLoadbalancers returns the Loadbalancers field value // If the value is explicit nil, nil is returned func (o *DataCenterEntities) GetLoadbalancers() *Loadbalancers { if o == nil { return nil } return o.Loadbalancers } // GetLoadbalancersOk returns a tuple with the Loadbalancers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DataCenterEntities) GetLoadbalancersOk() (*Loadbalancers, bool) { if o == nil { return nil, false } return o.Loadbalancers, true } // SetLoadbalancers sets field value func (o *DataCenterEntities) SetLoadbalancers(v Loadbalancers) { o.Loadbalancers = &v } // HasLoadbalancers returns a boolean if a field has been set. func (o *DataCenterEntities) HasLoadbalancers() bool { if o != nil && o.Loadbalancers != nil { return true } return false } // GetLans returns the Lans field value // If the value is explicit nil, nil is returned func (o *DataCenterEntities) GetLans() *Lans { if o == nil { return nil } return o.Lans } // GetLansOk returns a tuple with the Lans field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DataCenterEntities) GetLansOk() (*Lans, bool) { if o == nil { return nil, false } return o.Lans, true } // SetLans sets field value func (o *DataCenterEntities) SetLans(v Lans) { o.Lans = &v } // HasLans returns a boolean if a field has been set. func (o *DataCenterEntities) HasLans() bool { if o != nil && o.Lans != nil { return true } return false } // GetNetworkloadbalancers returns the Networkloadbalancers field value // If the value is explicit nil, nil is returned func (o *DataCenterEntities) GetNetworkloadbalancers() *NetworkLoadBalancers { if o == nil { return nil } return o.Networkloadbalancers } // GetNetworkloadbalancersOk returns a tuple with the Networkloadbalancers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DataCenterEntities) GetNetworkloadbalancersOk() (*NetworkLoadBalancers, bool) { if o == nil { return nil, false } return o.Networkloadbalancers, true } // SetNetworkloadbalancers sets field value func (o *DataCenterEntities) SetNetworkloadbalancers(v NetworkLoadBalancers) { o.Networkloadbalancers = &v } // HasNetworkloadbalancers returns a boolean if a field has been set. func (o *DataCenterEntities) HasNetworkloadbalancers() bool { if o != nil && o.Networkloadbalancers != nil { return true } return false } // GetNatgateways returns the Natgateways field value // If the value is explicit nil, nil is returned func (o *DataCenterEntities) GetNatgateways() *NatGateways { if o == nil { return nil } return o.Natgateways } // GetNatgatewaysOk returns a tuple with the Natgateways field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DataCenterEntities) GetNatgatewaysOk() (*NatGateways, bool) { if o == nil { return nil, false } return o.Natgateways, true } // SetNatgateways sets field value func (o *DataCenterEntities) SetNatgateways(v NatGateways) { o.Natgateways = &v } // HasNatgateways returns a boolean if a field has been set. func (o *DataCenterEntities) HasNatgateways() bool { if o != nil && o.Natgateways != nil { return true } return false } func (o DataCenterEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Servers != nil { toSerialize["servers"] = o.Servers } if o.Volumes != nil { toSerialize["volumes"] = o.Volumes } if o.Loadbalancers != nil { toSerialize["loadbalancers"] = o.Loadbalancers } if o.Lans != nil { toSerialize["lans"] = o.Lans } if o.Networkloadbalancers != nil { toSerialize["networkloadbalancers"] = o.Networkloadbalancers } if o.Natgateways != nil { toSerialize["natgateways"] = o.Natgateways } return json.Marshal(toSerialize) } type NullableDataCenterEntities struct { value *DataCenterEntities isSet bool } func (v NullableDataCenterEntities) Get() *DataCenterEntities { return v.value } func (v *NullableDataCenterEntities) Set(val *DataCenterEntities) { v.value = val v.isSet = true } func (v NullableDataCenterEntities) IsSet() bool { return v.isSet } func (v *NullableDataCenterEntities) Unset() { v.value = nil v.isSet = false } func NewNullableDataCenterEntities(val *DataCenterEntities) *NullableDataCenterEntities { return &NullableDataCenterEntities{value: val, isSet: true} } func (v NullableDataCenterEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableDataCenterEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_datacenter.go000066400000000000000000000167571465267054300235360ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Datacenter struct for Datacenter type Datacenter struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *DatacenterProperties `json:"properties"` Entities *DataCenterEntities `json:"entities,omitempty"` } // NewDatacenter instantiates a new Datacenter object // This constructor will assign default values to properties that have it defined, // 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 NewDatacenter(properties DatacenterProperties) *Datacenter { this := Datacenter{} this.Properties = &properties return &this } // NewDatacenterWithDefaults instantiates a new Datacenter object // This 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 NewDatacenterWithDefaults() *Datacenter { this := Datacenter{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Datacenter) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenter) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Datacenter) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Datacenter) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Datacenter) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenter) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Datacenter) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Datacenter) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Datacenter) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenter) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Datacenter) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Datacenter) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Datacenter) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenter) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Datacenter) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Datacenter) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Datacenter) GetProperties() *DatacenterProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenter) GetPropertiesOk() (*DatacenterProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Datacenter) SetProperties(v DatacenterProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Datacenter) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *Datacenter) GetEntities() *DataCenterEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenter) GetEntitiesOk() (*DataCenterEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *Datacenter) SetEntities(v DataCenterEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *Datacenter) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o Datacenter) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableDatacenter struct { value *Datacenter isSet bool } func (v NullableDatacenter) Get() *Datacenter { return v.value } func (v *NullableDatacenter) Set(val *Datacenter) { v.value = val v.isSet = true } func (v NullableDatacenter) IsSet() bool { return v.isSet } func (v *NullableDatacenter) Unset() { v.value = nil v.isSet = false } func NewNullableDatacenter(val *Datacenter) *NullableDatacenter { return &NullableDatacenter{value: val, isSet: true} } func (v NullableDatacenter) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableDatacenter) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_datacenter_element_metadata.go000066400000000000000000000311111465267054300270640ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" "time" ) // DatacenterElementMetadata struct for DatacenterElementMetadata type DatacenterElementMetadata struct { // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. Etag *string `json:"etag,omitempty"` // The last time the resource was created. CreatedDate *IonosTime // The user who created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The unique ID of the user who created the resource. CreatedByUserId *string `json:"createdByUserId,omitempty"` // The last time the resource was modified. LastModifiedDate *IonosTime // The user who last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The unique ID of the user who last modified the resource. LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` // State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool. State *string `json:"state,omitempty"` } // NewDatacenterElementMetadata instantiates a new DatacenterElementMetadata object // This constructor will assign default values to properties that have it defined, // 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 NewDatacenterElementMetadata() *DatacenterElementMetadata { this := DatacenterElementMetadata{} return &this } // NewDatacenterElementMetadataWithDefaults instantiates a new DatacenterElementMetadata object // This 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 NewDatacenterElementMetadataWithDefaults() *DatacenterElementMetadata { this := DatacenterElementMetadata{} return &this } // GetEtag returns the Etag field value // If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetEtag() *string { if o == nil { return nil } return o.Etag } // GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterElementMetadata) GetEtagOk() (*string, bool) { if o == nil { return nil, false } return o.Etag, true } // SetEtag sets field value func (o *DatacenterElementMetadata) SetEtag(v string) { o.Etag = &v } // HasEtag returns a boolean if a field has been set. func (o *DatacenterElementMetadata) HasEtag() bool { if o != nil && o.Etag != nil { return true } return false } // GetCreatedDate returns the CreatedDate field value // If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetCreatedDate() *time.Time { if o == nil { return nil } if o.CreatedDate == nil { return nil } return &o.CreatedDate.Time } // GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterElementMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.CreatedDate == nil { return nil, false } return &o.CreatedDate.Time, true } // SetCreatedDate sets field value func (o *DatacenterElementMetadata) SetCreatedDate(v time.Time) { o.CreatedDate = &IonosTime{v} } // HasCreatedDate returns a boolean if a field has been set. func (o *DatacenterElementMetadata) HasCreatedDate() bool { if o != nil && o.CreatedDate != nil { return true } return false } // GetCreatedBy returns the CreatedBy field value // If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetCreatedBy() *string { if o == nil { return nil } return o.CreatedBy } // GetCreatedByOk returns a tuple with the CreatedBy field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterElementMetadata) GetCreatedByOk() (*string, bool) { if o == nil { return nil, false } return o.CreatedBy, true } // SetCreatedBy sets field value func (o *DatacenterElementMetadata) SetCreatedBy(v string) { o.CreatedBy = &v } // HasCreatedBy returns a boolean if a field has been set. func (o *DatacenterElementMetadata) HasCreatedBy() bool { if o != nil && o.CreatedBy != nil { return true } return false } // GetCreatedByUserId returns the CreatedByUserId field value // If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetCreatedByUserId() *string { if o == nil { return nil } return o.CreatedByUserId } // GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterElementMetadata) GetCreatedByUserIdOk() (*string, bool) { if o == nil { return nil, false } return o.CreatedByUserId, true } // SetCreatedByUserId sets field value func (o *DatacenterElementMetadata) SetCreatedByUserId(v string) { o.CreatedByUserId = &v } // HasCreatedByUserId returns a boolean if a field has been set. func (o *DatacenterElementMetadata) HasCreatedByUserId() bool { if o != nil && o.CreatedByUserId != nil { return true } return false } // GetLastModifiedDate returns the LastModifiedDate field value // If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetLastModifiedDate() *time.Time { if o == nil { return nil } if o.LastModifiedDate == nil { return nil } return &o.LastModifiedDate.Time } // GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterElementMetadata) GetLastModifiedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.LastModifiedDate == nil { return nil, false } return &o.LastModifiedDate.Time, true } // SetLastModifiedDate sets field value func (o *DatacenterElementMetadata) SetLastModifiedDate(v time.Time) { o.LastModifiedDate = &IonosTime{v} } // HasLastModifiedDate returns a boolean if a field has been set. func (o *DatacenterElementMetadata) HasLastModifiedDate() bool { if o != nil && o.LastModifiedDate != nil { return true } return false } // GetLastModifiedBy returns the LastModifiedBy field value // If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetLastModifiedBy() *string { if o == nil { return nil } return o.LastModifiedBy } // GetLastModifiedByOk returns a tuple with the LastModifiedBy field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterElementMetadata) GetLastModifiedByOk() (*string, bool) { if o == nil { return nil, false } return o.LastModifiedBy, true } // SetLastModifiedBy sets field value func (o *DatacenterElementMetadata) SetLastModifiedBy(v string) { o.LastModifiedBy = &v } // HasLastModifiedBy returns a boolean if a field has been set. func (o *DatacenterElementMetadata) HasLastModifiedBy() bool { if o != nil && o.LastModifiedBy != nil { return true } return false } // GetLastModifiedByUserId returns the LastModifiedByUserId field value // If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetLastModifiedByUserId() *string { if o == nil { return nil } return o.LastModifiedByUserId } // GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterElementMetadata) GetLastModifiedByUserIdOk() (*string, bool) { if o == nil { return nil, false } return o.LastModifiedByUserId, true } // SetLastModifiedByUserId sets field value func (o *DatacenterElementMetadata) SetLastModifiedByUserId(v string) { o.LastModifiedByUserId = &v } // HasLastModifiedByUserId returns a boolean if a field has been set. func (o *DatacenterElementMetadata) HasLastModifiedByUserId() bool { if o != nil && o.LastModifiedByUserId != nil { return true } return false } // GetState returns the State field value // If the value is explicit nil, nil is returned func (o *DatacenterElementMetadata) GetState() *string { if o == nil { return nil } return o.State } // GetStateOk returns a tuple with the State field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterElementMetadata) GetStateOk() (*string, bool) { if o == nil { return nil, false } return o.State, true } // SetState sets field value func (o *DatacenterElementMetadata) SetState(v string) { o.State = &v } // HasState returns a boolean if a field has been set. func (o *DatacenterElementMetadata) HasState() bool { if o != nil && o.State != nil { return true } return false } func (o DatacenterElementMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Etag != nil { toSerialize["etag"] = o.Etag } if o.CreatedDate != nil { toSerialize["createdDate"] = o.CreatedDate } if o.CreatedBy != nil { toSerialize["createdBy"] = o.CreatedBy } if o.CreatedByUserId != nil { toSerialize["createdByUserId"] = o.CreatedByUserId } if o.LastModifiedDate != nil { toSerialize["lastModifiedDate"] = o.LastModifiedDate } if o.LastModifiedBy != nil { toSerialize["lastModifiedBy"] = o.LastModifiedBy } if o.LastModifiedByUserId != nil { toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId } if o.State != nil { toSerialize["state"] = o.State } return json.Marshal(toSerialize) } type NullableDatacenterElementMetadata struct { value *DatacenterElementMetadata isSet bool } func (v NullableDatacenterElementMetadata) Get() *DatacenterElementMetadata { return v.value } func (v *NullableDatacenterElementMetadata) Set(val *DatacenterElementMetadata) { v.value = val v.isSet = true } func (v NullableDatacenterElementMetadata) IsSet() bool { return v.isSet } func (v *NullableDatacenterElementMetadata) Unset() { v.value = nil v.isSet = false } func NewNullableDatacenterElementMetadata(val *DatacenterElementMetadata) *NullableDatacenterElementMetadata { return &NullableDatacenterElementMetadata{value: val, isSet: true} } func (v NullableDatacenterElementMetadata) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableDatacenterElementMetadata) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_datacenter_properties.go000066400000000000000000000264161465267054300260030ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // DatacenterProperties struct for DatacenterProperties type DatacenterProperties struct { // The name of the resource. Name *string `json:"name,omitempty"` // A description for the datacenter, such as staging, production. Description *string `json:"description,omitempty"` // The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests). Location *string `json:"location"` // The version of the data center; incremented with every change. Version *int32 `json:"version,omitempty"` // List of features supported by the location where this data center is provisioned. Features *[]string `json:"features,omitempty"` // Boolean value representing if the data center requires extra protection, such as two-step verification. SecAuthProtection *bool `json:"secAuthProtection,omitempty"` // Array of features and CPU families available in a location CpuArchitecture *[]CpuArchitectureProperties `json:"cpuArchitecture,omitempty"` // This value is either 'null' or contains an automatically-assigned /56 IPv6 CIDR block if IPv6 is enabled on this virtual data center. It can neither be changed nor removed. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpv6CidrBlockNil` Ipv6CidrBlock *string `json:"ipv6CidrBlock,omitempty"` } // NewDatacenterProperties instantiates a new DatacenterProperties object // This constructor will assign default values to properties that have it defined, // 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 NewDatacenterProperties(location string) *DatacenterProperties { this := DatacenterProperties{} this.Location = &location return &this } // NewDatacenterPropertiesWithDefaults instantiates a new DatacenterProperties object // This 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 NewDatacenterPropertiesWithDefaults() *DatacenterProperties { this := DatacenterProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *DatacenterProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *DatacenterProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *DatacenterProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetDescription returns the Description field value // If the value is explicit nil, nil is returned func (o *DatacenterProperties) GetDescription() *string { if o == nil { return nil } return o.Description } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterProperties) GetDescriptionOk() (*string, bool) { if o == nil { return nil, false } return o.Description, true } // SetDescription sets field value func (o *DatacenterProperties) SetDescription(v string) { o.Description = &v } // HasDescription returns a boolean if a field has been set. func (o *DatacenterProperties) HasDescription() bool { if o != nil && o.Description != nil { return true } return false } // GetLocation returns the Location field value // If the value is explicit nil, nil is returned func (o *DatacenterProperties) GetLocation() *string { if o == nil { return nil } return o.Location } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } return o.Location, true } // SetLocation sets field value func (o *DatacenterProperties) SetLocation(v string) { o.Location = &v } // HasLocation returns a boolean if a field has been set. func (o *DatacenterProperties) HasLocation() bool { if o != nil && o.Location != nil { return true } return false } // GetVersion returns the Version field value // If the value is explicit nil, nil is returned func (o *DatacenterProperties) GetVersion() *int32 { if o == nil { return nil } return o.Version } // GetVersionOk returns a tuple with the Version field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterProperties) GetVersionOk() (*int32, bool) { if o == nil { return nil, false } return o.Version, true } // SetVersion sets field value func (o *DatacenterProperties) SetVersion(v int32) { o.Version = &v } // HasVersion returns a boolean if a field has been set. func (o *DatacenterProperties) HasVersion() bool { if o != nil && o.Version != nil { return true } return false } // GetFeatures returns the Features field value // If the value is explicit nil, nil is returned func (o *DatacenterProperties) GetFeatures() *[]string { if o == nil { return nil } return o.Features } // GetFeaturesOk returns a tuple with the Features field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterProperties) GetFeaturesOk() (*[]string, bool) { if o == nil { return nil, false } return o.Features, true } // SetFeatures sets field value func (o *DatacenterProperties) SetFeatures(v []string) { o.Features = &v } // HasFeatures returns a boolean if a field has been set. func (o *DatacenterProperties) HasFeatures() bool { if o != nil && o.Features != nil { return true } return false } // GetSecAuthProtection returns the SecAuthProtection field value // If the value is explicit nil, nil is returned func (o *DatacenterProperties) GetSecAuthProtection() *bool { if o == nil { return nil } return o.SecAuthProtection } // GetSecAuthProtectionOk returns a tuple with the SecAuthProtection field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterProperties) GetSecAuthProtectionOk() (*bool, bool) { if o == nil { return nil, false } return o.SecAuthProtection, true } // SetSecAuthProtection sets field value func (o *DatacenterProperties) SetSecAuthProtection(v bool) { o.SecAuthProtection = &v } // HasSecAuthProtection returns a boolean if a field has been set. func (o *DatacenterProperties) HasSecAuthProtection() bool { if o != nil && o.SecAuthProtection != nil { return true } return false } // GetCpuArchitecture returns the CpuArchitecture field value // If the value is explicit nil, nil is returned func (o *DatacenterProperties) GetCpuArchitecture() *[]CpuArchitectureProperties { if o == nil { return nil } return o.CpuArchitecture } // GetCpuArchitectureOk returns a tuple with the CpuArchitecture field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterProperties) GetCpuArchitectureOk() (*[]CpuArchitectureProperties, bool) { if o == nil { return nil, false } return o.CpuArchitecture, true } // SetCpuArchitecture sets field value func (o *DatacenterProperties) SetCpuArchitecture(v []CpuArchitectureProperties) { o.CpuArchitecture = &v } // HasCpuArchitecture returns a boolean if a field has been set. func (o *DatacenterProperties) HasCpuArchitecture() bool { if o != nil && o.CpuArchitecture != nil { return true } return false } // GetIpv6CidrBlock returns the Ipv6CidrBlock field value // If the value is explicit nil, nil is returned func (o *DatacenterProperties) GetIpv6CidrBlock() *string { if o == nil { return nil } return o.Ipv6CidrBlock } // GetIpv6CidrBlockOk returns a tuple with the Ipv6CidrBlock field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *DatacenterProperties) GetIpv6CidrBlockOk() (*string, bool) { if o == nil { return nil, false } return o.Ipv6CidrBlock, true } // SetIpv6CidrBlock sets field value func (o *DatacenterProperties) SetIpv6CidrBlock(v string) { o.Ipv6CidrBlock = &v } // sets Ipv6CidrBlock to the explicit address that will be encoded as nil when marshaled func (o *DatacenterProperties) SetIpv6CidrBlockNil() { o.Ipv6CidrBlock = &Nilstring } // HasIpv6CidrBlock returns a boolean if a field has been set. func (o *DatacenterProperties) HasIpv6CidrBlock() bool { if o != nil && o.Ipv6CidrBlock != nil { return true } return false } func (o DatacenterProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Description != nil { toSerialize["description"] = o.Description } if o.Location != nil { toSerialize["location"] = o.Location } if o.Version != nil { toSerialize["version"] = o.Version } if o.Features != nil { toSerialize["features"] = o.Features } if o.SecAuthProtection != nil { toSerialize["secAuthProtection"] = o.SecAuthProtection } if o.CpuArchitecture != nil { toSerialize["cpuArchitecture"] = o.CpuArchitecture } if o.Ipv6CidrBlock == &Nilstring { toSerialize["ipv6CidrBlock"] = nil } else if o.Ipv6CidrBlock != nil { toSerialize["ipv6CidrBlock"] = o.Ipv6CidrBlock } return json.Marshal(toSerialize) } type NullableDatacenterProperties struct { value *DatacenterProperties isSet bool } func (v NullableDatacenterProperties) Get() *DatacenterProperties { return v.value } func (v *NullableDatacenterProperties) Set(val *DatacenterProperties) { v.value = val v.isSet = true } func (v NullableDatacenterProperties) IsSet() bool { return v.isSet } func (v *NullableDatacenterProperties) Unset() { v.value = nil v.isSet = false } func NewNullableDatacenterProperties(val *DatacenterProperties) *NullableDatacenterProperties { return &NullableDatacenterProperties{value: val, isSet: true} } func (v NullableDatacenterProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableDatacenterProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_datacenters.go000066400000000000000000000201461465267054300237040ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Datacenters struct for Datacenters type Datacenters struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Datacenter `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewDatacenters instantiates a new Datacenters object // This constructor will assign default values to properties that have it defined, // 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 NewDatacenters() *Datacenters { this := Datacenters{} return &this } // NewDatacentersWithDefaults instantiates a new Datacenters object // This 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 NewDatacentersWithDefaults() *Datacenters { this := Datacenters{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Datacenters) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenters) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Datacenters) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Datacenters) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Datacenters) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenters) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Datacenters) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Datacenters) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Datacenters) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenters) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Datacenters) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Datacenters) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Datacenters) GetItems() *[]Datacenter { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenters) GetItemsOk() (*[]Datacenter, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Datacenters) SetItems(v []Datacenter) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Datacenters) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *Datacenters) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenters) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *Datacenters) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *Datacenters) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *Datacenters) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenters) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *Datacenters) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *Datacenters) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *Datacenters) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Datacenters) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *Datacenters) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *Datacenters) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o Datacenters) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableDatacenters struct { value *Datacenters isSet bool } func (v NullableDatacenters) Get() *Datacenters { return v.value } func (v *NullableDatacenters) Set(val *Datacenters) { v.value = val v.isSet = true } func (v NullableDatacenters) IsSet() bool { return v.isSet } func (v *NullableDatacenters) Unset() { v.value = nil v.isSet = false } func NewNullableDatacenters(val *Datacenters) *NullableDatacenters { return &NullableDatacenters{value: val, isSet: true} } func (v NullableDatacenters) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableDatacenters) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_error.go000066400000000000000000000074331465267054300225440ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Error struct for Error type Error struct { // HTTP status code of the operation. HttpStatus *int32 `json:"httpStatus,omitempty"` Messages *[]ErrorMessage `json:"messages,omitempty"` } // NewError instantiates a new Error object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewError() *Error { this := Error{} return &this } // NewErrorWithDefaults instantiates a new Error object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewErrorWithDefaults() *Error { this := Error{} return &this } // GetHttpStatus returns the HttpStatus field value // If the value is explicit nil, nil is returned func (o *Error) GetHttpStatus() *int32 { if o == nil { return nil } return o.HttpStatus } // GetHttpStatusOk returns a tuple with the HttpStatus field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Error) GetHttpStatusOk() (*int32, bool) { if o == nil { return nil, false } return o.HttpStatus, true } // SetHttpStatus sets field value func (o *Error) SetHttpStatus(v int32) { o.HttpStatus = &v } // HasHttpStatus returns a boolean if a field has been set. func (o *Error) HasHttpStatus() bool { if o != nil && o.HttpStatus != nil { return true } return false } // GetMessages returns the Messages field value // If the value is explicit nil, nil is returned func (o *Error) GetMessages() *[]ErrorMessage { if o == nil { return nil } return o.Messages } // GetMessagesOk returns a tuple with the Messages field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Error) GetMessagesOk() (*[]ErrorMessage, bool) { if o == nil { return nil, false } return o.Messages, true } // SetMessages sets field value func (o *Error) SetMessages(v []ErrorMessage) { o.Messages = &v } // HasMessages returns a boolean if a field has been set. func (o *Error) HasMessages() bool { if o != nil && o.Messages != nil { return true } return false } func (o Error) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.HttpStatus != nil { toSerialize["httpStatus"] = o.HttpStatus } if o.Messages != nil { toSerialize["messages"] = o.Messages } return json.Marshal(toSerialize) } type NullableError struct { value *Error isSet bool } func (v NullableError) Get() *Error { return v.value } func (v *NullableError) Set(val *Error) { v.value = val v.isSet = true } func (v NullableError) IsSet() bool { return v.isSet } func (v *NullableError) Unset() { v.value = nil v.isSet = false } func NewNullableError(val *Error) *NullableError { return &NullableError{value: val, isSet: true} } func (v NullableError) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_error_message.go000066400000000000000000000077461465267054300242570ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ErrorMessage struct for ErrorMessage type ErrorMessage struct { // Application internal error code. ErrorCode *string `json:"errorCode,omitempty"` // A human-readable message. Message *string `json:"message,omitempty"` } // NewErrorMessage instantiates a new ErrorMessage object // This constructor will assign default values to properties that have it defined, // 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 NewErrorMessage() *ErrorMessage { this := ErrorMessage{} return &this } // NewErrorMessageWithDefaults instantiates a new ErrorMessage object // This 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 NewErrorMessageWithDefaults() *ErrorMessage { this := ErrorMessage{} return &this } // GetErrorCode returns the ErrorCode field value // If the value is explicit nil, nil is returned func (o *ErrorMessage) GetErrorCode() *string { if o == nil { return nil } return o.ErrorCode } // GetErrorCodeOk returns a tuple with the ErrorCode field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ErrorMessage) GetErrorCodeOk() (*string, bool) { if o == nil { return nil, false } return o.ErrorCode, true } // SetErrorCode sets field value func (o *ErrorMessage) SetErrorCode(v string) { o.ErrorCode = &v } // HasErrorCode returns a boolean if a field has been set. func (o *ErrorMessage) HasErrorCode() bool { if o != nil && o.ErrorCode != nil { return true } return false } // GetMessage returns the Message field value // If the value is explicit nil, nil is returned func (o *ErrorMessage) GetMessage() *string { if o == nil { return nil } return o.Message } // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ErrorMessage) GetMessageOk() (*string, bool) { if o == nil { return nil, false } return o.Message, true } // SetMessage sets field value func (o *ErrorMessage) SetMessage(v string) { o.Message = &v } // HasMessage returns a boolean if a field has been set. func (o *ErrorMessage) HasMessage() bool { if o != nil && o.Message != nil { return true } return false } func (o ErrorMessage) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ErrorCode != nil { toSerialize["errorCode"] = o.ErrorCode } if o.Message != nil { toSerialize["message"] = o.Message } return json.Marshal(toSerialize) } type NullableErrorMessage struct { value *ErrorMessage isSet bool } func (v NullableErrorMessage) Get() *ErrorMessage { return v.value } func (v *NullableErrorMessage) Set(val *ErrorMessage) { v.value = val v.isSet = true } func (v NullableErrorMessage) IsSet() bool { return v.isSet } func (v *NullableErrorMessage) Unset() { v.value = nil v.isSet = false } func NewNullableErrorMessage(val *ErrorMessage) *NullableErrorMessage { return &NullableErrorMessage{value: val, isSet: true} } func (v NullableErrorMessage) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableErrorMessage) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_firewall_rule.go000066400000000000000000000152451465267054300242470ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // FirewallRule struct for FirewallRule type FirewallRule struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *FirewallruleProperties `json:"properties"` } // NewFirewallRule instantiates a new FirewallRule object // This constructor will assign default values to properties that have it defined, // 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 NewFirewallRule(properties FirewallruleProperties) *FirewallRule { this := FirewallRule{} this.Properties = &properties return &this } // NewFirewallRuleWithDefaults instantiates a new FirewallRule object // This 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 NewFirewallRuleWithDefaults() *FirewallRule { this := FirewallRule{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *FirewallRule) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRule) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *FirewallRule) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *FirewallRule) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *FirewallRule) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRule) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *FirewallRule) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *FirewallRule) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *FirewallRule) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRule) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *FirewallRule) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *FirewallRule) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *FirewallRule) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *FirewallRule) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *FirewallRule) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *FirewallRule) GetProperties() *FirewallruleProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRule) GetPropertiesOk() (*FirewallruleProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *FirewallRule) SetProperties(v FirewallruleProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *FirewallRule) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o FirewallRule) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableFirewallRule struct { value *FirewallRule isSet bool } func (v NullableFirewallRule) Get() *FirewallRule { return v.value } func (v *NullableFirewallRule) Set(val *FirewallRule) { v.value = val v.isSet = true } func (v NullableFirewallRule) IsSet() bool { return v.isSet } func (v *NullableFirewallRule) Unset() { v.value = nil v.isSet = false } func NewNullableFirewallRule(val *FirewallRule) *NullableFirewallRule { return &NullableFirewallRule{value: val, isSet: true} } func (v NullableFirewallRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableFirewallRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_firewall_rules.go000066400000000000000000000203361465267054300244270ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // FirewallRules struct for FirewallRules type FirewallRules struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]FirewallRule `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewFirewallRules instantiates a new FirewallRules object // This constructor will assign default values to properties that have it defined, // 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 NewFirewallRules() *FirewallRules { this := FirewallRules{} return &this } // NewFirewallRulesWithDefaults instantiates a new FirewallRules object // This 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 NewFirewallRulesWithDefaults() *FirewallRules { this := FirewallRules{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *FirewallRules) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRules) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *FirewallRules) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *FirewallRules) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *FirewallRules) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRules) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *FirewallRules) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *FirewallRules) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *FirewallRules) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRules) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *FirewallRules) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *FirewallRules) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *FirewallRules) GetItems() *[]FirewallRule { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRules) GetItemsOk() (*[]FirewallRule, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *FirewallRules) SetItems(v []FirewallRule) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *FirewallRules) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *FirewallRules) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRules) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *FirewallRules) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *FirewallRules) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *FirewallRules) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRules) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *FirewallRules) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *FirewallRules) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *FirewallRules) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallRules) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *FirewallRules) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *FirewallRules) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o FirewallRules) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableFirewallRules struct { value *FirewallRules isSet bool } func (v NullableFirewallRules) Get() *FirewallRules { return v.value } func (v *NullableFirewallRules) Set(val *FirewallRules) { v.value = val v.isSet = true } func (v NullableFirewallRules) IsSet() bool { return v.isSet } func (v *NullableFirewallRules) Unset() { v.value = nil v.isSet = false } func NewNullableFirewallRules(val *FirewallRules) *NullableFirewallRules { return &NullableFirewallRules{value: val, isSet: true} } func (v NullableFirewallRules) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableFirewallRules) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_firewallrule_properties.go000066400000000000000000000410371465267054300263620ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // FirewallruleProperties struct for FirewallruleProperties type FirewallruleProperties struct { // The name of the resource. Name *string `json:"name,omitempty"` // The protocol for the rule. Property cannot be modified after it is created (disallowed in update requests). Protocol *string `json:"protocol"` // Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. Value null allows traffic from any MAC address. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetSourceMacNil` SourceMac *string `json:"sourceMac,omitempty"` // The IP version for this rule. If sourceIp or targetIp are specified, you can omit this value - the IP version will then be deduced from the IP address(es) used; if you specify it anyway, it must match the specified IP address(es). If neither sourceIp nor targetIp are specified, this rule allows traffic only for the specified IP version. If neither sourceIp, targetIp nor ipVersion are specified, this rule will only allow IPv4 traffic. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpVersionNil` IpVersion *string `json:"ipVersion,omitempty"` // Only traffic originating from the respective IP address (or CIDR block) is allowed. Value null allows traffic from any IP address (according to the selected ipVersion). // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetSourceIpNil` SourceIp *string `json:"sourceIp,omitempty"` // If the target NIC has multiple IP addresses, only the traffic directed to the respective IP address (or CIDR block) of the NIC is allowed. Value null allows traffic to any target IP address (according to the selected ipVersion). // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetTargetIpNil` TargetIp *string `json:"targetIp,omitempty"` // Defines the allowed code (from 0 to 254) if protocol ICMP or ICMPv6 is chosen. Value null allows all codes. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilint32` can be used, or the setter `SetIcmpCodeNil` IcmpCode *int32 `json:"icmpCode,omitempty"` // Defines the allowed type (from 0 to 254) if the protocol ICMP or ICMPv6 is chosen. Value null allows all types. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilint32` can be used, or the setter `SetIcmpTypeNil` IcmpType *int32 `json:"icmpType,omitempty"` // Defines the start range of the allowed port (from 1 to 65535) if protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd value null to allow all ports. PortRangeStart *int32 `json:"portRangeStart,omitempty"` // Defines the end range of the allowed port (from 1 to 65535) if the protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports. PortRangeEnd *int32 `json:"portRangeEnd,omitempty"` // The type of the firewall rule. If not specified, the default INGRESS value is used. Type *string `json:"type,omitempty"` } // NewFirewallruleProperties instantiates a new FirewallruleProperties object // This constructor will assign default values to properties that have it defined, // 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 NewFirewallruleProperties(protocol string) *FirewallruleProperties { this := FirewallruleProperties{} this.Protocol = &protocol return &this } // NewFirewallrulePropertiesWithDefaults instantiates a new FirewallruleProperties object // This 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 NewFirewallrulePropertiesWithDefaults() *FirewallruleProperties { this := FirewallruleProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *FirewallruleProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *FirewallruleProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetProtocol returns the Protocol field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetProtocol() *string { if o == nil { return nil } return o.Protocol } // GetProtocolOk returns a tuple with the Protocol field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetProtocolOk() (*string, bool) { if o == nil { return nil, false } return o.Protocol, true } // SetProtocol sets field value func (o *FirewallruleProperties) SetProtocol(v string) { o.Protocol = &v } // HasProtocol returns a boolean if a field has been set. func (o *FirewallruleProperties) HasProtocol() bool { if o != nil && o.Protocol != nil { return true } return false } // GetSourceMac returns the SourceMac field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetSourceMac() *string { if o == nil { return nil } return o.SourceMac } // GetSourceMacOk returns a tuple with the SourceMac field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetSourceMacOk() (*string, bool) { if o == nil { return nil, false } return o.SourceMac, true } // SetSourceMac sets field value func (o *FirewallruleProperties) SetSourceMac(v string) { o.SourceMac = &v } // sets SourceMac to the explicit address that will be encoded as nil when marshaled func (o *FirewallruleProperties) SetSourceMacNil() { o.SourceMac = &Nilstring } // HasSourceMac returns a boolean if a field has been set. func (o *FirewallruleProperties) HasSourceMac() bool { if o != nil && o.SourceMac != nil { return true } return false } // GetIpVersion returns the IpVersion field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetIpVersion() *string { if o == nil { return nil } return o.IpVersion } // GetIpVersionOk returns a tuple with the IpVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetIpVersionOk() (*string, bool) { if o == nil { return nil, false } return o.IpVersion, true } // SetIpVersion sets field value func (o *FirewallruleProperties) SetIpVersion(v string) { o.IpVersion = &v } // sets IpVersion to the explicit address that will be encoded as nil when marshaled func (o *FirewallruleProperties) SetIpVersionNil() { o.IpVersion = &Nilstring } // HasIpVersion returns a boolean if a field has been set. func (o *FirewallruleProperties) HasIpVersion() bool { if o != nil && o.IpVersion != nil { return true } return false } // GetSourceIp returns the SourceIp field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetSourceIp() *string { if o == nil { return nil } return o.SourceIp } // GetSourceIpOk returns a tuple with the SourceIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetSourceIpOk() (*string, bool) { if o == nil { return nil, false } return o.SourceIp, true } // SetSourceIp sets field value func (o *FirewallruleProperties) SetSourceIp(v string) { o.SourceIp = &v } // sets SourceIp to the explicit address that will be encoded as nil when marshaled func (o *FirewallruleProperties) SetSourceIpNil() { o.SourceIp = &Nilstring } // HasSourceIp returns a boolean if a field has been set. func (o *FirewallruleProperties) HasSourceIp() bool { if o != nil && o.SourceIp != nil { return true } return false } // GetTargetIp returns the TargetIp field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetTargetIp() *string { if o == nil { return nil } return o.TargetIp } // GetTargetIpOk returns a tuple with the TargetIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetTargetIpOk() (*string, bool) { if o == nil { return nil, false } return o.TargetIp, true } // SetTargetIp sets field value func (o *FirewallruleProperties) SetTargetIp(v string) { o.TargetIp = &v } // sets TargetIp to the explicit address that will be encoded as nil when marshaled func (o *FirewallruleProperties) SetTargetIpNil() { o.TargetIp = &Nilstring } // HasTargetIp returns a boolean if a field has been set. func (o *FirewallruleProperties) HasTargetIp() bool { if o != nil && o.TargetIp != nil { return true } return false } // GetIcmpCode returns the IcmpCode field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetIcmpCode() *int32 { if o == nil { return nil } return o.IcmpCode } // GetIcmpCodeOk returns a tuple with the IcmpCode field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetIcmpCodeOk() (*int32, bool) { if o == nil { return nil, false } return o.IcmpCode, true } // SetIcmpCode sets field value func (o *FirewallruleProperties) SetIcmpCode(v int32) { o.IcmpCode = &v } // sets IcmpCode to the explicit address that will be encoded as nil when marshaled func (o *FirewallruleProperties) SetIcmpCodeNil() { o.IcmpCode = &Nilint32 } // HasIcmpCode returns a boolean if a field has been set. func (o *FirewallruleProperties) HasIcmpCode() bool { if o != nil && o.IcmpCode != nil { return true } return false } // GetIcmpType returns the IcmpType field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetIcmpType() *int32 { if o == nil { return nil } return o.IcmpType } // GetIcmpTypeOk returns a tuple with the IcmpType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetIcmpTypeOk() (*int32, bool) { if o == nil { return nil, false } return o.IcmpType, true } // SetIcmpType sets field value func (o *FirewallruleProperties) SetIcmpType(v int32) { o.IcmpType = &v } // sets IcmpType to the explicit address that will be encoded as nil when marshaled func (o *FirewallruleProperties) SetIcmpTypeNil() { o.IcmpType = &Nilint32 } // HasIcmpType returns a boolean if a field has been set. func (o *FirewallruleProperties) HasIcmpType() bool { if o != nil && o.IcmpType != nil { return true } return false } // GetPortRangeStart returns the PortRangeStart field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetPortRangeStart() *int32 { if o == nil { return nil } return o.PortRangeStart } // GetPortRangeStartOk returns a tuple with the PortRangeStart field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetPortRangeStartOk() (*int32, bool) { if o == nil { return nil, false } return o.PortRangeStart, true } // SetPortRangeStart sets field value func (o *FirewallruleProperties) SetPortRangeStart(v int32) { o.PortRangeStart = &v } // HasPortRangeStart returns a boolean if a field has been set. func (o *FirewallruleProperties) HasPortRangeStart() bool { if o != nil && o.PortRangeStart != nil { return true } return false } // GetPortRangeEnd returns the PortRangeEnd field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetPortRangeEnd() *int32 { if o == nil { return nil } return o.PortRangeEnd } // GetPortRangeEndOk returns a tuple with the PortRangeEnd field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetPortRangeEndOk() (*int32, bool) { if o == nil { return nil, false } return o.PortRangeEnd, true } // SetPortRangeEnd sets field value func (o *FirewallruleProperties) SetPortRangeEnd(v int32) { o.PortRangeEnd = &v } // HasPortRangeEnd returns a boolean if a field has been set. func (o *FirewallruleProperties) HasPortRangeEnd() bool { if o != nil && o.PortRangeEnd != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *FirewallruleProperties) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FirewallruleProperties) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *FirewallruleProperties) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *FirewallruleProperties) HasType() bool { if o != nil && o.Type != nil { return true } return false } func (o FirewallruleProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Protocol != nil { toSerialize["protocol"] = o.Protocol } if o.SourceMac == &Nilstring { toSerialize["sourceMac"] = nil } else if o.SourceMac != nil { toSerialize["sourceMac"] = o.SourceMac } if o.IpVersion == &Nilstring { toSerialize["ipVersion"] = nil } else if o.IpVersion != nil { toSerialize["ipVersion"] = o.IpVersion } if o.SourceIp == &Nilstring { toSerialize["sourceIp"] = nil } else if o.SourceIp != nil { toSerialize["sourceIp"] = o.SourceIp } if o.TargetIp == &Nilstring { toSerialize["targetIp"] = nil } else if o.TargetIp != nil { toSerialize["targetIp"] = o.TargetIp } if o.IcmpCode == &Nilint32 { toSerialize["icmpCode"] = nil } else if o.IcmpCode != nil { toSerialize["icmpCode"] = o.IcmpCode } if o.IcmpType == &Nilint32 { toSerialize["icmpType"] = nil } else if o.IcmpType != nil { toSerialize["icmpType"] = o.IcmpType } if o.PortRangeStart != nil { toSerialize["portRangeStart"] = o.PortRangeStart } if o.PortRangeEnd != nil { toSerialize["portRangeEnd"] = o.PortRangeEnd } if o.Type != nil { toSerialize["type"] = o.Type } return json.Marshal(toSerialize) } type NullableFirewallruleProperties struct { value *FirewallruleProperties isSet bool } func (v NullableFirewallruleProperties) Get() *FirewallruleProperties { return v.value } func (v *NullableFirewallruleProperties) Set(val *FirewallruleProperties) { v.value = val v.isSet = true } func (v NullableFirewallruleProperties) IsSet() bool { return v.isSet } func (v *NullableFirewallruleProperties) Unset() { v.value = nil v.isSet = false } func NewNullableFirewallruleProperties(val *FirewallruleProperties) *NullableFirewallruleProperties { return &NullableFirewallruleProperties{value: val, isSet: true} } func (v NullableFirewallruleProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableFirewallruleProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_flow_log.go000066400000000000000000000146451465267054300232260ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // FlowLog struct for FlowLog type FlowLog struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *FlowLogProperties `json:"properties"` } // NewFlowLog instantiates a new FlowLog object // This constructor will assign default values to properties that have it defined, // 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 NewFlowLog(properties FlowLogProperties) *FlowLog { this := FlowLog{} this.Properties = &properties return &this } // NewFlowLogWithDefaults instantiates a new FlowLog object // This 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 NewFlowLogWithDefaults() *FlowLog { this := FlowLog{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *FlowLog) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLog) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *FlowLog) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *FlowLog) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *FlowLog) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLog) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *FlowLog) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *FlowLog) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *FlowLog) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLog) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *FlowLog) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *FlowLog) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *FlowLog) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLog) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *FlowLog) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *FlowLog) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *FlowLog) GetProperties() *FlowLogProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLog) GetPropertiesOk() (*FlowLogProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *FlowLog) SetProperties(v FlowLogProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *FlowLog) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o FlowLog) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableFlowLog struct { value *FlowLog isSet bool } func (v NullableFlowLog) Get() *FlowLog { return v.value } func (v *NullableFlowLog) Set(val *FlowLog) { v.value = val v.isSet = true } func (v NullableFlowLog) IsSet() bool { return v.isSet } func (v *NullableFlowLog) Unset() { v.value = nil v.isSet = false } func NewNullableFlowLog(val *FlowLog) *NullableFlowLog { return &NullableFlowLog{value: val, isSet: true} } func (v NullableFlowLog) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableFlowLog) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_flow_log_properties.go000066400000000000000000000140311465267054300254670ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // FlowLogProperties struct for FlowLogProperties type FlowLogProperties struct { // The resource name. Name *string `json:"name"` // Specifies the traffic action pattern. Action *string `json:"action"` // Specifies the traffic direction pattern. Direction *string `json:"direction"` // The S3 bucket name of an existing IONOS Cloud S3 bucket. Bucket *string `json:"bucket"` } // NewFlowLogProperties instantiates a new FlowLogProperties object // This constructor will assign default values to properties that have it defined, // 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 NewFlowLogProperties(name string, action string, direction string, bucket string) *FlowLogProperties { this := FlowLogProperties{} this.Name = &name this.Action = &action this.Direction = &direction this.Bucket = &bucket return &this } // NewFlowLogPropertiesWithDefaults instantiates a new FlowLogProperties object // This 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 NewFlowLogPropertiesWithDefaults() *FlowLogProperties { this := FlowLogProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *FlowLogProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *FlowLogProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *FlowLogProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetAction returns the Action field value // If the value is explicit nil, nil is returned func (o *FlowLogProperties) GetAction() *string { if o == nil { return nil } return o.Action } // GetActionOk returns a tuple with the Action field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogProperties) GetActionOk() (*string, bool) { if o == nil { return nil, false } return o.Action, true } // SetAction sets field value func (o *FlowLogProperties) SetAction(v string) { o.Action = &v } // HasAction returns a boolean if a field has been set. func (o *FlowLogProperties) HasAction() bool { if o != nil && o.Action != nil { return true } return false } // GetDirection returns the Direction field value // If the value is explicit nil, nil is returned func (o *FlowLogProperties) GetDirection() *string { if o == nil { return nil } return o.Direction } // GetDirectionOk returns a tuple with the Direction field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogProperties) GetDirectionOk() (*string, bool) { if o == nil { return nil, false } return o.Direction, true } // SetDirection sets field value func (o *FlowLogProperties) SetDirection(v string) { o.Direction = &v } // HasDirection returns a boolean if a field has been set. func (o *FlowLogProperties) HasDirection() bool { if o != nil && o.Direction != nil { return true } return false } // GetBucket returns the Bucket field value // If the value is explicit nil, nil is returned func (o *FlowLogProperties) GetBucket() *string { if o == nil { return nil } return o.Bucket } // GetBucketOk returns a tuple with the Bucket field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogProperties) GetBucketOk() (*string, bool) { if o == nil { return nil, false } return o.Bucket, true } // SetBucket sets field value func (o *FlowLogProperties) SetBucket(v string) { o.Bucket = &v } // HasBucket returns a boolean if a field has been set. func (o *FlowLogProperties) HasBucket() bool { if o != nil && o.Bucket != nil { return true } return false } func (o FlowLogProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Action != nil { toSerialize["action"] = o.Action } if o.Direction != nil { toSerialize["direction"] = o.Direction } if o.Bucket != nil { toSerialize["bucket"] = o.Bucket } return json.Marshal(toSerialize) } type NullableFlowLogProperties struct { value *FlowLogProperties isSet bool } func (v NullableFlowLogProperties) Get() *FlowLogProperties { return v.value } func (v *NullableFlowLogProperties) Set(val *FlowLogProperties) { v.value = val v.isSet = true } func (v NullableFlowLogProperties) IsSet() bool { return v.isSet } func (v *NullableFlowLogProperties) Unset() { v.value = nil v.isSet = false } func NewNullableFlowLogProperties(val *FlowLogProperties) *NullableFlowLogProperties { return &NullableFlowLogProperties{value: val, isSet: true} } func (v NullableFlowLogProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableFlowLogProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_flow_log_put.go000066400000000000000000000131321465267054300241040ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // FlowLogPut struct for FlowLogPut type FlowLogPut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *FlowLogProperties `json:"properties"` } // NewFlowLogPut instantiates a new FlowLogPut object // This constructor will assign default values to properties that have it defined, // 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 NewFlowLogPut(properties FlowLogProperties) *FlowLogPut { this := FlowLogPut{} this.Properties = &properties return &this } // NewFlowLogPutWithDefaults instantiates a new FlowLogPut object // This 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 NewFlowLogPutWithDefaults() *FlowLogPut { this := FlowLogPut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *FlowLogPut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *FlowLogPut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *FlowLogPut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *FlowLogPut) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *FlowLogPut) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *FlowLogPut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *FlowLogPut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *FlowLogPut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *FlowLogPut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *FlowLogPut) GetProperties() *FlowLogProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogPut) GetPropertiesOk() (*FlowLogProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *FlowLogPut) SetProperties(v FlowLogProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *FlowLogPut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o FlowLogPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableFlowLogPut struct { value *FlowLogPut isSet bool } func (v NullableFlowLogPut) Get() *FlowLogPut { return v.value } func (v *NullableFlowLogPut) Set(val *FlowLogPut) { v.value = val v.isSet = true } func (v NullableFlowLogPut) IsSet() bool { return v.isSet } func (v *NullableFlowLogPut) Unset() { v.value = nil v.isSet = false } func NewNullableFlowLogPut(val *FlowLogPut) *NullableFlowLogPut { return &NullableFlowLogPut{value: val, isSet: true} } func (v NullableFlowLogPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableFlowLogPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_flow_logs.go000066400000000000000000000176661465267054300234170ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // FlowLogs struct for FlowLogs type FlowLogs struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]FlowLog `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewFlowLogs instantiates a new FlowLogs object // This constructor will assign default values to properties that have it defined, // 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 NewFlowLogs() *FlowLogs { this := FlowLogs{} return &this } // NewFlowLogsWithDefaults instantiates a new FlowLogs object // This 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 NewFlowLogsWithDefaults() *FlowLogs { this := FlowLogs{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *FlowLogs) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogs) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *FlowLogs) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *FlowLogs) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *FlowLogs) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogs) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *FlowLogs) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *FlowLogs) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *FlowLogs) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogs) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *FlowLogs) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *FlowLogs) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *FlowLogs) GetItems() *[]FlowLog { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogs) GetItemsOk() (*[]FlowLog, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *FlowLogs) SetItems(v []FlowLog) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *FlowLogs) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *FlowLogs) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogs) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *FlowLogs) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *FlowLogs) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *FlowLogs) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogs) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *FlowLogs) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *FlowLogs) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *FlowLogs) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FlowLogs) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *FlowLogs) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *FlowLogs) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o FlowLogs) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableFlowLogs struct { value *FlowLogs isSet bool } func (v NullableFlowLogs) Get() *FlowLogs { return v.value } func (v *NullableFlowLogs) Set(val *FlowLogs) { v.value = val v.isSet = true } func (v NullableFlowLogs) IsSet() bool { return v.isSet } func (v *NullableFlowLogs) Unset() { v.value = nil v.isSet = false } func NewNullableFlowLogs(val *FlowLogs) *NullableFlowLogs { return &NullableFlowLogs{value: val, isSet: true} } func (v NullableFlowLogs) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableFlowLogs) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_group.go000066400000000000000000000143471465267054300225510ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Group struct for Group type Group struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of the resource. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *GroupProperties `json:"properties"` Entities *GroupEntities `json:"entities,omitempty"` } // NewGroup instantiates a new Group object // This constructor will assign default values to properties that have it defined, // 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 NewGroup(properties GroupProperties) *Group { this := Group{} this.Properties = &properties return &this } // NewGroupWithDefaults instantiates a new Group object // This 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 NewGroupWithDefaults() *Group { this := Group{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Group) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Group) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Group) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Group) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Group) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Group) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Group) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Group) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Group) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Group) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Group) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Group) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Group) GetProperties() *GroupProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Group) GetPropertiesOk() (*GroupProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Group) SetProperties(v GroupProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Group) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *Group) GetEntities() *GroupEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Group) GetEntitiesOk() (*GroupEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *Group) SetEntities(v GroupEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *Group) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o Group) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableGroup struct { value *Group isSet bool } func (v NullableGroup) Get() *Group { return v.value } func (v *NullableGroup) Set(val *Group) { v.value = val v.isSet = true } func (v NullableGroup) IsSet() bool { return v.isSet } func (v *NullableGroup) Unset() { v.value = nil v.isSet = false } func NewNullableGroup(val *Group) *NullableGroup { return &NullableGroup{value: val, isSet: true} } func (v NullableGroup) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGroup) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_group_entities.go000066400000000000000000000077371465267054300244620ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // GroupEntities struct for GroupEntities type GroupEntities struct { Users *GroupMembers `json:"users,omitempty"` Resources *ResourceGroups `json:"resources,omitempty"` } // NewGroupEntities instantiates a new GroupEntities object // This constructor will assign default values to properties that have it defined, // 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 NewGroupEntities() *GroupEntities { this := GroupEntities{} return &this } // NewGroupEntitiesWithDefaults instantiates a new GroupEntities object // This 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 NewGroupEntitiesWithDefaults() *GroupEntities { this := GroupEntities{} return &this } // GetUsers returns the Users field value // If the value is explicit nil, nil is returned func (o *GroupEntities) GetUsers() *GroupMembers { if o == nil { return nil } return o.Users } // GetUsersOk returns a tuple with the Users field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupEntities) GetUsersOk() (*GroupMembers, bool) { if o == nil { return nil, false } return o.Users, true } // SetUsers sets field value func (o *GroupEntities) SetUsers(v GroupMembers) { o.Users = &v } // HasUsers returns a boolean if a field has been set. func (o *GroupEntities) HasUsers() bool { if o != nil && o.Users != nil { return true } return false } // GetResources returns the Resources field value // If the value is explicit nil, nil is returned func (o *GroupEntities) GetResources() *ResourceGroups { if o == nil { return nil } return o.Resources } // GetResourcesOk returns a tuple with the Resources field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupEntities) GetResourcesOk() (*ResourceGroups, bool) { if o == nil { return nil, false } return o.Resources, true } // SetResources sets field value func (o *GroupEntities) SetResources(v ResourceGroups) { o.Resources = &v } // HasResources returns a boolean if a field has been set. func (o *GroupEntities) HasResources() bool { if o != nil && o.Resources != nil { return true } return false } func (o GroupEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Users != nil { toSerialize["users"] = o.Users } if o.Resources != nil { toSerialize["resources"] = o.Resources } return json.Marshal(toSerialize) } type NullableGroupEntities struct { value *GroupEntities isSet bool } func (v NullableGroupEntities) Get() *GroupEntities { return v.value } func (v *NullableGroupEntities) Set(val *GroupEntities) { v.value = val v.isSet = true } func (v NullableGroupEntities) IsSet() bool { return v.isSet } func (v *NullableGroupEntities) Unset() { v.value = nil v.isSet = false } func NewNullableGroupEntities(val *GroupEntities) *NullableGroupEntities { return &NullableGroupEntities{value: val, isSet: true} } func (v NullableGroupEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGroupEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_group_members.go000066400000000000000000000130121465267054300242470ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // GroupMembers struct for GroupMembers type GroupMembers struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]User `json:"items,omitempty"` } // NewGroupMembers instantiates a new GroupMembers object // This constructor will assign default values to properties that have it defined, // 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 NewGroupMembers() *GroupMembers { this := GroupMembers{} return &this } // NewGroupMembersWithDefaults instantiates a new GroupMembers object // This 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 NewGroupMembersWithDefaults() *GroupMembers { this := GroupMembers{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *GroupMembers) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupMembers) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *GroupMembers) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *GroupMembers) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *GroupMembers) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupMembers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *GroupMembers) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *GroupMembers) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *GroupMembers) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupMembers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *GroupMembers) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *GroupMembers) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *GroupMembers) GetItems() *[]User { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupMembers) GetItemsOk() (*[]User, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *GroupMembers) SetItems(v []User) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *GroupMembers) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o GroupMembers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableGroupMembers struct { value *GroupMembers isSet bool } func (v NullableGroupMembers) Get() *GroupMembers { return v.value } func (v *NullableGroupMembers) Set(val *GroupMembers) { v.value = val v.isSet = true } func (v NullableGroupMembers) IsSet() bool { return v.isSet } func (v *NullableGroupMembers) Unset() { v.value = nil v.isSet = false } func NewNullableGroupMembers(val *GroupMembers) *NullableGroupMembers { return &NullableGroupMembers{value: val, isSet: true} } func (v NullableGroupMembers) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGroupMembers) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_group_properties.go000066400000000000000000000505051465267054300250210ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // GroupProperties struct for GroupProperties type GroupProperties struct { // The name of the resource. Name *string `json:"name,omitempty"` // Create data center privilege. CreateDataCenter *bool `json:"createDataCenter,omitempty"` // Create snapshot privilege. CreateSnapshot *bool `json:"createSnapshot,omitempty"` // Reserve IP block privilege. ReserveIp *bool `json:"reserveIp,omitempty"` // Activity log access privilege. AccessActivityLog *bool `json:"accessActivityLog,omitempty"` // User privilege to create a cross connect. CreatePcc *bool `json:"createPcc,omitempty"` // S3 privilege. S3Privilege *bool `json:"s3Privilege,omitempty"` // Create backup unit privilege. CreateBackupUnit *bool `json:"createBackupUnit,omitempty"` // Create internet access privilege. CreateInternetAccess *bool `json:"createInternetAccess,omitempty"` // Create Kubernetes cluster privilege. CreateK8sCluster *bool `json:"createK8sCluster,omitempty"` // Create Flow Logs privilege. CreateFlowLog *bool `json:"createFlowLog,omitempty"` // Privilege for a group to access and manage monitoring related functionality (access metrics, CRUD on alarms, alarm-actions etc) using Monotoring-as-a-Service (MaaS). AccessAndManageMonitoring *bool `json:"accessAndManageMonitoring,omitempty"` // Privilege for a group to access and manage certificates. AccessAndManageCertificates *bool `json:"accessAndManageCertificates,omitempty"` // Privilege for a group to manage DBaaS related functionality. ManageDBaaS *bool `json:"manageDBaaS,omitempty"` // Privilege for a group to access and manage dns records. AccessAndManageDns *bool `json:"accessAndManageDns,omitempty"` // Privilege for group accessing container registry related functionality. ManageRegistry *bool `json:"manageRegistry,omitempty"` // Privilege for a group to access and manage the Data Platform. ManageDataplatform *bool `json:"manageDataplatform,omitempty"` } // NewGroupProperties instantiates a new GroupProperties object // This constructor will assign default values to properties that have it defined, // 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 NewGroupProperties() *GroupProperties { this := GroupProperties{} return &this } // NewGroupPropertiesWithDefaults instantiates a new GroupProperties object // This 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 NewGroupPropertiesWithDefaults() *GroupProperties { this := GroupProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *GroupProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *GroupProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetCreateDataCenter returns the CreateDataCenter field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetCreateDataCenter() *bool { if o == nil { return nil } return o.CreateDataCenter } // GetCreateDataCenterOk returns a tuple with the CreateDataCenter field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetCreateDataCenterOk() (*bool, bool) { if o == nil { return nil, false } return o.CreateDataCenter, true } // SetCreateDataCenter sets field value func (o *GroupProperties) SetCreateDataCenter(v bool) { o.CreateDataCenter = &v } // HasCreateDataCenter returns a boolean if a field has been set. func (o *GroupProperties) HasCreateDataCenter() bool { if o != nil && o.CreateDataCenter != nil { return true } return false } // GetCreateSnapshot returns the CreateSnapshot field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetCreateSnapshot() *bool { if o == nil { return nil } return o.CreateSnapshot } // GetCreateSnapshotOk returns a tuple with the CreateSnapshot field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetCreateSnapshotOk() (*bool, bool) { if o == nil { return nil, false } return o.CreateSnapshot, true } // SetCreateSnapshot sets field value func (o *GroupProperties) SetCreateSnapshot(v bool) { o.CreateSnapshot = &v } // HasCreateSnapshot returns a boolean if a field has been set. func (o *GroupProperties) HasCreateSnapshot() bool { if o != nil && o.CreateSnapshot != nil { return true } return false } // GetReserveIp returns the ReserveIp field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetReserveIp() *bool { if o == nil { return nil } return o.ReserveIp } // GetReserveIpOk returns a tuple with the ReserveIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetReserveIpOk() (*bool, bool) { if o == nil { return nil, false } return o.ReserveIp, true } // SetReserveIp sets field value func (o *GroupProperties) SetReserveIp(v bool) { o.ReserveIp = &v } // HasReserveIp returns a boolean if a field has been set. func (o *GroupProperties) HasReserveIp() bool { if o != nil && o.ReserveIp != nil { return true } return false } // GetAccessActivityLog returns the AccessActivityLog field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetAccessActivityLog() *bool { if o == nil { return nil } return o.AccessActivityLog } // GetAccessActivityLogOk returns a tuple with the AccessActivityLog field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetAccessActivityLogOk() (*bool, bool) { if o == nil { return nil, false } return o.AccessActivityLog, true } // SetAccessActivityLog sets field value func (o *GroupProperties) SetAccessActivityLog(v bool) { o.AccessActivityLog = &v } // HasAccessActivityLog returns a boolean if a field has been set. func (o *GroupProperties) HasAccessActivityLog() bool { if o != nil && o.AccessActivityLog != nil { return true } return false } // GetCreatePcc returns the CreatePcc field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetCreatePcc() *bool { if o == nil { return nil } return o.CreatePcc } // GetCreatePccOk returns a tuple with the CreatePcc field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetCreatePccOk() (*bool, bool) { if o == nil { return nil, false } return o.CreatePcc, true } // SetCreatePcc sets field value func (o *GroupProperties) SetCreatePcc(v bool) { o.CreatePcc = &v } // HasCreatePcc returns a boolean if a field has been set. func (o *GroupProperties) HasCreatePcc() bool { if o != nil && o.CreatePcc != nil { return true } return false } // GetS3Privilege returns the S3Privilege field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetS3Privilege() *bool { if o == nil { return nil } return o.S3Privilege } // GetS3PrivilegeOk returns a tuple with the S3Privilege field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetS3PrivilegeOk() (*bool, bool) { if o == nil { return nil, false } return o.S3Privilege, true } // SetS3Privilege sets field value func (o *GroupProperties) SetS3Privilege(v bool) { o.S3Privilege = &v } // HasS3Privilege returns a boolean if a field has been set. func (o *GroupProperties) HasS3Privilege() bool { if o != nil && o.S3Privilege != nil { return true } return false } // GetCreateBackupUnit returns the CreateBackupUnit field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetCreateBackupUnit() *bool { if o == nil { return nil } return o.CreateBackupUnit } // GetCreateBackupUnitOk returns a tuple with the CreateBackupUnit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetCreateBackupUnitOk() (*bool, bool) { if o == nil { return nil, false } return o.CreateBackupUnit, true } // SetCreateBackupUnit sets field value func (o *GroupProperties) SetCreateBackupUnit(v bool) { o.CreateBackupUnit = &v } // HasCreateBackupUnit returns a boolean if a field has been set. func (o *GroupProperties) HasCreateBackupUnit() bool { if o != nil && o.CreateBackupUnit != nil { return true } return false } // GetCreateInternetAccess returns the CreateInternetAccess field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetCreateInternetAccess() *bool { if o == nil { return nil } return o.CreateInternetAccess } // GetCreateInternetAccessOk returns a tuple with the CreateInternetAccess field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetCreateInternetAccessOk() (*bool, bool) { if o == nil { return nil, false } return o.CreateInternetAccess, true } // SetCreateInternetAccess sets field value func (o *GroupProperties) SetCreateInternetAccess(v bool) { o.CreateInternetAccess = &v } // HasCreateInternetAccess returns a boolean if a field has been set. func (o *GroupProperties) HasCreateInternetAccess() bool { if o != nil && o.CreateInternetAccess != nil { return true } return false } // GetCreateK8sCluster returns the CreateK8sCluster field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetCreateK8sCluster() *bool { if o == nil { return nil } return o.CreateK8sCluster } // GetCreateK8sClusterOk returns a tuple with the CreateK8sCluster field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetCreateK8sClusterOk() (*bool, bool) { if o == nil { return nil, false } return o.CreateK8sCluster, true } // SetCreateK8sCluster sets field value func (o *GroupProperties) SetCreateK8sCluster(v bool) { o.CreateK8sCluster = &v } // HasCreateK8sCluster returns a boolean if a field has been set. func (o *GroupProperties) HasCreateK8sCluster() bool { if o != nil && o.CreateK8sCluster != nil { return true } return false } // GetCreateFlowLog returns the CreateFlowLog field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetCreateFlowLog() *bool { if o == nil { return nil } return o.CreateFlowLog } // GetCreateFlowLogOk returns a tuple with the CreateFlowLog field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetCreateFlowLogOk() (*bool, bool) { if o == nil { return nil, false } return o.CreateFlowLog, true } // SetCreateFlowLog sets field value func (o *GroupProperties) SetCreateFlowLog(v bool) { o.CreateFlowLog = &v } // HasCreateFlowLog returns a boolean if a field has been set. func (o *GroupProperties) HasCreateFlowLog() bool { if o != nil && o.CreateFlowLog != nil { return true } return false } // GetAccessAndManageMonitoring returns the AccessAndManageMonitoring field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetAccessAndManageMonitoring() *bool { if o == nil { return nil } return o.AccessAndManageMonitoring } // GetAccessAndManageMonitoringOk returns a tuple with the AccessAndManageMonitoring field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetAccessAndManageMonitoringOk() (*bool, bool) { if o == nil { return nil, false } return o.AccessAndManageMonitoring, true } // SetAccessAndManageMonitoring sets field value func (o *GroupProperties) SetAccessAndManageMonitoring(v bool) { o.AccessAndManageMonitoring = &v } // HasAccessAndManageMonitoring returns a boolean if a field has been set. func (o *GroupProperties) HasAccessAndManageMonitoring() bool { if o != nil && o.AccessAndManageMonitoring != nil { return true } return false } // GetAccessAndManageCertificates returns the AccessAndManageCertificates field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetAccessAndManageCertificates() *bool { if o == nil { return nil } return o.AccessAndManageCertificates } // GetAccessAndManageCertificatesOk returns a tuple with the AccessAndManageCertificates field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetAccessAndManageCertificatesOk() (*bool, bool) { if o == nil { return nil, false } return o.AccessAndManageCertificates, true } // SetAccessAndManageCertificates sets field value func (o *GroupProperties) SetAccessAndManageCertificates(v bool) { o.AccessAndManageCertificates = &v } // HasAccessAndManageCertificates returns a boolean if a field has been set. func (o *GroupProperties) HasAccessAndManageCertificates() bool { if o != nil && o.AccessAndManageCertificates != nil { return true } return false } // GetManageDBaaS returns the ManageDBaaS field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetManageDBaaS() *bool { if o == nil { return nil } return o.ManageDBaaS } // GetManageDBaaSOk returns a tuple with the ManageDBaaS field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetManageDBaaSOk() (*bool, bool) { if o == nil { return nil, false } return o.ManageDBaaS, true } // SetManageDBaaS sets field value func (o *GroupProperties) SetManageDBaaS(v bool) { o.ManageDBaaS = &v } // HasManageDBaaS returns a boolean if a field has been set. func (o *GroupProperties) HasManageDBaaS() bool { if o != nil && o.ManageDBaaS != nil { return true } return false } // GetAccessAndManageDns returns the AccessAndManageDns field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetAccessAndManageDns() *bool { if o == nil { return nil } return o.AccessAndManageDns } // GetAccessAndManageDnsOk returns a tuple with the AccessAndManageDns field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetAccessAndManageDnsOk() (*bool, bool) { if o == nil { return nil, false } return o.AccessAndManageDns, true } // SetAccessAndManageDns sets field value func (o *GroupProperties) SetAccessAndManageDns(v bool) { o.AccessAndManageDns = &v } // HasAccessAndManageDns returns a boolean if a field has been set. func (o *GroupProperties) HasAccessAndManageDns() bool { if o != nil && o.AccessAndManageDns != nil { return true } return false } // GetManageRegistry returns the ManageRegistry field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetManageRegistry() *bool { if o == nil { return nil } return o.ManageRegistry } // GetManageRegistryOk returns a tuple with the ManageRegistry field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetManageRegistryOk() (*bool, bool) { if o == nil { return nil, false } return o.ManageRegistry, true } // SetManageRegistry sets field value func (o *GroupProperties) SetManageRegistry(v bool) { o.ManageRegistry = &v } // HasManageRegistry returns a boolean if a field has been set. func (o *GroupProperties) HasManageRegistry() bool { if o != nil && o.ManageRegistry != nil { return true } return false } // GetManageDataplatform returns the ManageDataplatform field value // If the value is explicit nil, nil is returned func (o *GroupProperties) GetManageDataplatform() *bool { if o == nil { return nil } return o.ManageDataplatform } // GetManageDataplatformOk returns a tuple with the ManageDataplatform field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupProperties) GetManageDataplatformOk() (*bool, bool) { if o == nil { return nil, false } return o.ManageDataplatform, true } // SetManageDataplatform sets field value func (o *GroupProperties) SetManageDataplatform(v bool) { o.ManageDataplatform = &v } // HasManageDataplatform returns a boolean if a field has been set. func (o *GroupProperties) HasManageDataplatform() bool { if o != nil && o.ManageDataplatform != nil { return true } return false } func (o GroupProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.CreateDataCenter != nil { toSerialize["createDataCenter"] = o.CreateDataCenter } if o.CreateSnapshot != nil { toSerialize["createSnapshot"] = o.CreateSnapshot } if o.ReserveIp != nil { toSerialize["reserveIp"] = o.ReserveIp } if o.AccessActivityLog != nil { toSerialize["accessActivityLog"] = o.AccessActivityLog } if o.CreatePcc != nil { toSerialize["createPcc"] = o.CreatePcc } if o.S3Privilege != nil { toSerialize["s3Privilege"] = o.S3Privilege } if o.CreateBackupUnit != nil { toSerialize["createBackupUnit"] = o.CreateBackupUnit } if o.CreateInternetAccess != nil { toSerialize["createInternetAccess"] = o.CreateInternetAccess } if o.CreateK8sCluster != nil { toSerialize["createK8sCluster"] = o.CreateK8sCluster } if o.CreateFlowLog != nil { toSerialize["createFlowLog"] = o.CreateFlowLog } if o.AccessAndManageMonitoring != nil { toSerialize["accessAndManageMonitoring"] = o.AccessAndManageMonitoring } if o.AccessAndManageCertificates != nil { toSerialize["accessAndManageCertificates"] = o.AccessAndManageCertificates } if o.ManageDBaaS != nil { toSerialize["manageDBaaS"] = o.ManageDBaaS } if o.AccessAndManageDns != nil { toSerialize["accessAndManageDns"] = o.AccessAndManageDns } if o.ManageRegistry != nil { toSerialize["manageRegistry"] = o.ManageRegistry } if o.ManageDataplatform != nil { toSerialize["manageDataplatform"] = o.ManageDataplatform } return json.Marshal(toSerialize) } type NullableGroupProperties struct { value *GroupProperties isSet bool } func (v NullableGroupProperties) Get() *GroupProperties { return v.value } func (v *NullableGroupProperties) Set(val *GroupProperties) { v.value = val v.isSet = true } func (v NullableGroupProperties) IsSet() bool { return v.isSet } func (v *NullableGroupProperties) Unset() { v.value = nil v.isSet = false } func NewNullableGroupProperties(val *GroupProperties) *NullableGroupProperties { return &NullableGroupProperties{value: val, isSet: true} } func (v NullableGroupProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGroupProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_group_share.go000066400000000000000000000131331465267054300237230ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // GroupShare struct for GroupShare type GroupShare struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // resource as generic type Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *GroupShareProperties `json:"properties"` } // NewGroupShare instantiates a new GroupShare object // This constructor will assign default values to properties that have it defined, // 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 NewGroupShare(properties GroupShareProperties) *GroupShare { this := GroupShare{} this.Properties = &properties return &this } // NewGroupShareWithDefaults instantiates a new GroupShare object // This 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 NewGroupShareWithDefaults() *GroupShare { this := GroupShare{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *GroupShare) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupShare) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *GroupShare) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *GroupShare) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *GroupShare) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupShare) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *GroupShare) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *GroupShare) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *GroupShare) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupShare) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *GroupShare) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *GroupShare) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *GroupShare) GetProperties() *GroupShareProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupShare) GetPropertiesOk() (*GroupShareProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *GroupShare) SetProperties(v GroupShareProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *GroupShare) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o GroupShare) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableGroupShare struct { value *GroupShare isSet bool } func (v NullableGroupShare) Get() *GroupShare { return v.value } func (v *NullableGroupShare) Set(val *GroupShare) { v.value = val v.isSet = true } func (v NullableGroupShare) IsSet() bool { return v.isSet } func (v *NullableGroupShare) Unset() { v.value = nil v.isSet = false } func NewNullableGroupShare(val *GroupShare) *NullableGroupShare { return &NullableGroupShare{value: val, isSet: true} } func (v NullableGroupShare) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGroupShare) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_group_share_properties.go000066400000000000000000000107071465267054300262030ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // GroupShareProperties struct for GroupShareProperties type GroupShareProperties struct { // edit privilege on a resource EditPrivilege *bool `json:"editPrivilege,omitempty"` // share privilege on a resource SharePrivilege *bool `json:"sharePrivilege,omitempty"` } // NewGroupShareProperties instantiates a new GroupShareProperties object // This constructor will assign default values to properties that have it defined, // 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 NewGroupShareProperties() *GroupShareProperties { this := GroupShareProperties{} return &this } // NewGroupSharePropertiesWithDefaults instantiates a new GroupShareProperties object // This 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 NewGroupSharePropertiesWithDefaults() *GroupShareProperties { this := GroupShareProperties{} return &this } // GetEditPrivilege returns the EditPrivilege field value // If the value is explicit nil, nil is returned func (o *GroupShareProperties) GetEditPrivilege() *bool { if o == nil { return nil } return o.EditPrivilege } // GetEditPrivilegeOk returns a tuple with the EditPrivilege field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupShareProperties) GetEditPrivilegeOk() (*bool, bool) { if o == nil { return nil, false } return o.EditPrivilege, true } // SetEditPrivilege sets field value func (o *GroupShareProperties) SetEditPrivilege(v bool) { o.EditPrivilege = &v } // HasEditPrivilege returns a boolean if a field has been set. func (o *GroupShareProperties) HasEditPrivilege() bool { if o != nil && o.EditPrivilege != nil { return true } return false } // GetSharePrivilege returns the SharePrivilege field value // If the value is explicit nil, nil is returned func (o *GroupShareProperties) GetSharePrivilege() *bool { if o == nil { return nil } return o.SharePrivilege } // GetSharePrivilegeOk returns a tuple with the SharePrivilege field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupShareProperties) GetSharePrivilegeOk() (*bool, bool) { if o == nil { return nil, false } return o.SharePrivilege, true } // SetSharePrivilege sets field value func (o *GroupShareProperties) SetSharePrivilege(v bool) { o.SharePrivilege = &v } // HasSharePrivilege returns a boolean if a field has been set. func (o *GroupShareProperties) HasSharePrivilege() bool { if o != nil && o.SharePrivilege != nil { return true } return false } func (o GroupShareProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.EditPrivilege != nil { toSerialize["editPrivilege"] = o.EditPrivilege } if o.SharePrivilege != nil { toSerialize["sharePrivilege"] = o.SharePrivilege } return json.Marshal(toSerialize) } type NullableGroupShareProperties struct { value *GroupShareProperties isSet bool } func (v NullableGroupShareProperties) Get() *GroupShareProperties { return v.value } func (v *NullableGroupShareProperties) Set(val *GroupShareProperties) { v.value = val v.isSet = true } func (v NullableGroupShareProperties) IsSet() bool { return v.isSet } func (v *NullableGroupShareProperties) Unset() { v.value = nil v.isSet = false } func NewNullableGroupShareProperties(val *GroupShareProperties) *NullableGroupShareProperties { return &NullableGroupShareProperties{value: val, isSet: true} } func (v NullableGroupShareProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGroupShareProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_group_shares.go000066400000000000000000000130001465267054300240770ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // GroupShares struct for GroupShares type GroupShares struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // Share representing groups and resource relationship Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]GroupShare `json:"items,omitempty"` } // NewGroupShares instantiates a new GroupShares object // This constructor will assign default values to properties that have it defined, // 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 NewGroupShares() *GroupShares { this := GroupShares{} return &this } // NewGroupSharesWithDefaults instantiates a new GroupShares object // This 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 NewGroupSharesWithDefaults() *GroupShares { this := GroupShares{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *GroupShares) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupShares) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *GroupShares) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *GroupShares) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *GroupShares) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupShares) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *GroupShares) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *GroupShares) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *GroupShares) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupShares) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *GroupShares) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *GroupShares) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *GroupShares) GetItems() *[]GroupShare { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupShares) GetItemsOk() (*[]GroupShare, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *GroupShares) SetItems(v []GroupShare) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *GroupShares) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o GroupShares) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableGroupShares struct { value *GroupShares isSet bool } func (v NullableGroupShares) Get() *GroupShares { return v.value } func (v *NullableGroupShares) Set(val *GroupShares) { v.value = val v.isSet = true } func (v NullableGroupShares) IsSet() bool { return v.isSet } func (v *NullableGroupShares) Unset() { v.value = nil v.isSet = false } func NewNullableGroupShares(val *GroupShares) *NullableGroupShares { return &NullableGroupShares{value: val, isSet: true} } func (v NullableGroupShares) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGroupShares) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_group_users.go000066400000000000000000000127021465267054300237630ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // GroupUsers Collection of the groups the user is a member of. type GroupUsers struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of the resource. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Group `json:"items,omitempty"` } // NewGroupUsers instantiates a new GroupUsers object // This constructor will assign default values to properties that have it defined, // 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 NewGroupUsers() *GroupUsers { this := GroupUsers{} return &this } // NewGroupUsersWithDefaults instantiates a new GroupUsers object // This 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 NewGroupUsersWithDefaults() *GroupUsers { this := GroupUsers{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *GroupUsers) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupUsers) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *GroupUsers) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *GroupUsers) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *GroupUsers) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupUsers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *GroupUsers) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *GroupUsers) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *GroupUsers) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupUsers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *GroupUsers) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *GroupUsers) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *GroupUsers) GetItems() *[]Group { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GroupUsers) GetItemsOk() (*[]Group, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *GroupUsers) SetItems(v []Group) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *GroupUsers) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o GroupUsers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableGroupUsers struct { value *GroupUsers isSet bool } func (v NullableGroupUsers) Get() *GroupUsers { return v.value } func (v *NullableGroupUsers) Set(val *GroupUsers) { v.value = val v.isSet = true } func (v NullableGroupUsers) IsSet() bool { return v.isSet } func (v *NullableGroupUsers) Unset() { v.value = nil v.isSet = false } func NewNullableGroupUsers(val *GroupUsers) *NullableGroupUsers { return &NullableGroupUsers{value: val, isSet: true} } func (v NullableGroupUsers) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGroupUsers) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_groups.go000066400000000000000000000123661465267054300227330ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Groups struct for Groups type Groups struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of the resource. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Group `json:"items,omitempty"` } // NewGroups instantiates a new Groups object // This constructor will assign default values to properties that have it defined, // 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 NewGroups() *Groups { this := Groups{} return &this } // NewGroupsWithDefaults instantiates a new Groups object // This 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 NewGroupsWithDefaults() *Groups { this := Groups{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Groups) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Groups) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Groups) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Groups) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Groups) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Groups) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Groups) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Groups) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Groups) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Groups) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Groups) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Groups) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Groups) GetItems() *[]Group { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Groups) GetItemsOk() (*[]Group, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Groups) SetItems(v []Group) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Groups) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o Groups) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableGroups struct { value *Groups isSet bool } func (v NullableGroups) Get() *Groups { return v.value } func (v *NullableGroups) Set(val *Groups) { v.value = val v.isSet = true } func (v NullableGroups) IsSet() bool { return v.isSet } func (v *NullableGroups) Unset() { v.value = nil v.isSet = false } func NewNullableGroups(val *Groups) *NullableGroups { return &NullableGroups{value: val, isSet: true} } func (v NullableGroups) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGroups) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_image.go000066400000000000000000000144711465267054300224750ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Image struct for Image type Image struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *ImageProperties `json:"properties"` } // NewImage instantiates a new Image object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewImage(properties ImageProperties) *Image { this := Image{} this.Properties = &properties return &this } // NewImageWithDefaults instantiates a new Image object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewImageWithDefaults() *Image { this := Image{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Image) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Image) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Image) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Image) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Image) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Image) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Image) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Image) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Image) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Image) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Image) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Image) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Image) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Image) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Image) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Image) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Image) GetProperties() *ImageProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Image) GetPropertiesOk() (*ImageProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Image) SetProperties(v ImageProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Image) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o Image) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableImage struct { value *Image isSet bool } func (v NullableImage) Get() *Image { return v.value } func (v *NullableImage) Set(val *Image) { v.value = val v.isSet = true } func (v NullableImage) IsSet() bool { return v.isSet } func (v *NullableImage) Unset() { v.value = nil v.isSet = false } func NewNullableImage(val *Image) *NullableImage { return &NullableImage{value: val, isSet: true} } func (v NullableImage) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableImage) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_image_properties.go000066400000000000000000000545701465267054300247550ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ImageProperties struct for ImageProperties type ImageProperties struct { // The resource name. Name *string `json:"name,omitempty"` // Human-readable description. Description *string `json:"description,omitempty"` // The location of this image/snapshot. Location *string `json:"location,omitempty"` // The image size in GB. Size *float32 `json:"size,omitempty"` // Hot-plug capable CPU (no reboot required). CpuHotPlug *bool `json:"cpuHotPlug,omitempty"` // Hot-unplug capable CPU (no reboot required). CpuHotUnplug *bool `json:"cpuHotUnplug,omitempty"` // Hot-plug capable RAM (no reboot required). RamHotPlug *bool `json:"ramHotPlug,omitempty"` // Hot-unplug capable RAM (no reboot required). RamHotUnplug *bool `json:"ramHotUnplug,omitempty"` // Hot-plug capable NIC (no reboot required). NicHotPlug *bool `json:"nicHotPlug,omitempty"` // Hot-unplug capable NIC (no reboot required). NicHotUnplug *bool `json:"nicHotUnplug,omitempty"` // Hot-plug capable Virt-IO drive (no reboot required). DiscVirtioHotPlug *bool `json:"discVirtioHotPlug,omitempty"` // Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. DiscVirtioHotUnplug *bool `json:"discVirtioHotUnplug,omitempty"` // Hot-plug capable SCSI drive (no reboot required). DiscScsiHotPlug *bool `json:"discScsiHotPlug,omitempty"` // Hot-unplug capable SCSI drive (no reboot required). Not supported with Windows VMs. DiscScsiHotUnplug *bool `json:"discScsiHotUnplug,omitempty"` // If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior ExposeSerial *bool `json:"exposeSerial,omitempty"` // The OS type of this image. LicenceType *string `json:"licenceType"` // The image type. ImageType *string `json:"imageType,omitempty"` // Indicates whether the image is part of a public repository. Public *bool `json:"public,omitempty"` // List of image aliases mapped for this image ImageAliases *[]string `json:"imageAliases,omitempty"` // Cloud init compatibility. CloudInit *string `json:"cloudInit,omitempty"` } // NewImageProperties instantiates a new ImageProperties object // This constructor will assign default values to properties that have it defined, // 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 NewImageProperties(licenceType string) *ImageProperties { this := ImageProperties{} var exposeSerial bool = false this.ExposeSerial = &exposeSerial this.LicenceType = &licenceType return &this } // NewImagePropertiesWithDefaults instantiates a new ImageProperties object // This 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 NewImagePropertiesWithDefaults() *ImageProperties { this := ImageProperties{} var exposeSerial bool = false this.ExposeSerial = &exposeSerial return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *ImageProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *ImageProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetDescription returns the Description field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetDescription() *string { if o == nil { return nil } return o.Description } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetDescriptionOk() (*string, bool) { if o == nil { return nil, false } return o.Description, true } // SetDescription sets field value func (o *ImageProperties) SetDescription(v string) { o.Description = &v } // HasDescription returns a boolean if a field has been set. func (o *ImageProperties) HasDescription() bool { if o != nil && o.Description != nil { return true } return false } // GetLocation returns the Location field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetLocation() *string { if o == nil { return nil } return o.Location } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } return o.Location, true } // SetLocation sets field value func (o *ImageProperties) SetLocation(v string) { o.Location = &v } // HasLocation returns a boolean if a field has been set. func (o *ImageProperties) HasLocation() bool { if o != nil && o.Location != nil { return true } return false } // GetSize returns the Size field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetSize() *float32 { if o == nil { return nil } return o.Size } // GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetSizeOk() (*float32, bool) { if o == nil { return nil, false } return o.Size, true } // SetSize sets field value func (o *ImageProperties) SetSize(v float32) { o.Size = &v } // HasSize returns a boolean if a field has been set. func (o *ImageProperties) HasSize() bool { if o != nil && o.Size != nil { return true } return false } // GetCpuHotPlug returns the CpuHotPlug field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetCpuHotPlug() *bool { if o == nil { return nil } return o.CpuHotPlug } // GetCpuHotPlugOk returns a tuple with the CpuHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetCpuHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.CpuHotPlug, true } // SetCpuHotPlug sets field value func (o *ImageProperties) SetCpuHotPlug(v bool) { o.CpuHotPlug = &v } // HasCpuHotPlug returns a boolean if a field has been set. func (o *ImageProperties) HasCpuHotPlug() bool { if o != nil && o.CpuHotPlug != nil { return true } return false } // GetCpuHotUnplug returns the CpuHotUnplug field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetCpuHotUnplug() *bool { if o == nil { return nil } return o.CpuHotUnplug } // GetCpuHotUnplugOk returns a tuple with the CpuHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetCpuHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.CpuHotUnplug, true } // SetCpuHotUnplug sets field value func (o *ImageProperties) SetCpuHotUnplug(v bool) { o.CpuHotUnplug = &v } // HasCpuHotUnplug returns a boolean if a field has been set. func (o *ImageProperties) HasCpuHotUnplug() bool { if o != nil && o.CpuHotUnplug != nil { return true } return false } // GetRamHotPlug returns the RamHotPlug field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetRamHotPlug() *bool { if o == nil { return nil } return o.RamHotPlug } // GetRamHotPlugOk returns a tuple with the RamHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetRamHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.RamHotPlug, true } // SetRamHotPlug sets field value func (o *ImageProperties) SetRamHotPlug(v bool) { o.RamHotPlug = &v } // HasRamHotPlug returns a boolean if a field has been set. func (o *ImageProperties) HasRamHotPlug() bool { if o != nil && o.RamHotPlug != nil { return true } return false } // GetRamHotUnplug returns the RamHotUnplug field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetRamHotUnplug() *bool { if o == nil { return nil } return o.RamHotUnplug } // GetRamHotUnplugOk returns a tuple with the RamHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetRamHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.RamHotUnplug, true } // SetRamHotUnplug sets field value func (o *ImageProperties) SetRamHotUnplug(v bool) { o.RamHotUnplug = &v } // HasRamHotUnplug returns a boolean if a field has been set. func (o *ImageProperties) HasRamHotUnplug() bool { if o != nil && o.RamHotUnplug != nil { return true } return false } // GetNicHotPlug returns the NicHotPlug field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetNicHotPlug() *bool { if o == nil { return nil } return o.NicHotPlug } // GetNicHotPlugOk returns a tuple with the NicHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetNicHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.NicHotPlug, true } // SetNicHotPlug sets field value func (o *ImageProperties) SetNicHotPlug(v bool) { o.NicHotPlug = &v } // HasNicHotPlug returns a boolean if a field has been set. func (o *ImageProperties) HasNicHotPlug() bool { if o != nil && o.NicHotPlug != nil { return true } return false } // GetNicHotUnplug returns the NicHotUnplug field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetNicHotUnplug() *bool { if o == nil { return nil } return o.NicHotUnplug } // GetNicHotUnplugOk returns a tuple with the NicHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetNicHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.NicHotUnplug, true } // SetNicHotUnplug sets field value func (o *ImageProperties) SetNicHotUnplug(v bool) { o.NicHotUnplug = &v } // HasNicHotUnplug returns a boolean if a field has been set. func (o *ImageProperties) HasNicHotUnplug() bool { if o != nil && o.NicHotUnplug != nil { return true } return false } // GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetDiscVirtioHotPlug() *bool { if o == nil { return nil } return o.DiscVirtioHotPlug } // GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.DiscVirtioHotPlug, true } // SetDiscVirtioHotPlug sets field value func (o *ImageProperties) SetDiscVirtioHotPlug(v bool) { o.DiscVirtioHotPlug = &v } // HasDiscVirtioHotPlug returns a boolean if a field has been set. func (o *ImageProperties) HasDiscVirtioHotPlug() bool { if o != nil && o.DiscVirtioHotPlug != nil { return true } return false } // GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetDiscVirtioHotUnplug() *bool { if o == nil { return nil } return o.DiscVirtioHotUnplug } // GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.DiscVirtioHotUnplug, true } // SetDiscVirtioHotUnplug sets field value func (o *ImageProperties) SetDiscVirtioHotUnplug(v bool) { o.DiscVirtioHotUnplug = &v } // HasDiscVirtioHotUnplug returns a boolean if a field has been set. func (o *ImageProperties) HasDiscVirtioHotUnplug() bool { if o != nil && o.DiscVirtioHotUnplug != nil { return true } return false } // GetDiscScsiHotPlug returns the DiscScsiHotPlug field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetDiscScsiHotPlug() *bool { if o == nil { return nil } return o.DiscScsiHotPlug } // GetDiscScsiHotPlugOk returns a tuple with the DiscScsiHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetDiscScsiHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.DiscScsiHotPlug, true } // SetDiscScsiHotPlug sets field value func (o *ImageProperties) SetDiscScsiHotPlug(v bool) { o.DiscScsiHotPlug = &v } // HasDiscScsiHotPlug returns a boolean if a field has been set. func (o *ImageProperties) HasDiscScsiHotPlug() bool { if o != nil && o.DiscScsiHotPlug != nil { return true } return false } // GetDiscScsiHotUnplug returns the DiscScsiHotUnplug field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetDiscScsiHotUnplug() *bool { if o == nil { return nil } return o.DiscScsiHotUnplug } // GetDiscScsiHotUnplugOk returns a tuple with the DiscScsiHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetDiscScsiHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.DiscScsiHotUnplug, true } // SetDiscScsiHotUnplug sets field value func (o *ImageProperties) SetDiscScsiHotUnplug(v bool) { o.DiscScsiHotUnplug = &v } // HasDiscScsiHotUnplug returns a boolean if a field has been set. func (o *ImageProperties) HasDiscScsiHotUnplug() bool { if o != nil && o.DiscScsiHotUnplug != nil { return true } return false } // GetExposeSerial returns the ExposeSerial field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetExposeSerial() *bool { if o == nil { return nil } return o.ExposeSerial } // GetExposeSerialOk returns a tuple with the ExposeSerial field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetExposeSerialOk() (*bool, bool) { if o == nil { return nil, false } return o.ExposeSerial, true } // SetExposeSerial sets field value func (o *ImageProperties) SetExposeSerial(v bool) { o.ExposeSerial = &v } // HasExposeSerial returns a boolean if a field has been set. func (o *ImageProperties) HasExposeSerial() bool { if o != nil && o.ExposeSerial != nil { return true } return false } // GetLicenceType returns the LicenceType field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetLicenceType() *string { if o == nil { return nil } return o.LicenceType } // GetLicenceTypeOk returns a tuple with the LicenceType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetLicenceTypeOk() (*string, bool) { if o == nil { return nil, false } return o.LicenceType, true } // SetLicenceType sets field value func (o *ImageProperties) SetLicenceType(v string) { o.LicenceType = &v } // HasLicenceType returns a boolean if a field has been set. func (o *ImageProperties) HasLicenceType() bool { if o != nil && o.LicenceType != nil { return true } return false } // GetImageType returns the ImageType field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetImageType() *string { if o == nil { return nil } return o.ImageType } // GetImageTypeOk returns a tuple with the ImageType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetImageTypeOk() (*string, bool) { if o == nil { return nil, false } return o.ImageType, true } // SetImageType sets field value func (o *ImageProperties) SetImageType(v string) { o.ImageType = &v } // HasImageType returns a boolean if a field has been set. func (o *ImageProperties) HasImageType() bool { if o != nil && o.ImageType != nil { return true } return false } // GetPublic returns the Public field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetPublic() *bool { if o == nil { return nil } return o.Public } // GetPublicOk returns a tuple with the Public field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetPublicOk() (*bool, bool) { if o == nil { return nil, false } return o.Public, true } // SetPublic sets field value func (o *ImageProperties) SetPublic(v bool) { o.Public = &v } // HasPublic returns a boolean if a field has been set. func (o *ImageProperties) HasPublic() bool { if o != nil && o.Public != nil { return true } return false } // GetImageAliases returns the ImageAliases field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetImageAliases() *[]string { if o == nil { return nil } return o.ImageAliases } // GetImageAliasesOk returns a tuple with the ImageAliases field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetImageAliasesOk() (*[]string, bool) { if o == nil { return nil, false } return o.ImageAliases, true } // SetImageAliases sets field value func (o *ImageProperties) SetImageAliases(v []string) { o.ImageAliases = &v } // HasImageAliases returns a boolean if a field has been set. func (o *ImageProperties) HasImageAliases() bool { if o != nil && o.ImageAliases != nil { return true } return false } // GetCloudInit returns the CloudInit field value // If the value is explicit nil, nil is returned func (o *ImageProperties) GetCloudInit() *string { if o == nil { return nil } return o.CloudInit } // GetCloudInitOk returns a tuple with the CloudInit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ImageProperties) GetCloudInitOk() (*string, bool) { if o == nil { return nil, false } return o.CloudInit, true } // SetCloudInit sets field value func (o *ImageProperties) SetCloudInit(v string) { o.CloudInit = &v } // HasCloudInit returns a boolean if a field has been set. func (o *ImageProperties) HasCloudInit() bool { if o != nil && o.CloudInit != nil { return true } return false } func (o ImageProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Description != nil { toSerialize["description"] = o.Description } if o.Location != nil { toSerialize["location"] = o.Location } if o.Size != nil { toSerialize["size"] = o.Size } if o.CpuHotPlug != nil { toSerialize["cpuHotPlug"] = o.CpuHotPlug } if o.CpuHotUnplug != nil { toSerialize["cpuHotUnplug"] = o.CpuHotUnplug } if o.RamHotPlug != nil { toSerialize["ramHotPlug"] = o.RamHotPlug } if o.RamHotUnplug != nil { toSerialize["ramHotUnplug"] = o.RamHotUnplug } if o.NicHotPlug != nil { toSerialize["nicHotPlug"] = o.NicHotPlug } if o.NicHotUnplug != nil { toSerialize["nicHotUnplug"] = o.NicHotUnplug } if o.DiscVirtioHotPlug != nil { toSerialize["discVirtioHotPlug"] = o.DiscVirtioHotPlug } if o.DiscVirtioHotUnplug != nil { toSerialize["discVirtioHotUnplug"] = o.DiscVirtioHotUnplug } if o.DiscScsiHotPlug != nil { toSerialize["discScsiHotPlug"] = o.DiscScsiHotPlug } if o.DiscScsiHotUnplug != nil { toSerialize["discScsiHotUnplug"] = o.DiscScsiHotUnplug } if o.ExposeSerial != nil { toSerialize["exposeSerial"] = o.ExposeSerial } if o.LicenceType != nil { toSerialize["licenceType"] = o.LicenceType } if o.ImageType != nil { toSerialize["imageType"] = o.ImageType } if o.Public != nil { toSerialize["public"] = o.Public } if o.ImageAliases != nil { toSerialize["imageAliases"] = o.ImageAliases } if o.CloudInit != nil { toSerialize["cloudInit"] = o.CloudInit } return json.Marshal(toSerialize) } type NullableImageProperties struct { value *ImageProperties isSet bool } func (v NullableImageProperties) Get() *ImageProperties { return v.value } func (v *NullableImageProperties) Set(val *ImageProperties) { v.value = val v.isSet = true } func (v NullableImageProperties) IsSet() bool { return v.isSet } func (v *NullableImageProperties) Unset() { v.value = nil v.isSet = false } func NewNullableImageProperties(val *ImageProperties) *NullableImageProperties { return &NullableImageProperties{value: val, isSet: true} } func (v NullableImageProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableImageProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_images.go000066400000000000000000000124121465267054300226510ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Images struct for Images type Images struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Image `json:"items,omitempty"` } // NewImages instantiates a new Images object // This constructor will assign default values to properties that have it defined, // 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 NewImages() *Images { this := Images{} return &this } // NewImagesWithDefaults instantiates a new Images object // This 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 NewImagesWithDefaults() *Images { this := Images{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Images) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Images) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Images) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Images) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Images) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Images) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Images) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Images) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Images) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Images) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Images) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Images) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Images) GetItems() *[]Image { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Images) GetItemsOk() (*[]Image, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Images) SetItems(v []Image) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Images) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o Images) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableImages struct { value *Images isSet bool } func (v NullableImages) Get() *Images { return v.value } func (v *NullableImages) Set(val *Images) { v.value = val v.isSet = true } func (v NullableImages) IsSet() bool { return v.isSet } func (v *NullableImages) Unset() { v.value = nil v.isSet = false } func NewNullableImages(val *Images) *NullableImages { return &NullableImages{value: val, isSet: true} } func (v NullableImages) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableImages) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_info.go000066400000000000000000000105711465267054300223430ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Info struct for Info type Info struct { // The API entry point. Href *string `json:"href,omitempty"` // The API name. Name *string `json:"name,omitempty"` // The API version. Version *string `json:"version,omitempty"` } // NewInfo instantiates a new Info object // This constructor will assign default values to properties that have it defined, // 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 NewInfo() *Info { this := Info{} return &this } // NewInfoWithDefaults instantiates a new Info object // This 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 NewInfoWithDefaults() *Info { this := Info{} return &this } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Info) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Info) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Info) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Info) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *Info) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Info) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *Info) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *Info) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetVersion returns the Version field value // If the value is explicit nil, nil is returned func (o *Info) GetVersion() *string { if o == nil { return nil } return o.Version } // GetVersionOk returns a tuple with the Version field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Info) GetVersionOk() (*string, bool) { if o == nil { return nil, false } return o.Version, true } // SetVersion sets field value func (o *Info) SetVersion(v string) { o.Version = &v } // HasVersion returns a boolean if a field has been set. func (o *Info) HasVersion() bool { if o != nil && o.Version != nil { return true } return false } func (o Info) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Href != nil { toSerialize["href"] = o.Href } if o.Name != nil { toSerialize["name"] = o.Name } if o.Version != nil { toSerialize["version"] = o.Version } return json.Marshal(toSerialize) } type NullableInfo struct { value *Info isSet bool } func (v NullableInfo) Get() *Info { return v.value } func (v *NullableInfo) Set(val *Info) { v.value = val v.isSet = true } func (v NullableInfo) IsSet() bool { return v.isSet } func (v *NullableInfo) Unset() { v.value = nil v.isSet = false } func NewNullableInfo(val *Info) *NullableInfo { return &NullableInfo{value: val, isSet: true} } func (v NullableInfo) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_ip_block.go000066400000000000000000000146411465267054300231740ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // IpBlock struct for IpBlock type IpBlock struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *IpBlockProperties `json:"properties"` } // NewIpBlock instantiates a new IpBlock object // This constructor will assign default values to properties that have it defined, // 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 NewIpBlock(properties IpBlockProperties) *IpBlock { this := IpBlock{} this.Properties = &properties return &this } // NewIpBlockWithDefaults instantiates a new IpBlock object // This 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 NewIpBlockWithDefaults() *IpBlock { this := IpBlock{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *IpBlock) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlock) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *IpBlock) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *IpBlock) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *IpBlock) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlock) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *IpBlock) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *IpBlock) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *IpBlock) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlock) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *IpBlock) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *IpBlock) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *IpBlock) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlock) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *IpBlock) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *IpBlock) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *IpBlock) GetProperties() *IpBlockProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlock) GetPropertiesOk() (*IpBlockProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *IpBlock) SetProperties(v IpBlockProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *IpBlock) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o IpBlock) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableIpBlock struct { value *IpBlock isSet bool } func (v NullableIpBlock) Get() *IpBlock { return v.value } func (v *NullableIpBlock) Set(val *IpBlock) { v.value = val v.isSet = true } func (v NullableIpBlock) IsSet() bool { return v.isSet } func (v *NullableIpBlock) Unset() { v.value = nil v.isSet = false } func NewNullableIpBlock(val *IpBlock) *NullableIpBlock { return &NullableIpBlock{value: val, isSet: true} } func (v NullableIpBlock) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableIpBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_ip_block_properties.go000066400000000000000000000157231465267054300254520ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // IpBlockProperties struct for IpBlockProperties type IpBlockProperties struct { // Collection of IPs, associated with the IP Block. Ips *[]string `json:"ips,omitempty"` // Location of that IP block. Property cannot be modified after it is created (disallowed in update requests). Location *string `json:"location"` // The size of the IP block. Size *int32 `json:"size"` // The name of the resource. Name *string `json:"name,omitempty"` // Read-Only attribute. Lists consumption detail for an individual IP IpConsumers *[]IpConsumer `json:"ipConsumers,omitempty"` } // NewIpBlockProperties instantiates a new IpBlockProperties object // This constructor will assign default values to properties that have it defined, // 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 NewIpBlockProperties(location string, size int32) *IpBlockProperties { this := IpBlockProperties{} this.Location = &location this.Size = &size return &this } // NewIpBlockPropertiesWithDefaults instantiates a new IpBlockProperties object // This 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 NewIpBlockPropertiesWithDefaults() *IpBlockProperties { this := IpBlockProperties{} return &this } // GetIps returns the Ips field value // If the value is explicit nil, nil is returned func (o *IpBlockProperties) GetIps() *[]string { if o == nil { return nil } return o.Ips } // GetIpsOk returns a tuple with the Ips field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlockProperties) GetIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.Ips, true } // SetIps sets field value func (o *IpBlockProperties) SetIps(v []string) { o.Ips = &v } // HasIps returns a boolean if a field has been set. func (o *IpBlockProperties) HasIps() bool { if o != nil && o.Ips != nil { return true } return false } // GetLocation returns the Location field value // If the value is explicit nil, nil is returned func (o *IpBlockProperties) GetLocation() *string { if o == nil { return nil } return o.Location } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlockProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } return o.Location, true } // SetLocation sets field value func (o *IpBlockProperties) SetLocation(v string) { o.Location = &v } // HasLocation returns a boolean if a field has been set. func (o *IpBlockProperties) HasLocation() bool { if o != nil && o.Location != nil { return true } return false } // GetSize returns the Size field value // If the value is explicit nil, nil is returned func (o *IpBlockProperties) GetSize() *int32 { if o == nil { return nil } return o.Size } // GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlockProperties) GetSizeOk() (*int32, bool) { if o == nil { return nil, false } return o.Size, true } // SetSize sets field value func (o *IpBlockProperties) SetSize(v int32) { o.Size = &v } // HasSize returns a boolean if a field has been set. func (o *IpBlockProperties) HasSize() bool { if o != nil && o.Size != nil { return true } return false } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *IpBlockProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlockProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *IpBlockProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *IpBlockProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetIpConsumers returns the IpConsumers field value // If the value is explicit nil, nil is returned func (o *IpBlockProperties) GetIpConsumers() *[]IpConsumer { if o == nil { return nil } return o.IpConsumers } // GetIpConsumersOk returns a tuple with the IpConsumers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlockProperties) GetIpConsumersOk() (*[]IpConsumer, bool) { if o == nil { return nil, false } return o.IpConsumers, true } // SetIpConsumers sets field value func (o *IpBlockProperties) SetIpConsumers(v []IpConsumer) { o.IpConsumers = &v } // HasIpConsumers returns a boolean if a field has been set. func (o *IpBlockProperties) HasIpConsumers() bool { if o != nil && o.IpConsumers != nil { return true } return false } func (o IpBlockProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Ips != nil { toSerialize["ips"] = o.Ips } if o.Location != nil { toSerialize["location"] = o.Location } if o.Size != nil { toSerialize["size"] = o.Size } if o.Name != nil { toSerialize["name"] = o.Name } if o.IpConsumers != nil { toSerialize["ipConsumers"] = o.IpConsumers } return json.Marshal(toSerialize) } type NullableIpBlockProperties struct { value *IpBlockProperties isSet bool } func (v NullableIpBlockProperties) Get() *IpBlockProperties { return v.value } func (v *NullableIpBlockProperties) Set(val *IpBlockProperties) { v.value = val v.isSet = true } func (v NullableIpBlockProperties) IsSet() bool { return v.isSet } func (v *NullableIpBlockProperties) Unset() { v.value = nil v.isSet = false } func NewNullableIpBlockProperties(val *IpBlockProperties) *NullableIpBlockProperties { return &NullableIpBlockProperties{value: val, isSet: true} } func (v NullableIpBlockProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableIpBlockProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_ip_blocks.go000066400000000000000000000200321465267054300233460ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // IpBlocks struct for IpBlocks type IpBlocks struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]IpBlock `json:"items,omitempty"` // The offset, specified in the request (if not is specified, 0 is used by default). Offset *float32 `json:"offset,omitempty"` // The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewIpBlocks instantiates a new IpBlocks object // This constructor will assign default values to properties that have it defined, // 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 NewIpBlocks() *IpBlocks { this := IpBlocks{} return &this } // NewIpBlocksWithDefaults instantiates a new IpBlocks object // This 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 NewIpBlocksWithDefaults() *IpBlocks { this := IpBlocks{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *IpBlocks) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlocks) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *IpBlocks) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *IpBlocks) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *IpBlocks) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlocks) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *IpBlocks) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *IpBlocks) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *IpBlocks) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlocks) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *IpBlocks) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *IpBlocks) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *IpBlocks) GetItems() *[]IpBlock { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlocks) GetItemsOk() (*[]IpBlock, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *IpBlocks) SetItems(v []IpBlock) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *IpBlocks) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *IpBlocks) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlocks) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *IpBlocks) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *IpBlocks) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *IpBlocks) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlocks) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *IpBlocks) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *IpBlocks) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *IpBlocks) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpBlocks) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *IpBlocks) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *IpBlocks) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o IpBlocks) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableIpBlocks struct { value *IpBlocks isSet bool } func (v NullableIpBlocks) Get() *IpBlocks { return v.value } func (v *NullableIpBlocks) Set(val *IpBlocks) { v.value = val v.isSet = true } func (v NullableIpBlocks) IsSet() bool { return v.isSet } func (v *NullableIpBlocks) Unset() { v.value = nil v.isSet = false } func NewNullableIpBlocks(val *IpBlocks) *NullableIpBlocks { return &NullableIpBlocks{value: val, isSet: true} } func (v NullableIpBlocks) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableIpBlocks) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_ip_consumer.go000066400000000000000000000242571465267054300237410ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // IpConsumer struct for IpConsumer type IpConsumer struct { Ip *string `json:"ip,omitempty"` Mac *string `json:"mac,omitempty"` NicId *string `json:"nicId,omitempty"` ServerId *string `json:"serverId,omitempty"` ServerName *string `json:"serverName,omitempty"` DatacenterId *string `json:"datacenterId,omitempty"` DatacenterName *string `json:"datacenterName,omitempty"` K8sNodePoolUuid *string `json:"k8sNodePoolUuid,omitempty"` K8sClusterUuid *string `json:"k8sClusterUuid,omitempty"` } // NewIpConsumer instantiates a new IpConsumer object // This constructor will assign default values to properties that have it defined, // 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 NewIpConsumer() *IpConsumer { this := IpConsumer{} return &this } // NewIpConsumerWithDefaults instantiates a new IpConsumer object // This 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 NewIpConsumerWithDefaults() *IpConsumer { this := IpConsumer{} return &this } // GetIp returns the Ip field value // If the value is explicit nil, nil is returned func (o *IpConsumer) GetIp() *string { if o == nil { return nil } return o.Ip } // GetIpOk returns a tuple with the Ip field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpConsumer) GetIpOk() (*string, bool) { if o == nil { return nil, false } return o.Ip, true } // SetIp sets field value func (o *IpConsumer) SetIp(v string) { o.Ip = &v } // HasIp returns a boolean if a field has been set. func (o *IpConsumer) HasIp() bool { if o != nil && o.Ip != nil { return true } return false } // GetMac returns the Mac field value // If the value is explicit nil, nil is returned func (o *IpConsumer) GetMac() *string { if o == nil { return nil } return o.Mac } // GetMacOk returns a tuple with the Mac field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpConsumer) GetMacOk() (*string, bool) { if o == nil { return nil, false } return o.Mac, true } // SetMac sets field value func (o *IpConsumer) SetMac(v string) { o.Mac = &v } // HasMac returns a boolean if a field has been set. func (o *IpConsumer) HasMac() bool { if o != nil && o.Mac != nil { return true } return false } // GetNicId returns the NicId field value // If the value is explicit nil, nil is returned func (o *IpConsumer) GetNicId() *string { if o == nil { return nil } return o.NicId } // GetNicIdOk returns a tuple with the NicId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpConsumer) GetNicIdOk() (*string, bool) { if o == nil { return nil, false } return o.NicId, true } // SetNicId sets field value func (o *IpConsumer) SetNicId(v string) { o.NicId = &v } // HasNicId returns a boolean if a field has been set. func (o *IpConsumer) HasNicId() bool { if o != nil && o.NicId != nil { return true } return false } // GetServerId returns the ServerId field value // If the value is explicit nil, nil is returned func (o *IpConsumer) GetServerId() *string { if o == nil { return nil } return o.ServerId } // GetServerIdOk returns a tuple with the ServerId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpConsumer) GetServerIdOk() (*string, bool) { if o == nil { return nil, false } return o.ServerId, true } // SetServerId sets field value func (o *IpConsumer) SetServerId(v string) { o.ServerId = &v } // HasServerId returns a boolean if a field has been set. func (o *IpConsumer) HasServerId() bool { if o != nil && o.ServerId != nil { return true } return false } // GetServerName returns the ServerName field value // If the value is explicit nil, nil is returned func (o *IpConsumer) GetServerName() *string { if o == nil { return nil } return o.ServerName } // GetServerNameOk returns a tuple with the ServerName field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpConsumer) GetServerNameOk() (*string, bool) { if o == nil { return nil, false } return o.ServerName, true } // SetServerName sets field value func (o *IpConsumer) SetServerName(v string) { o.ServerName = &v } // HasServerName returns a boolean if a field has been set. func (o *IpConsumer) HasServerName() bool { if o != nil && o.ServerName != nil { return true } return false } // GetDatacenterId returns the DatacenterId field value // If the value is explicit nil, nil is returned func (o *IpConsumer) GetDatacenterId() *string { if o == nil { return nil } return o.DatacenterId } // GetDatacenterIdOk returns a tuple with the DatacenterId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpConsumer) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } return o.DatacenterId, true } // SetDatacenterId sets field value func (o *IpConsumer) SetDatacenterId(v string) { o.DatacenterId = &v } // HasDatacenterId returns a boolean if a field has been set. func (o *IpConsumer) HasDatacenterId() bool { if o != nil && o.DatacenterId != nil { return true } return false } // GetDatacenterName returns the DatacenterName field value // If the value is explicit nil, nil is returned func (o *IpConsumer) GetDatacenterName() *string { if o == nil { return nil } return o.DatacenterName } // GetDatacenterNameOk returns a tuple with the DatacenterName field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpConsumer) GetDatacenterNameOk() (*string, bool) { if o == nil { return nil, false } return o.DatacenterName, true } // SetDatacenterName sets field value func (o *IpConsumer) SetDatacenterName(v string) { o.DatacenterName = &v } // HasDatacenterName returns a boolean if a field has been set. func (o *IpConsumer) HasDatacenterName() bool { if o != nil && o.DatacenterName != nil { return true } return false } // GetK8sNodePoolUuid returns the K8sNodePoolUuid field value // If the value is explicit nil, nil is returned func (o *IpConsumer) GetK8sNodePoolUuid() *string { if o == nil { return nil } return o.K8sNodePoolUuid } // GetK8sNodePoolUuidOk returns a tuple with the K8sNodePoolUuid field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpConsumer) GetK8sNodePoolUuidOk() (*string, bool) { if o == nil { return nil, false } return o.K8sNodePoolUuid, true } // SetK8sNodePoolUuid sets field value func (o *IpConsumer) SetK8sNodePoolUuid(v string) { o.K8sNodePoolUuid = &v } // HasK8sNodePoolUuid returns a boolean if a field has been set. func (o *IpConsumer) HasK8sNodePoolUuid() bool { if o != nil && o.K8sNodePoolUuid != nil { return true } return false } // GetK8sClusterUuid returns the K8sClusterUuid field value // If the value is explicit nil, nil is returned func (o *IpConsumer) GetK8sClusterUuid() *string { if o == nil { return nil } return o.K8sClusterUuid } // GetK8sClusterUuidOk returns a tuple with the K8sClusterUuid field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IpConsumer) GetK8sClusterUuidOk() (*string, bool) { if o == nil { return nil, false } return o.K8sClusterUuid, true } // SetK8sClusterUuid sets field value func (o *IpConsumer) SetK8sClusterUuid(v string) { o.K8sClusterUuid = &v } // HasK8sClusterUuid returns a boolean if a field has been set. func (o *IpConsumer) HasK8sClusterUuid() bool { if o != nil && o.K8sClusterUuid != nil { return true } return false } func (o IpConsumer) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Ip != nil { toSerialize["ip"] = o.Ip } if o.Mac != nil { toSerialize["mac"] = o.Mac } if o.NicId != nil { toSerialize["nicId"] = o.NicId } if o.ServerId != nil { toSerialize["serverId"] = o.ServerId } if o.ServerName != nil { toSerialize["serverName"] = o.ServerName } if o.DatacenterId != nil { toSerialize["datacenterId"] = o.DatacenterId } if o.DatacenterName != nil { toSerialize["datacenterName"] = o.DatacenterName } if o.K8sNodePoolUuid != nil { toSerialize["k8sNodePoolUuid"] = o.K8sNodePoolUuid } if o.K8sClusterUuid != nil { toSerialize["k8sClusterUuid"] = o.K8sClusterUuid } return json.Marshal(toSerialize) } type NullableIpConsumer struct { value *IpConsumer isSet bool } func (v NullableIpConsumer) Get() *IpConsumer { return v.value } func (v *NullableIpConsumer) Set(val *IpConsumer) { v.value = val v.isSet = true } func (v NullableIpConsumer) IsSet() bool { return v.isSet } func (v *NullableIpConsumer) Unset() { v.value = nil v.isSet = false } func NewNullableIpConsumer(val *IpConsumer) *NullableIpConsumer { return &NullableIpConsumer{value: val, isSet: true} } func (v NullableIpConsumer) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableIpConsumer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_ip_failover.go000066400000000000000000000073331465267054300237110ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // IPFailover struct for IPFailover type IPFailover struct { Ip *string `json:"ip,omitempty"` NicUuid *string `json:"nicUuid,omitempty"` } // NewIPFailover instantiates a new IPFailover object // This constructor will assign default values to properties that have it defined, // 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 NewIPFailover() *IPFailover { this := IPFailover{} return &this } // NewIPFailoverWithDefaults instantiates a new IPFailover object // This 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 NewIPFailoverWithDefaults() *IPFailover { this := IPFailover{} return &this } // GetIp returns the Ip field value // If the value is explicit nil, nil is returned func (o *IPFailover) GetIp() *string { if o == nil { return nil } return o.Ip } // GetIpOk returns a tuple with the Ip field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IPFailover) GetIpOk() (*string, bool) { if o == nil { return nil, false } return o.Ip, true } // SetIp sets field value func (o *IPFailover) SetIp(v string) { o.Ip = &v } // HasIp returns a boolean if a field has been set. func (o *IPFailover) HasIp() bool { if o != nil && o.Ip != nil { return true } return false } // GetNicUuid returns the NicUuid field value // If the value is explicit nil, nil is returned func (o *IPFailover) GetNicUuid() *string { if o == nil { return nil } return o.NicUuid } // GetNicUuidOk returns a tuple with the NicUuid field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *IPFailover) GetNicUuidOk() (*string, bool) { if o == nil { return nil, false } return o.NicUuid, true } // SetNicUuid sets field value func (o *IPFailover) SetNicUuid(v string) { o.NicUuid = &v } // HasNicUuid returns a boolean if a field has been set. func (o *IPFailover) HasNicUuid() bool { if o != nil && o.NicUuid != nil { return true } return false } func (o IPFailover) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Ip != nil { toSerialize["ip"] = o.Ip } if o.NicUuid != nil { toSerialize["nicUuid"] = o.NicUuid } return json.Marshal(toSerialize) } type NullableIPFailover struct { value *IPFailover isSet bool } func (v NullableIPFailover) Get() *IPFailover { return v.value } func (v *NullableIPFailover) Set(val *IPFailover) { v.value = val v.isSet = true } func (v NullableIPFailover) IsSet() bool { return v.isSet } func (v *NullableIPFailover) Unset() { v.value = nil v.isSet = false } func NewNullableIPFailover(val *IPFailover) *NullableIPFailover { return &NullableIPFailover{value: val, isSet: true} } func (v NullableIPFailover) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableIPFailover) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_auto_scaling.go000066400000000000000000000114121465267054300263020ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesAutoScaling struct for KubernetesAutoScaling type KubernetesAutoScaling struct { // The minimum number of working nodes that the managed node pool can scale must be >= 1 and >= nodeCount. Required if autoScaling is specified. MinNodeCount *int32 `json:"minNodeCount"` // The maximum number of worker nodes that the managed node pool can scale in. Must be >= minNodeCount and must be >= nodeCount. Required if autoScaling is specified. MaxNodeCount *int32 `json:"maxNodeCount"` } // NewKubernetesAutoScaling instantiates a new KubernetesAutoScaling object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesAutoScaling(minNodeCount int32, maxNodeCount int32) *KubernetesAutoScaling { this := KubernetesAutoScaling{} this.MinNodeCount = &minNodeCount this.MaxNodeCount = &maxNodeCount return &this } // NewKubernetesAutoScalingWithDefaults instantiates a new KubernetesAutoScaling object // This 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 NewKubernetesAutoScalingWithDefaults() *KubernetesAutoScaling { this := KubernetesAutoScaling{} return &this } // GetMinNodeCount returns the MinNodeCount field value // If the value is explicit nil, nil is returned func (o *KubernetesAutoScaling) GetMinNodeCount() *int32 { if o == nil { return nil } return o.MinNodeCount } // GetMinNodeCountOk returns a tuple with the MinNodeCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesAutoScaling) GetMinNodeCountOk() (*int32, bool) { if o == nil { return nil, false } return o.MinNodeCount, true } // SetMinNodeCount sets field value func (o *KubernetesAutoScaling) SetMinNodeCount(v int32) { o.MinNodeCount = &v } // HasMinNodeCount returns a boolean if a field has been set. func (o *KubernetesAutoScaling) HasMinNodeCount() bool { if o != nil && o.MinNodeCount != nil { return true } return false } // GetMaxNodeCount returns the MaxNodeCount field value // If the value is explicit nil, nil is returned func (o *KubernetesAutoScaling) GetMaxNodeCount() *int32 { if o == nil { return nil } return o.MaxNodeCount } // GetMaxNodeCountOk returns a tuple with the MaxNodeCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesAutoScaling) GetMaxNodeCountOk() (*int32, bool) { if o == nil { return nil, false } return o.MaxNodeCount, true } // SetMaxNodeCount sets field value func (o *KubernetesAutoScaling) SetMaxNodeCount(v int32) { o.MaxNodeCount = &v } // HasMaxNodeCount returns a boolean if a field has been set. func (o *KubernetesAutoScaling) HasMaxNodeCount() bool { if o != nil && o.MaxNodeCount != nil { return true } return false } func (o KubernetesAutoScaling) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.MinNodeCount != nil { toSerialize["minNodeCount"] = o.MinNodeCount } if o.MaxNodeCount != nil { toSerialize["maxNodeCount"] = o.MaxNodeCount } return json.Marshal(toSerialize) } type NullableKubernetesAutoScaling struct { value *KubernetesAutoScaling isSet bool } func (v NullableKubernetesAutoScaling) Get() *KubernetesAutoScaling { return v.value } func (v *NullableKubernetesAutoScaling) Set(val *KubernetesAutoScaling) { v.value = val v.isSet = true } func (v NullableKubernetesAutoScaling) IsSet() bool { return v.isSet } func (v *NullableKubernetesAutoScaling) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesAutoScaling(val *KubernetesAutoScaling) *NullableKubernetesAutoScaling { return &NullableKubernetesAutoScaling{value: val, isSet: true} } func (v NullableKubernetesAutoScaling) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesAutoScaling) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_cluster.go000066400000000000000000000176051465267054300253250ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesCluster struct for KubernetesCluster type KubernetesCluster struct { // The resource unique identifier. Id *string `json:"id,omitempty"` // The object type. Type *string `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesClusterProperties `json:"properties"` Entities *KubernetesClusterEntities `json:"entities,omitempty"` } // NewKubernetesCluster instantiates a new KubernetesCluster object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesCluster(properties KubernetesClusterProperties) *KubernetesCluster { this := KubernetesCluster{} this.Properties = &properties return &this } // NewKubernetesClusterWithDefaults instantiates a new KubernetesCluster object // This 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 NewKubernetesClusterWithDefaults() *KubernetesCluster { this := KubernetesCluster{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesCluster) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesCluster) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesCluster) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesCluster) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *KubernetesCluster) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesCluster) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *KubernetesCluster) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *KubernetesCluster) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *KubernetesCluster) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesCluster) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *KubernetesCluster) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *KubernetesCluster) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *KubernetesCluster) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesCluster) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *KubernetesCluster) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *KubernetesCluster) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *KubernetesCluster) GetProperties() *KubernetesClusterProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesCluster) GetPropertiesOk() (*KubernetesClusterProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *KubernetesCluster) SetProperties(v KubernetesClusterProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *KubernetesCluster) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *KubernetesCluster) GetEntities() *KubernetesClusterEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesCluster) GetEntitiesOk() (*KubernetesClusterEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *KubernetesCluster) SetEntities(v KubernetesClusterEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *KubernetesCluster) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o KubernetesCluster) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableKubernetesCluster struct { value *KubernetesCluster isSet bool } func (v NullableKubernetesCluster) Get() *KubernetesCluster { return v.value } func (v *NullableKubernetesCluster) Set(val *KubernetesCluster) { v.value = val v.isSet = true } func (v NullableKubernetesCluster) IsSet() bool { return v.isSet } func (v *NullableKubernetesCluster) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesCluster(val *KubernetesCluster) *NullableKubernetesCluster { return &NullableKubernetesCluster{value: val, isSet: true} } func (v NullableKubernetesCluster) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesCluster) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_cluster_entities.go000066400000000000000000000070111465267054300272170ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesClusterEntities struct for KubernetesClusterEntities type KubernetesClusterEntities struct { Nodepools *KubernetesNodePools `json:"nodepools,omitempty"` } // NewKubernetesClusterEntities instantiates a new KubernetesClusterEntities object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesClusterEntities() *KubernetesClusterEntities { this := KubernetesClusterEntities{} return &this } // NewKubernetesClusterEntitiesWithDefaults instantiates a new KubernetesClusterEntities object // This 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 NewKubernetesClusterEntitiesWithDefaults() *KubernetesClusterEntities { this := KubernetesClusterEntities{} return &this } // GetNodepools returns the Nodepools field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterEntities) GetNodepools() *KubernetesNodePools { if o == nil { return nil } return o.Nodepools } // GetNodepoolsOk returns a tuple with the Nodepools field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterEntities) GetNodepoolsOk() (*KubernetesNodePools, bool) { if o == nil { return nil, false } return o.Nodepools, true } // SetNodepools sets field value func (o *KubernetesClusterEntities) SetNodepools(v KubernetesNodePools) { o.Nodepools = &v } // HasNodepools returns a boolean if a field has been set. func (o *KubernetesClusterEntities) HasNodepools() bool { if o != nil && o.Nodepools != nil { return true } return false } func (o KubernetesClusterEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Nodepools != nil { toSerialize["nodepools"] = o.Nodepools } return json.Marshal(toSerialize) } type NullableKubernetesClusterEntities struct { value *KubernetesClusterEntities isSet bool } func (v NullableKubernetesClusterEntities) Get() *KubernetesClusterEntities { return v.value } func (v *NullableKubernetesClusterEntities) Set(val *KubernetesClusterEntities) { v.value = val v.isSet = true } func (v NullableKubernetesClusterEntities) IsSet() bool { return v.isSet } func (v *NullableKubernetesClusterEntities) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesClusterEntities(val *KubernetesClusterEntities) *NullableKubernetesClusterEntities { return &NullableKubernetesClusterEntities{value: val, isSet: true} } func (v NullableKubernetesClusterEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesClusterEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_cluster_for_post.go000066400000000000000000000204511465267054300272310ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesClusterForPost struct for KubernetesClusterForPost type KubernetesClusterForPost struct { // The resource unique identifier. Id *string `json:"id,omitempty"` // The object type. Type *string `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesClusterPropertiesForPost `json:"properties"` Entities *KubernetesClusterEntities `json:"entities,omitempty"` } // NewKubernetesClusterForPost instantiates a new KubernetesClusterForPost object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesClusterForPost(properties KubernetesClusterPropertiesForPost) *KubernetesClusterForPost { this := KubernetesClusterForPost{} this.Properties = &properties return &this } // NewKubernetesClusterForPostWithDefaults instantiates a new KubernetesClusterForPost object // This 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 NewKubernetesClusterForPostWithDefaults() *KubernetesClusterForPost { this := KubernetesClusterForPost{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPost) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPost) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesClusterForPost) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesClusterForPost) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPost) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPost) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *KubernetesClusterForPost) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *KubernetesClusterForPost) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPost) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPost) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *KubernetesClusterForPost) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *KubernetesClusterForPost) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPost) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPost) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *KubernetesClusterForPost) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *KubernetesClusterForPost) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPost) GetProperties() *KubernetesClusterPropertiesForPost { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPost) GetPropertiesOk() (*KubernetesClusterPropertiesForPost, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *KubernetesClusterForPost) SetProperties(v KubernetesClusterPropertiesForPost) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *KubernetesClusterForPost) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPost) GetEntities() *KubernetesClusterEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPost) GetEntitiesOk() (*KubernetesClusterEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *KubernetesClusterForPost) SetEntities(v KubernetesClusterEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *KubernetesClusterForPost) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o KubernetesClusterForPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableKubernetesClusterForPost struct { value *KubernetesClusterForPost isSet bool } func (v NullableKubernetesClusterForPost) Get() *KubernetesClusterForPost { return v.value } func (v *NullableKubernetesClusterForPost) Set(val *KubernetesClusterForPost) { v.value = val v.isSet = true } func (v NullableKubernetesClusterForPost) IsSet() bool { return v.isSet } func (v *NullableKubernetesClusterForPost) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesClusterForPost(val *KubernetesClusterForPost) *NullableKubernetesClusterForPost { return &NullableKubernetesClusterForPost{value: val, isSet: true} } func (v NullableKubernetesClusterForPost) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesClusterForPost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_cluster_for_put.go000066400000000000000000000203561465267054300270600ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesClusterForPut struct for KubernetesClusterForPut type KubernetesClusterForPut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object. Type *string `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesClusterPropertiesForPut `json:"properties"` Entities *KubernetesClusterEntities `json:"entities,omitempty"` } // NewKubernetesClusterForPut instantiates a new KubernetesClusterForPut object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesClusterForPut(properties KubernetesClusterPropertiesForPut) *KubernetesClusterForPut { this := KubernetesClusterForPut{} this.Properties = &properties return &this } // NewKubernetesClusterForPutWithDefaults instantiates a new KubernetesClusterForPut object // This 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 NewKubernetesClusterForPutWithDefaults() *KubernetesClusterForPut { this := KubernetesClusterForPut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesClusterForPut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesClusterForPut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPut) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPut) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *KubernetesClusterForPut) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *KubernetesClusterForPut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *KubernetesClusterForPut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *KubernetesClusterForPut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPut) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPut) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *KubernetesClusterForPut) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *KubernetesClusterForPut) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPut) GetProperties() *KubernetesClusterPropertiesForPut { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPut) GetPropertiesOk() (*KubernetesClusterPropertiesForPut, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *KubernetesClusterForPut) SetProperties(v KubernetesClusterPropertiesForPut) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *KubernetesClusterForPut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterForPut) GetEntities() *KubernetesClusterEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterForPut) GetEntitiesOk() (*KubernetesClusterEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *KubernetesClusterForPut) SetEntities(v KubernetesClusterEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *KubernetesClusterForPut) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o KubernetesClusterForPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableKubernetesClusterForPut struct { value *KubernetesClusterForPut isSet bool } func (v NullableKubernetesClusterForPut) Get() *KubernetesClusterForPut { return v.value } func (v *NullableKubernetesClusterForPut) Set(val *KubernetesClusterForPut) { v.value = val v.isSet = true } func (v NullableKubernetesClusterForPut) IsSet() bool { return v.isSet } func (v *NullableKubernetesClusterForPut) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesClusterForPut(val *KubernetesClusterForPut) *NullableKubernetesClusterForPut { return &NullableKubernetesClusterForPut{value: val, isSet: true} } func (v NullableKubernetesClusterForPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesClusterForPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_cluster_properties.go000066400000000000000000000374551465267054300276060ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesClusterProperties struct for KubernetesClusterProperties type KubernetesClusterProperties struct { // A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Name *string `json:"name"` // The Kubernetes version the cluster is running. This imposes restrictions on what Kubernetes versions can be run in a cluster's nodepools. Additionally, not all Kubernetes versions are viable upgrade targets for all prior versions. K8sVersion *string `json:"k8sVersion,omitempty"` MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` // List of available versions for upgrading the cluster AvailableUpgradeVersions *[]string `json:"availableUpgradeVersions,omitempty"` // List of versions that may be used for node pools under this cluster ViableNodePoolVersions *[]string `json:"viableNodePoolVersions,omitempty"` // The indicator if the cluster is public or private. Be aware that setting it to false is currently in beta phase. Public *bool `json:"public,omitempty"` // The location of the cluster if the cluster is private. This property is immutable. The location must be enabled for your contract or you must have a Datacenter within that location. This attribute is mandatory if the cluster is private. Location *string `json:"location,omitempty"` // The nat gateway IP of the cluster if the cluster is private. This property is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private. NatGatewayIp *string `json:"natGatewayIp,omitempty"` // The node subnet of the cluster, if the cluster is private. This property is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length. NodeSubnet *string `json:"nodeSubnet,omitempty"` // Access to the K8s API server is restricted to these CIDRs. Traffic, internal to the cluster, is not affected by this restriction. If no allowlist is specified, access is not restricted. If an IP without subnet mask is provided, the default value is used: 32 for IPv4 and 128 for IPv6. ApiSubnetAllowList *[]string `json:"apiSubnetAllowList,omitempty"` // List of S3 bucket configured for K8s usage. For now it contains only an S3 bucket used to store K8s API audit logs S3Buckets *[]S3Bucket `json:"s3Buckets,omitempty"` } // NewKubernetesClusterProperties instantiates a new KubernetesClusterProperties object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesClusterProperties(name string) *KubernetesClusterProperties { this := KubernetesClusterProperties{} this.Name = &name var public bool = true this.Public = &public return &this } // NewKubernetesClusterPropertiesWithDefaults instantiates a new KubernetesClusterProperties object // This 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 NewKubernetesClusterPropertiesWithDefaults() *KubernetesClusterProperties { this := KubernetesClusterProperties{} var public bool = true this.Public = &public return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *KubernetesClusterProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetK8sVersion returns the K8sVersion field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetK8sVersion() *string { if o == nil { return nil } return o.K8sVersion } // GetK8sVersionOk returns a tuple with the K8sVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } return o.K8sVersion, true } // SetK8sVersion sets field value func (o *KubernetesClusterProperties) SetK8sVersion(v string) { o.K8sVersion = &v } // HasK8sVersion returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasK8sVersion() bool { if o != nil && o.K8sVersion != nil { return true } return false } // GetMaintenanceWindow returns the MaintenanceWindow field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil } return o.MaintenanceWindow } // GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { if o == nil { return nil, false } return o.MaintenanceWindow, true } // SetMaintenanceWindow sets field value func (o *KubernetesClusterProperties) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { o.MaintenanceWindow = &v } // HasMaintenanceWindow returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasMaintenanceWindow() bool { if o != nil && o.MaintenanceWindow != nil { return true } return false } // GetAvailableUpgradeVersions returns the AvailableUpgradeVersions field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetAvailableUpgradeVersions() *[]string { if o == nil { return nil } return o.AvailableUpgradeVersions } // GetAvailableUpgradeVersionsOk returns a tuple with the AvailableUpgradeVersions field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetAvailableUpgradeVersionsOk() (*[]string, bool) { if o == nil { return nil, false } return o.AvailableUpgradeVersions, true } // SetAvailableUpgradeVersions sets field value func (o *KubernetesClusterProperties) SetAvailableUpgradeVersions(v []string) { o.AvailableUpgradeVersions = &v } // HasAvailableUpgradeVersions returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasAvailableUpgradeVersions() bool { if o != nil && o.AvailableUpgradeVersions != nil { return true } return false } // GetViableNodePoolVersions returns the ViableNodePoolVersions field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetViableNodePoolVersions() *[]string { if o == nil { return nil } return o.ViableNodePoolVersions } // GetViableNodePoolVersionsOk returns a tuple with the ViableNodePoolVersions field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetViableNodePoolVersionsOk() (*[]string, bool) { if o == nil { return nil, false } return o.ViableNodePoolVersions, true } // SetViableNodePoolVersions sets field value func (o *KubernetesClusterProperties) SetViableNodePoolVersions(v []string) { o.ViableNodePoolVersions = &v } // HasViableNodePoolVersions returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasViableNodePoolVersions() bool { if o != nil && o.ViableNodePoolVersions != nil { return true } return false } // GetPublic returns the Public field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetPublic() *bool { if o == nil { return nil } return o.Public } // GetPublicOk returns a tuple with the Public field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetPublicOk() (*bool, bool) { if o == nil { return nil, false } return o.Public, true } // SetPublic sets field value func (o *KubernetesClusterProperties) SetPublic(v bool) { o.Public = &v } // HasPublic returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasPublic() bool { if o != nil && o.Public != nil { return true } return false } // GetLocation returns the Location field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetLocation() *string { if o == nil { return nil } return o.Location } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } return o.Location, true } // SetLocation sets field value func (o *KubernetesClusterProperties) SetLocation(v string) { o.Location = &v } // HasLocation returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasLocation() bool { if o != nil && o.Location != nil { return true } return false } // GetNatGatewayIp returns the NatGatewayIp field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetNatGatewayIp() *string { if o == nil { return nil } return o.NatGatewayIp } // GetNatGatewayIpOk returns a tuple with the NatGatewayIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetNatGatewayIpOk() (*string, bool) { if o == nil { return nil, false } return o.NatGatewayIp, true } // SetNatGatewayIp sets field value func (o *KubernetesClusterProperties) SetNatGatewayIp(v string) { o.NatGatewayIp = &v } // HasNatGatewayIp returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasNatGatewayIp() bool { if o != nil && o.NatGatewayIp != nil { return true } return false } // GetNodeSubnet returns the NodeSubnet field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetNodeSubnet() *string { if o == nil { return nil } return o.NodeSubnet } // GetNodeSubnetOk returns a tuple with the NodeSubnet field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetNodeSubnetOk() (*string, bool) { if o == nil { return nil, false } return o.NodeSubnet, true } // SetNodeSubnet sets field value func (o *KubernetesClusterProperties) SetNodeSubnet(v string) { o.NodeSubnet = &v } // HasNodeSubnet returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasNodeSubnet() bool { if o != nil && o.NodeSubnet != nil { return true } return false } // GetApiSubnetAllowList returns the ApiSubnetAllowList field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetApiSubnetAllowList() *[]string { if o == nil { return nil } return o.ApiSubnetAllowList } // GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetApiSubnetAllowListOk() (*[]string, bool) { if o == nil { return nil, false } return o.ApiSubnetAllowList, true } // SetApiSubnetAllowList sets field value func (o *KubernetesClusterProperties) SetApiSubnetAllowList(v []string) { o.ApiSubnetAllowList = &v } // HasApiSubnetAllowList returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasApiSubnetAllowList() bool { if o != nil && o.ApiSubnetAllowList != nil { return true } return false } // GetS3Buckets returns the S3Buckets field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterProperties) GetS3Buckets() *[]S3Bucket { if o == nil { return nil } return o.S3Buckets } // GetS3BucketsOk returns a tuple with the S3Buckets field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterProperties) GetS3BucketsOk() (*[]S3Bucket, bool) { if o == nil { return nil, false } return o.S3Buckets, true } // SetS3Buckets sets field value func (o *KubernetesClusterProperties) SetS3Buckets(v []S3Bucket) { o.S3Buckets = &v } // HasS3Buckets returns a boolean if a field has been set. func (o *KubernetesClusterProperties) HasS3Buckets() bool { if o != nil && o.S3Buckets != nil { return true } return false } func (o KubernetesClusterProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } if o.MaintenanceWindow != nil { toSerialize["maintenanceWindow"] = o.MaintenanceWindow } if o.AvailableUpgradeVersions != nil { toSerialize["availableUpgradeVersions"] = o.AvailableUpgradeVersions } if o.ViableNodePoolVersions != nil { toSerialize["viableNodePoolVersions"] = o.ViableNodePoolVersions } if o.Public != nil { toSerialize["public"] = o.Public } if o.Location != nil { toSerialize["location"] = o.Location } if o.NatGatewayIp != nil { toSerialize["natGatewayIp"] = o.NatGatewayIp } if o.NodeSubnet != nil { toSerialize["nodeSubnet"] = o.NodeSubnet } if o.ApiSubnetAllowList != nil { toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList } if o.S3Buckets != nil { toSerialize["s3Buckets"] = o.S3Buckets } return json.Marshal(toSerialize) } type NullableKubernetesClusterProperties struct { value *KubernetesClusterProperties isSet bool } func (v NullableKubernetesClusterProperties) Get() *KubernetesClusterProperties { return v.value } func (v *NullableKubernetesClusterProperties) Set(val *KubernetesClusterProperties) { v.value = val v.isSet = true } func (v NullableKubernetesClusterProperties) IsSet() bool { return v.isSet } func (v *NullableKubernetesClusterProperties) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesClusterProperties(val *KubernetesClusterProperties) *NullableKubernetesClusterProperties { return &NullableKubernetesClusterProperties{value: val, isSet: true} } func (v NullableKubernetesClusterProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesClusterProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_cluster_properties_for_post.go000066400000000000000000000332071465267054300315100ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesClusterPropertiesForPost struct for KubernetesClusterPropertiesForPost type KubernetesClusterPropertiesForPost struct { // A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Name *string `json:"name"` // The Kubernetes version that the cluster is running. This limits which Kubernetes versions can run in a cluster's node pools. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. K8sVersion *string `json:"k8sVersion,omitempty"` MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` // The indicator whether the cluster is public or private. Note that the status FALSE is still in the beta phase. Public *bool `json:"public,omitempty"` // This attribute is mandatory if the cluster is private and optional if the cluster is public. The location must be enabled for your contract, or you must have a data center at that location. This property is not adjustable. Location *string `json:"location,omitempty"` // The nat gateway IP of the cluster if the cluster is private. This property is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private. NatGatewayIp *string `json:"natGatewayIp,omitempty"` // The node subnet of the cluster, if the cluster is private. This property is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length. NodeSubnet *string `json:"nodeSubnet,omitempty"` // Access to the K8s API server is restricted to these CIDRs. Intra-cluster traffic is not affected by this restriction. If no AllowList is specified, access is not limited. If an IP is specified without a subnet mask, the default value is 32 for IPv4 and 128 for IPv6. ApiSubnetAllowList *[]string `json:"apiSubnetAllowList,omitempty"` // List of S3 buckets configured for K8s usage. At the moment, it contains only one S3 bucket that is used to store K8s API audit logs. S3Buckets *[]S3Bucket `json:"s3Buckets,omitempty"` } // NewKubernetesClusterPropertiesForPost instantiates a new KubernetesClusterPropertiesForPost object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesClusterPropertiesForPost(name string) *KubernetesClusterPropertiesForPost { this := KubernetesClusterPropertiesForPost{} this.Name = &name var public bool = true this.Public = &public return &this } // NewKubernetesClusterPropertiesForPostWithDefaults instantiates a new KubernetesClusterPropertiesForPost object // This 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 NewKubernetesClusterPropertiesForPostWithDefaults() *KubernetesClusterPropertiesForPost { this := KubernetesClusterPropertiesForPost{} var public bool = true this.Public = &public return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPost) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *KubernetesClusterPropertiesForPost) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPost) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetK8sVersion returns the K8sVersion field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetK8sVersion() *string { if o == nil { return nil } return o.K8sVersion } // GetK8sVersionOk returns a tuple with the K8sVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPost) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } return o.K8sVersion, true } // SetK8sVersion sets field value func (o *KubernetesClusterPropertiesForPost) SetK8sVersion(v string) { o.K8sVersion = &v } // HasK8sVersion returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPost) HasK8sVersion() bool { if o != nil && o.K8sVersion != nil { return true } return false } // GetMaintenanceWindow returns the MaintenanceWindow field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil } return o.MaintenanceWindow } // GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPost) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { if o == nil { return nil, false } return o.MaintenanceWindow, true } // SetMaintenanceWindow sets field value func (o *KubernetesClusterPropertiesForPost) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { o.MaintenanceWindow = &v } // HasMaintenanceWindow returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPost) HasMaintenanceWindow() bool { if o != nil && o.MaintenanceWindow != nil { return true } return false } // GetPublic returns the Public field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetPublic() *bool { if o == nil { return nil } return o.Public } // GetPublicOk returns a tuple with the Public field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPost) GetPublicOk() (*bool, bool) { if o == nil { return nil, false } return o.Public, true } // SetPublic sets field value func (o *KubernetesClusterPropertiesForPost) SetPublic(v bool) { o.Public = &v } // HasPublic returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPost) HasPublic() bool { if o != nil && o.Public != nil { return true } return false } // GetLocation returns the Location field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetLocation() *string { if o == nil { return nil } return o.Location } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPost) GetLocationOk() (*string, bool) { if o == nil { return nil, false } return o.Location, true } // SetLocation sets field value func (o *KubernetesClusterPropertiesForPost) SetLocation(v string) { o.Location = &v } // HasLocation returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPost) HasLocation() bool { if o != nil && o.Location != nil { return true } return false } // GetNatGatewayIp returns the NatGatewayIp field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetNatGatewayIp() *string { if o == nil { return nil } return o.NatGatewayIp } // GetNatGatewayIpOk returns a tuple with the NatGatewayIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPost) GetNatGatewayIpOk() (*string, bool) { if o == nil { return nil, false } return o.NatGatewayIp, true } // SetNatGatewayIp sets field value func (o *KubernetesClusterPropertiesForPost) SetNatGatewayIp(v string) { o.NatGatewayIp = &v } // HasNatGatewayIp returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPost) HasNatGatewayIp() bool { if o != nil && o.NatGatewayIp != nil { return true } return false } // GetNodeSubnet returns the NodeSubnet field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetNodeSubnet() *string { if o == nil { return nil } return o.NodeSubnet } // GetNodeSubnetOk returns a tuple with the NodeSubnet field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPost) GetNodeSubnetOk() (*string, bool) { if o == nil { return nil, false } return o.NodeSubnet, true } // SetNodeSubnet sets field value func (o *KubernetesClusterPropertiesForPost) SetNodeSubnet(v string) { o.NodeSubnet = &v } // HasNodeSubnet returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPost) HasNodeSubnet() bool { if o != nil && o.NodeSubnet != nil { return true } return false } // GetApiSubnetAllowList returns the ApiSubnetAllowList field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetApiSubnetAllowList() *[]string { if o == nil { return nil } return o.ApiSubnetAllowList } // GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPost) GetApiSubnetAllowListOk() (*[]string, bool) { if o == nil { return nil, false } return o.ApiSubnetAllowList, true } // SetApiSubnetAllowList sets field value func (o *KubernetesClusterPropertiesForPost) SetApiSubnetAllowList(v []string) { o.ApiSubnetAllowList = &v } // HasApiSubnetAllowList returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPost) HasApiSubnetAllowList() bool { if o != nil && o.ApiSubnetAllowList != nil { return true } return false } // GetS3Buckets returns the S3Buckets field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPost) GetS3Buckets() *[]S3Bucket { if o == nil { return nil } return o.S3Buckets } // GetS3BucketsOk returns a tuple with the S3Buckets field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPost) GetS3BucketsOk() (*[]S3Bucket, bool) { if o == nil { return nil, false } return o.S3Buckets, true } // SetS3Buckets sets field value func (o *KubernetesClusterPropertiesForPost) SetS3Buckets(v []S3Bucket) { o.S3Buckets = &v } // HasS3Buckets returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPost) HasS3Buckets() bool { if o != nil && o.S3Buckets != nil { return true } return false } func (o KubernetesClusterPropertiesForPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } if o.MaintenanceWindow != nil { toSerialize["maintenanceWindow"] = o.MaintenanceWindow } if o.Public != nil { toSerialize["public"] = o.Public } if o.Location != nil { toSerialize["location"] = o.Location } if o.NatGatewayIp != nil { toSerialize["natGatewayIp"] = o.NatGatewayIp } if o.NodeSubnet != nil { toSerialize["nodeSubnet"] = o.NodeSubnet } if o.ApiSubnetAllowList != nil { toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList } if o.S3Buckets != nil { toSerialize["s3Buckets"] = o.S3Buckets } return json.Marshal(toSerialize) } type NullableKubernetesClusterPropertiesForPost struct { value *KubernetesClusterPropertiesForPost isSet bool } func (v NullableKubernetesClusterPropertiesForPost) Get() *KubernetesClusterPropertiesForPost { return v.value } func (v *NullableKubernetesClusterPropertiesForPost) Set(val *KubernetesClusterPropertiesForPost) { v.value = val v.isSet = true } func (v NullableKubernetesClusterPropertiesForPost) IsSet() bool { return v.isSet } func (v *NullableKubernetesClusterPropertiesForPost) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesClusterPropertiesForPost(val *KubernetesClusterPropertiesForPost) *NullableKubernetesClusterPropertiesForPost { return &NullableKubernetesClusterPropertiesForPost{value: val, isSet: true} } func (v NullableKubernetesClusterPropertiesForPost) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesClusterPropertiesForPost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_cluster_properties_for_put.go000066400000000000000000000215551465267054300313360ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesClusterPropertiesForPut struct for KubernetesClusterPropertiesForPut type KubernetesClusterPropertiesForPut struct { // A Kubernetes cluster name. Valid Kubernetes cluster name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Name *string `json:"name"` // The Kubernetes version that the cluster is running. This limits which Kubernetes versions can run in a cluster's node pools. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. K8sVersion *string `json:"k8sVersion,omitempty"` MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` // Access to the K8s API server is restricted to these CIDRs. Intra-cluster traffic is not affected by this restriction. If no AllowList is specified, access is not limited. If an IP is specified without a subnet mask, the default value is 32 for IPv4 and 128 for IPv6. ApiSubnetAllowList *[]string `json:"apiSubnetAllowList,omitempty"` // List of S3 buckets configured for K8s usage. At the moment, it contains only one S3 bucket that is used to store K8s API audit logs. S3Buckets *[]S3Bucket `json:"s3Buckets,omitempty"` } // NewKubernetesClusterPropertiesForPut instantiates a new KubernetesClusterPropertiesForPut object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesClusterPropertiesForPut(name string) *KubernetesClusterPropertiesForPut { this := KubernetesClusterPropertiesForPut{} this.Name = &name return &this } // NewKubernetesClusterPropertiesForPutWithDefaults instantiates a new KubernetesClusterPropertiesForPut object // This 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 NewKubernetesClusterPropertiesForPutWithDefaults() *KubernetesClusterPropertiesForPut { this := KubernetesClusterPropertiesForPut{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPut) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPut) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *KubernetesClusterPropertiesForPut) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPut) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetK8sVersion returns the K8sVersion field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPut) GetK8sVersion() *string { if o == nil { return nil } return o.K8sVersion } // GetK8sVersionOk returns a tuple with the K8sVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPut) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } return o.K8sVersion, true } // SetK8sVersion sets field value func (o *KubernetesClusterPropertiesForPut) SetK8sVersion(v string) { o.K8sVersion = &v } // HasK8sVersion returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPut) HasK8sVersion() bool { if o != nil && o.K8sVersion != nil { return true } return false } // GetMaintenanceWindow returns the MaintenanceWindow field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPut) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil } return o.MaintenanceWindow } // GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPut) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { if o == nil { return nil, false } return o.MaintenanceWindow, true } // SetMaintenanceWindow sets field value func (o *KubernetesClusterPropertiesForPut) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { o.MaintenanceWindow = &v } // HasMaintenanceWindow returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPut) HasMaintenanceWindow() bool { if o != nil && o.MaintenanceWindow != nil { return true } return false } // GetApiSubnetAllowList returns the ApiSubnetAllowList field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPut) GetApiSubnetAllowList() *[]string { if o == nil { return nil } return o.ApiSubnetAllowList } // GetApiSubnetAllowListOk returns a tuple with the ApiSubnetAllowList field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPut) GetApiSubnetAllowListOk() (*[]string, bool) { if o == nil { return nil, false } return o.ApiSubnetAllowList, true } // SetApiSubnetAllowList sets field value func (o *KubernetesClusterPropertiesForPut) SetApiSubnetAllowList(v []string) { o.ApiSubnetAllowList = &v } // HasApiSubnetAllowList returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPut) HasApiSubnetAllowList() bool { if o != nil && o.ApiSubnetAllowList != nil { return true } return false } // GetS3Buckets returns the S3Buckets field value // If the value is explicit nil, nil is returned func (o *KubernetesClusterPropertiesForPut) GetS3Buckets() *[]S3Bucket { if o == nil { return nil } return o.S3Buckets } // GetS3BucketsOk returns a tuple with the S3Buckets field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusterPropertiesForPut) GetS3BucketsOk() (*[]S3Bucket, bool) { if o == nil { return nil, false } return o.S3Buckets, true } // SetS3Buckets sets field value func (o *KubernetesClusterPropertiesForPut) SetS3Buckets(v []S3Bucket) { o.S3Buckets = &v } // HasS3Buckets returns a boolean if a field has been set. func (o *KubernetesClusterPropertiesForPut) HasS3Buckets() bool { if o != nil && o.S3Buckets != nil { return true } return false } func (o KubernetesClusterPropertiesForPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } if o.MaintenanceWindow != nil { toSerialize["maintenanceWindow"] = o.MaintenanceWindow } if o.ApiSubnetAllowList != nil { toSerialize["apiSubnetAllowList"] = o.ApiSubnetAllowList } if o.S3Buckets != nil { toSerialize["s3Buckets"] = o.S3Buckets } return json.Marshal(toSerialize) } type NullableKubernetesClusterPropertiesForPut struct { value *KubernetesClusterPropertiesForPut isSet bool } func (v NullableKubernetesClusterPropertiesForPut) Get() *KubernetesClusterPropertiesForPut { return v.value } func (v *NullableKubernetesClusterPropertiesForPut) Set(val *KubernetesClusterPropertiesForPut) { v.value = val v.isSet = true } func (v NullableKubernetesClusterPropertiesForPut) IsSet() bool { return v.isSet } func (v *NullableKubernetesClusterPropertiesForPut) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesClusterPropertiesForPut(val *KubernetesClusterPropertiesForPut) *NullableKubernetesClusterPropertiesForPut { return &NullableKubernetesClusterPropertiesForPut{value: val, isSet: true} } func (v NullableKubernetesClusterPropertiesForPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesClusterPropertiesForPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_clusters.go000066400000000000000000000135771465267054300255140ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesClusters struct for KubernetesClusters type KubernetesClusters struct { // The unique representation of the K8s cluster as a resource collection. Id *string `json:"id,omitempty"` // The resource type within a collection. Type *string `json:"type,omitempty"` // The URL to the collection representation (absolute path). Href *string `json:"href,omitempty"` // Array of K8s clusters in the collection. Items *[]KubernetesCluster `json:"items,omitempty"` } // NewKubernetesClusters instantiates a new KubernetesClusters object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesClusters() *KubernetesClusters { this := KubernetesClusters{} return &this } // NewKubernetesClustersWithDefaults instantiates a new KubernetesClusters object // This 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 NewKubernetesClustersWithDefaults() *KubernetesClusters { this := KubernetesClusters{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesClusters) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusters) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesClusters) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesClusters) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *KubernetesClusters) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusters) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *KubernetesClusters) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *KubernetesClusters) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *KubernetesClusters) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusters) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *KubernetesClusters) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *KubernetesClusters) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *KubernetesClusters) GetItems() *[]KubernetesCluster { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesClusters) GetItemsOk() (*[]KubernetesCluster, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *KubernetesClusters) SetItems(v []KubernetesCluster) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *KubernetesClusters) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o KubernetesClusters) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableKubernetesClusters struct { value *KubernetesClusters isSet bool } func (v NullableKubernetesClusters) Get() *KubernetesClusters { return v.value } func (v *NullableKubernetesClusters) Set(val *KubernetesClusters) { v.value = val v.isSet = true } func (v NullableKubernetesClusters) IsSet() bool { return v.isSet } func (v *NullableKubernetesClusters) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesClusters(val *KubernetesClusters) *NullableKubernetesClusters { return &NullableKubernetesClusters{value: val, isSet: true} } func (v NullableKubernetesClusters) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesClusters) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_maintenance_window.go000066400000000000000000000112661465267054300275120ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesMaintenanceWindow struct for KubernetesMaintenanceWindow type KubernetesMaintenanceWindow struct { // The weekday for a maintenance window. DayOfTheWeek *string `json:"dayOfTheWeek"` // The time to use for a maintenance window. Accepted formats are: HH:mm:ss; HH:mm:ss\"Z\"; HH:mm:ssZ. This time may vary by 15 minutes. Time *string `json:"time"` } // NewKubernetesMaintenanceWindow instantiates a new KubernetesMaintenanceWindow object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesMaintenanceWindow(dayOfTheWeek string, time string) *KubernetesMaintenanceWindow { this := KubernetesMaintenanceWindow{} this.DayOfTheWeek = &dayOfTheWeek this.Time = &time return &this } // NewKubernetesMaintenanceWindowWithDefaults instantiates a new KubernetesMaintenanceWindow object // This 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 NewKubernetesMaintenanceWindowWithDefaults() *KubernetesMaintenanceWindow { this := KubernetesMaintenanceWindow{} return &this } // GetDayOfTheWeek returns the DayOfTheWeek field value // If the value is explicit nil, nil is returned func (o *KubernetesMaintenanceWindow) GetDayOfTheWeek() *string { if o == nil { return nil } return o.DayOfTheWeek } // GetDayOfTheWeekOk returns a tuple with the DayOfTheWeek field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesMaintenanceWindow) GetDayOfTheWeekOk() (*string, bool) { if o == nil { return nil, false } return o.DayOfTheWeek, true } // SetDayOfTheWeek sets field value func (o *KubernetesMaintenanceWindow) SetDayOfTheWeek(v string) { o.DayOfTheWeek = &v } // HasDayOfTheWeek returns a boolean if a field has been set. func (o *KubernetesMaintenanceWindow) HasDayOfTheWeek() bool { if o != nil && o.DayOfTheWeek != nil { return true } return false } // GetTime returns the Time field value // If the value is explicit nil, nil is returned func (o *KubernetesMaintenanceWindow) GetTime() *string { if o == nil { return nil } return o.Time } // GetTimeOk returns a tuple with the Time field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesMaintenanceWindow) GetTimeOk() (*string, bool) { if o == nil { return nil, false } return o.Time, true } // SetTime sets field value func (o *KubernetesMaintenanceWindow) SetTime(v string) { o.Time = &v } // HasTime returns a boolean if a field has been set. func (o *KubernetesMaintenanceWindow) HasTime() bool { if o != nil && o.Time != nil { return true } return false } func (o KubernetesMaintenanceWindow) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.DayOfTheWeek != nil { toSerialize["dayOfTheWeek"] = o.DayOfTheWeek } if o.Time != nil { toSerialize["time"] = o.Time } return json.Marshal(toSerialize) } type NullableKubernetesMaintenanceWindow struct { value *KubernetesMaintenanceWindow isSet bool } func (v NullableKubernetesMaintenanceWindow) Get() *KubernetesMaintenanceWindow { return v.value } func (v *NullableKubernetesMaintenanceWindow) Set(val *KubernetesMaintenanceWindow) { v.value = val v.isSet = true } func (v NullableKubernetesMaintenanceWindow) IsSet() bool { return v.isSet } func (v *NullableKubernetesMaintenanceWindow) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesMaintenanceWindow(val *KubernetesMaintenanceWindow) *NullableKubernetesMaintenanceWindow { return &NullableKubernetesMaintenanceWindow{value: val, isSet: true} } func (v NullableKubernetesMaintenanceWindow) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesMaintenanceWindow) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node.go000066400000000000000000000153641465267054300245710ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNode struct for KubernetesNode type KubernetesNode struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The object type. Type *string `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *KubernetesNodeMetadata `json:"metadata,omitempty"` Properties *KubernetesNodeProperties `json:"properties"` } // NewKubernetesNode instantiates a new KubernetesNode object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNode(properties KubernetesNodeProperties) *KubernetesNode { this := KubernetesNode{} this.Properties = &properties return &this } // NewKubernetesNodeWithDefaults instantiates a new KubernetesNode object // This 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 NewKubernetesNodeWithDefaults() *KubernetesNode { this := KubernetesNode{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesNode) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNode) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesNode) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesNode) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *KubernetesNode) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNode) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *KubernetesNode) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *KubernetesNode) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *KubernetesNode) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNode) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *KubernetesNode) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *KubernetesNode) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *KubernetesNode) GetMetadata() *KubernetesNodeMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNode) GetMetadataOk() (*KubernetesNodeMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *KubernetesNode) SetMetadata(v KubernetesNodeMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *KubernetesNode) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *KubernetesNode) GetProperties() *KubernetesNodeProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNode) GetPropertiesOk() (*KubernetesNodeProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *KubernetesNode) SetProperties(v KubernetesNodeProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *KubernetesNode) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o KubernetesNode) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableKubernetesNode struct { value *KubernetesNode isSet bool } func (v NullableKubernetesNode) Get() *KubernetesNode { return v.value } func (v *NullableKubernetesNode) Set(val *KubernetesNode) { v.value = val v.isSet = true } func (v NullableKubernetesNode) IsSet() bool { return v.isSet } func (v *NullableKubernetesNode) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNode(val *KubernetesNode) *NullableKubernetesNode { return &NullableKubernetesNode{value: val, isSet: true} } func (v NullableKubernetesNode) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNode) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_metadata.go000066400000000000000000000200511465267054300264160ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" "time" ) // KubernetesNodeMetadata struct for KubernetesNodeMetadata type KubernetesNodeMetadata struct { // The resource entity tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity tags are also added as 'ETag' response headers to requests that do not use the 'depth' parameter. Etag *string `json:"etag,omitempty"` // The date the resource was created. CreatedDate *IonosTime // The date the resource was last modified. LastModifiedDate *IonosTime // The resource state. State *string `json:"state,omitempty"` // The date when the software on the node was last updated. LastSoftwareUpdatedDate *IonosTime } // NewKubernetesNodeMetadata instantiates a new KubernetesNodeMetadata object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodeMetadata() *KubernetesNodeMetadata { this := KubernetesNodeMetadata{} return &this } // NewKubernetesNodeMetadataWithDefaults instantiates a new KubernetesNodeMetadata object // This 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 NewKubernetesNodeMetadataWithDefaults() *KubernetesNodeMetadata { this := KubernetesNodeMetadata{} return &this } // GetEtag returns the Etag field value // If the value is explicit nil, nil is returned func (o *KubernetesNodeMetadata) GetEtag() *string { if o == nil { return nil } return o.Etag } // GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodeMetadata) GetEtagOk() (*string, bool) { if o == nil { return nil, false } return o.Etag, true } // SetEtag sets field value func (o *KubernetesNodeMetadata) SetEtag(v string) { o.Etag = &v } // HasEtag returns a boolean if a field has been set. func (o *KubernetesNodeMetadata) HasEtag() bool { if o != nil && o.Etag != nil { return true } return false } // GetCreatedDate returns the CreatedDate field value // If the value is explicit nil, nil is returned func (o *KubernetesNodeMetadata) GetCreatedDate() *time.Time { if o == nil { return nil } if o.CreatedDate == nil { return nil } return &o.CreatedDate.Time } // GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodeMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.CreatedDate == nil { return nil, false } return &o.CreatedDate.Time, true } // SetCreatedDate sets field value func (o *KubernetesNodeMetadata) SetCreatedDate(v time.Time) { o.CreatedDate = &IonosTime{v} } // HasCreatedDate returns a boolean if a field has been set. func (o *KubernetesNodeMetadata) HasCreatedDate() bool { if o != nil && o.CreatedDate != nil { return true } return false } // GetLastModifiedDate returns the LastModifiedDate field value // If the value is explicit nil, nil is returned func (o *KubernetesNodeMetadata) GetLastModifiedDate() *time.Time { if o == nil { return nil } if o.LastModifiedDate == nil { return nil } return &o.LastModifiedDate.Time } // GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodeMetadata) GetLastModifiedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.LastModifiedDate == nil { return nil, false } return &o.LastModifiedDate.Time, true } // SetLastModifiedDate sets field value func (o *KubernetesNodeMetadata) SetLastModifiedDate(v time.Time) { o.LastModifiedDate = &IonosTime{v} } // HasLastModifiedDate returns a boolean if a field has been set. func (o *KubernetesNodeMetadata) HasLastModifiedDate() bool { if o != nil && o.LastModifiedDate != nil { return true } return false } // GetState returns the State field value // If the value is explicit nil, nil is returned func (o *KubernetesNodeMetadata) GetState() *string { if o == nil { return nil } return o.State } // GetStateOk returns a tuple with the State field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodeMetadata) GetStateOk() (*string, bool) { if o == nil { return nil, false } return o.State, true } // SetState sets field value func (o *KubernetesNodeMetadata) SetState(v string) { o.State = &v } // HasState returns a boolean if a field has been set. func (o *KubernetesNodeMetadata) HasState() bool { if o != nil && o.State != nil { return true } return false } // GetLastSoftwareUpdatedDate returns the LastSoftwareUpdatedDate field value // If the value is explicit nil, nil is returned func (o *KubernetesNodeMetadata) GetLastSoftwareUpdatedDate() *time.Time { if o == nil { return nil } if o.LastSoftwareUpdatedDate == nil { return nil } return &o.LastSoftwareUpdatedDate.Time } // GetLastSoftwareUpdatedDateOk returns a tuple with the LastSoftwareUpdatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodeMetadata) GetLastSoftwareUpdatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.LastSoftwareUpdatedDate == nil { return nil, false } return &o.LastSoftwareUpdatedDate.Time, true } // SetLastSoftwareUpdatedDate sets field value func (o *KubernetesNodeMetadata) SetLastSoftwareUpdatedDate(v time.Time) { o.LastSoftwareUpdatedDate = &IonosTime{v} } // HasLastSoftwareUpdatedDate returns a boolean if a field has been set. func (o *KubernetesNodeMetadata) HasLastSoftwareUpdatedDate() bool { if o != nil && o.LastSoftwareUpdatedDate != nil { return true } return false } func (o KubernetesNodeMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Etag != nil { toSerialize["etag"] = o.Etag } if o.CreatedDate != nil { toSerialize["createdDate"] = o.CreatedDate } if o.LastModifiedDate != nil { toSerialize["lastModifiedDate"] = o.LastModifiedDate } if o.State != nil { toSerialize["state"] = o.State } if o.LastSoftwareUpdatedDate != nil { toSerialize["lastSoftwareUpdatedDate"] = o.LastSoftwareUpdatedDate } return json.Marshal(toSerialize) } type NullableKubernetesNodeMetadata struct { value *KubernetesNodeMetadata isSet bool } func (v NullableKubernetesNodeMetadata) Get() *KubernetesNodeMetadata { return v.value } func (v *NullableKubernetesNodeMetadata) Set(val *KubernetesNodeMetadata) { v.value = val v.isSet = true } func (v NullableKubernetesNodeMetadata) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodeMetadata) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodeMetadata(val *KubernetesNodeMetadata) *NullableKubernetesNodeMetadata { return &NullableKubernetesNodeMetadata{value: val, isSet: true} } func (v NullableKubernetesNodeMetadata) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodeMetadata) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_pool.go000066400000000000000000000157311465267054300256200ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodePool struct for KubernetesNodePool type KubernetesNodePool struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The object type. Type *string `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesNodePoolProperties `json:"properties"` } // NewKubernetesNodePool instantiates a new KubernetesNodePool object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodePool(properties KubernetesNodePoolProperties) *KubernetesNodePool { this := KubernetesNodePool{} this.Properties = &properties return &this } // NewKubernetesNodePoolWithDefaults instantiates a new KubernetesNodePool object // This 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 NewKubernetesNodePoolWithDefaults() *KubernetesNodePool { this := KubernetesNodePool{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePool) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePool) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesNodePool) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesNodePool) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePool) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePool) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *KubernetesNodePool) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *KubernetesNodePool) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePool) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePool) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *KubernetesNodePool) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *KubernetesNodePool) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePool) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePool) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *KubernetesNodePool) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *KubernetesNodePool) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePool) GetProperties() *KubernetesNodePoolProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePool) GetPropertiesOk() (*KubernetesNodePoolProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *KubernetesNodePool) SetProperties(v KubernetesNodePoolProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *KubernetesNodePool) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o KubernetesNodePool) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableKubernetesNodePool struct { value *KubernetesNodePool isSet bool } func (v NullableKubernetesNodePool) Get() *KubernetesNodePool { return v.value } func (v *NullableKubernetesNodePool) Set(val *KubernetesNodePool) { v.value = val v.isSet = true } func (v NullableKubernetesNodePool) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodePool) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodePool(val *KubernetesNodePool) *NullableKubernetesNodePool { return &NullableKubernetesNodePool{value: val, isSet: true} } func (v NullableKubernetesNodePool) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodePool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_pool_for_post.go000066400000000000000000000165321465267054300275330ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodePoolForPost struct for KubernetesNodePoolForPost type KubernetesNodePoolForPost struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The object type. Type *string `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesNodePoolPropertiesForPost `json:"properties"` } // NewKubernetesNodePoolForPost instantiates a new KubernetesNodePoolForPost object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodePoolForPost(properties KubernetesNodePoolPropertiesForPost) *KubernetesNodePoolForPost { this := KubernetesNodePoolForPost{} this.Properties = &properties return &this } // NewKubernetesNodePoolForPostWithDefaults instantiates a new KubernetesNodePoolForPost object // This 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 NewKubernetesNodePoolForPostWithDefaults() *KubernetesNodePoolForPost { this := KubernetesNodePoolForPost{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolForPost) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolForPost) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesNodePoolForPost) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesNodePoolForPost) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolForPost) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolForPost) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *KubernetesNodePoolForPost) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *KubernetesNodePoolForPost) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolForPost) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolForPost) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *KubernetesNodePoolForPost) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *KubernetesNodePoolForPost) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolForPost) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolForPost) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *KubernetesNodePoolForPost) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *KubernetesNodePoolForPost) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolForPost) GetProperties() *KubernetesNodePoolPropertiesForPost { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolForPost) GetPropertiesOk() (*KubernetesNodePoolPropertiesForPost, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *KubernetesNodePoolForPost) SetProperties(v KubernetesNodePoolPropertiesForPost) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *KubernetesNodePoolForPost) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o KubernetesNodePoolForPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableKubernetesNodePoolForPost struct { value *KubernetesNodePoolForPost isSet bool } func (v NullableKubernetesNodePoolForPost) Get() *KubernetesNodePoolForPost { return v.value } func (v *NullableKubernetesNodePoolForPost) Set(val *KubernetesNodePoolForPost) { v.value = val v.isSet = true } func (v NullableKubernetesNodePoolForPost) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodePoolForPost) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodePoolForPost(val *KubernetesNodePoolForPost) *NullableKubernetesNodePoolForPost { return &NullableKubernetesNodePoolForPost{value: val, isSet: true} } func (v NullableKubernetesNodePoolForPost) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodePoolForPost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_pool_for_put.go000066400000000000000000000164431465267054300273570ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodePoolForPut struct for KubernetesNodePoolForPut type KubernetesNodePoolForPut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The object type. Type *string `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *KubernetesNodePoolPropertiesForPut `json:"properties"` } // NewKubernetesNodePoolForPut instantiates a new KubernetesNodePoolForPut object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodePoolForPut(properties KubernetesNodePoolPropertiesForPut) *KubernetesNodePoolForPut { this := KubernetesNodePoolForPut{} this.Properties = &properties return &this } // NewKubernetesNodePoolForPutWithDefaults instantiates a new KubernetesNodePoolForPut object // This 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 NewKubernetesNodePoolForPutWithDefaults() *KubernetesNodePoolForPut { this := KubernetesNodePoolForPut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolForPut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolForPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesNodePoolForPut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesNodePoolForPut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolForPut) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolForPut) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *KubernetesNodePoolForPut) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *KubernetesNodePoolForPut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolForPut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolForPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *KubernetesNodePoolForPut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *KubernetesNodePoolForPut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolForPut) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolForPut) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *KubernetesNodePoolForPut) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *KubernetesNodePoolForPut) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolForPut) GetProperties() *KubernetesNodePoolPropertiesForPut { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolForPut) GetPropertiesOk() (*KubernetesNodePoolPropertiesForPut, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *KubernetesNodePoolForPut) SetProperties(v KubernetesNodePoolPropertiesForPut) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *KubernetesNodePoolForPut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o KubernetesNodePoolForPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableKubernetesNodePoolForPut struct { value *KubernetesNodePoolForPut isSet bool } func (v NullableKubernetesNodePoolForPut) Get() *KubernetesNodePoolForPut { return v.value } func (v *NullableKubernetesNodePoolForPut) Set(val *KubernetesNodePoolForPut) { v.value = val v.isSet = true } func (v NullableKubernetesNodePoolForPut) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodePoolForPut) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodePoolForPut(val *KubernetesNodePoolForPut) *NullableKubernetesNodePoolForPut { return &NullableKubernetesNodePoolForPut{value: val, isSet: true} } func (v NullableKubernetesNodePoolForPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodePoolForPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_pool_lan.go000066400000000000000000000144071465267054300264510ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodePoolLan struct for KubernetesNodePoolLan type KubernetesNodePoolLan struct { // The datacenter ID, requires system privileges, for internal usage only DatacenterId *string `json:"datacenterId,omitempty"` // The LAN ID of an existing LAN at the related data center Id *int32 `json:"id"` // Specifies whether the Kubernetes node pool LAN reserves an IP with DHCP. Dhcp *bool `json:"dhcp,omitempty"` // The array of additional LANs attached to worker nodes. Routes *[]KubernetesNodePoolLanRoutes `json:"routes,omitempty"` } // NewKubernetesNodePoolLan instantiates a new KubernetesNodePoolLan object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodePoolLan(id int32) *KubernetesNodePoolLan { this := KubernetesNodePoolLan{} this.Id = &id return &this } // NewKubernetesNodePoolLanWithDefaults instantiates a new KubernetesNodePoolLan object // This 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 NewKubernetesNodePoolLanWithDefaults() *KubernetesNodePoolLan { this := KubernetesNodePoolLan{} return &this } // GetDatacenterId returns the DatacenterId field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolLan) GetDatacenterId() *string { if o == nil { return nil } return o.DatacenterId } // GetDatacenterIdOk returns a tuple with the DatacenterId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolLan) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } return o.DatacenterId, true } // SetDatacenterId sets field value func (o *KubernetesNodePoolLan) SetDatacenterId(v string) { o.DatacenterId = &v } // HasDatacenterId returns a boolean if a field has been set. func (o *KubernetesNodePoolLan) HasDatacenterId() bool { if o != nil && o.DatacenterId != nil { return true } return false } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolLan) GetId() *int32 { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolLan) GetIdOk() (*int32, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesNodePoolLan) SetId(v int32) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesNodePoolLan) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetDhcp returns the Dhcp field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolLan) GetDhcp() *bool { if o == nil { return nil } return o.Dhcp } // GetDhcpOk returns a tuple with the Dhcp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolLan) GetDhcpOk() (*bool, bool) { if o == nil { return nil, false } return o.Dhcp, true } // SetDhcp sets field value func (o *KubernetesNodePoolLan) SetDhcp(v bool) { o.Dhcp = &v } // HasDhcp returns a boolean if a field has been set. func (o *KubernetesNodePoolLan) HasDhcp() bool { if o != nil && o.Dhcp != nil { return true } return false } // GetRoutes returns the Routes field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolLan) GetRoutes() *[]KubernetesNodePoolLanRoutes { if o == nil { return nil } return o.Routes } // GetRoutesOk returns a tuple with the Routes field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolLan) GetRoutesOk() (*[]KubernetesNodePoolLanRoutes, bool) { if o == nil { return nil, false } return o.Routes, true } // SetRoutes sets field value func (o *KubernetesNodePoolLan) SetRoutes(v []KubernetesNodePoolLanRoutes) { o.Routes = &v } // HasRoutes returns a boolean if a field has been set. func (o *KubernetesNodePoolLan) HasRoutes() bool { if o != nil && o.Routes != nil { return true } return false } func (o KubernetesNodePoolLan) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.DatacenterId != nil { toSerialize["datacenterId"] = o.DatacenterId } if o.Id != nil { toSerialize["id"] = o.Id } if o.Dhcp != nil { toSerialize["dhcp"] = o.Dhcp } if o.Routes != nil { toSerialize["routes"] = o.Routes } return json.Marshal(toSerialize) } type NullableKubernetesNodePoolLan struct { value *KubernetesNodePoolLan isSet bool } func (v NullableKubernetesNodePoolLan) Get() *KubernetesNodePoolLan { return v.value } func (v *NullableKubernetesNodePoolLan) Set(val *KubernetesNodePoolLan) { v.value = val v.isSet = true } func (v NullableKubernetesNodePoolLan) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodePoolLan) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodePoolLan(val *KubernetesNodePoolLan) *NullableKubernetesNodePoolLan { return &NullableKubernetesNodePoolLan{value: val, isSet: true} } func (v NullableKubernetesNodePoolLan) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodePoolLan) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_pool_lan_routes.go000066400000000000000000000110401465267054300300400ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodePoolLanRoutes struct for KubernetesNodePoolLanRoutes type KubernetesNodePoolLanRoutes struct { // IPv4 or IPv6 CIDR to be routed via the interface. Network *string `json:"network,omitempty"` // IPv4 or IPv6 Gateway IP for the route. GatewayIp *string `json:"gatewayIp,omitempty"` } // NewKubernetesNodePoolLanRoutes instantiates a new KubernetesNodePoolLanRoutes object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodePoolLanRoutes() *KubernetesNodePoolLanRoutes { this := KubernetesNodePoolLanRoutes{} return &this } // NewKubernetesNodePoolLanRoutesWithDefaults instantiates a new KubernetesNodePoolLanRoutes object // This 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 NewKubernetesNodePoolLanRoutesWithDefaults() *KubernetesNodePoolLanRoutes { this := KubernetesNodePoolLanRoutes{} return &this } // GetNetwork returns the Network field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolLanRoutes) GetNetwork() *string { if o == nil { return nil } return o.Network } // GetNetworkOk returns a tuple with the Network field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolLanRoutes) GetNetworkOk() (*string, bool) { if o == nil { return nil, false } return o.Network, true } // SetNetwork sets field value func (o *KubernetesNodePoolLanRoutes) SetNetwork(v string) { o.Network = &v } // HasNetwork returns a boolean if a field has been set. func (o *KubernetesNodePoolLanRoutes) HasNetwork() bool { if o != nil && o.Network != nil { return true } return false } // GetGatewayIp returns the GatewayIp field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolLanRoutes) GetGatewayIp() *string { if o == nil { return nil } return o.GatewayIp } // GetGatewayIpOk returns a tuple with the GatewayIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolLanRoutes) GetGatewayIpOk() (*string, bool) { if o == nil { return nil, false } return o.GatewayIp, true } // SetGatewayIp sets field value func (o *KubernetesNodePoolLanRoutes) SetGatewayIp(v string) { o.GatewayIp = &v } // HasGatewayIp returns a boolean if a field has been set. func (o *KubernetesNodePoolLanRoutes) HasGatewayIp() bool { if o != nil && o.GatewayIp != nil { return true } return false } func (o KubernetesNodePoolLanRoutes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Network != nil { toSerialize["network"] = o.Network } if o.GatewayIp != nil { toSerialize["gatewayIp"] = o.GatewayIp } return json.Marshal(toSerialize) } type NullableKubernetesNodePoolLanRoutes struct { value *KubernetesNodePoolLanRoutes isSet bool } func (v NullableKubernetesNodePoolLanRoutes) Get() *KubernetesNodePoolLanRoutes { return v.value } func (v *NullableKubernetesNodePoolLanRoutes) Set(val *KubernetesNodePoolLanRoutes) { v.value = val v.isSet = true } func (v NullableKubernetesNodePoolLanRoutes) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodePoolLanRoutes) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodePoolLanRoutes(val *KubernetesNodePoolLanRoutes) *NullableKubernetesNodePoolLanRoutes { return &NullableKubernetesNodePoolLanRoutes{value: val, isSet: true} } func (v NullableKubernetesNodePoolLanRoutes) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodePoolLanRoutes) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_pool_properties.go000066400000000000000000000534371465267054300301010ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodePoolProperties struct for KubernetesNodePoolProperties type KubernetesNodePoolProperties struct { // A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Name *string `json:"name"` // The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. DatacenterId *string `json:"datacenterId"` // The number of worker nodes of the node pool. NodeCount *int32 `json:"nodeCount"` // The CPU type for the nodes. CpuFamily *string `json:"cpuFamily"` // The total number of cores for the nodes. CoresCount *int32 `json:"coresCount"` // The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. RamSize *int32 `json:"ramSize"` // The availability zone in which the target VM should be provisioned. AvailabilityZone *string `json:"availabilityZone"` // The storage type for the nodes. StorageType *string `json:"storageType"` // The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. StorageSize *int32 `json:"storageSize"` // The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. K8sVersion *string `json:"k8sVersion,omitempty"` MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` // The array of existing private LANs to attach to worker nodes. Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` // The labels attached to the node pool. Labels *map[string]string `json:"labels,omitempty"` // The annotations attached to the node pool. Annotations *map[string]string `json:"annotations,omitempty"` // Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. PublicIps *[]string `json:"publicIps,omitempty"` // The list of available versions for upgrading the node pool. AvailableUpgradeVersions *[]string `json:"availableUpgradeVersions,omitempty"` } // NewKubernetesNodePoolProperties instantiates a new KubernetesNodePoolProperties object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodePoolProperties(name string, datacenterId string, nodeCount int32, cpuFamily string, coresCount int32, ramSize int32, availabilityZone string, storageType string, storageSize int32) *KubernetesNodePoolProperties { this := KubernetesNodePoolProperties{} this.Name = &name this.DatacenterId = &datacenterId this.NodeCount = &nodeCount this.CpuFamily = &cpuFamily this.CoresCount = &coresCount this.RamSize = &ramSize this.AvailabilityZone = &availabilityZone this.StorageType = &storageType this.StorageSize = &storageSize return &this } // NewKubernetesNodePoolPropertiesWithDefaults instantiates a new KubernetesNodePoolProperties object // This 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 NewKubernetesNodePoolPropertiesWithDefaults() *KubernetesNodePoolProperties { this := KubernetesNodePoolProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *KubernetesNodePoolProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetDatacenterId returns the DatacenterId field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetDatacenterId() *string { if o == nil { return nil } return o.DatacenterId } // GetDatacenterIdOk returns a tuple with the DatacenterId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } return o.DatacenterId, true } // SetDatacenterId sets field value func (o *KubernetesNodePoolProperties) SetDatacenterId(v string) { o.DatacenterId = &v } // HasDatacenterId returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasDatacenterId() bool { if o != nil && o.DatacenterId != nil { return true } return false } // GetNodeCount returns the NodeCount field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetNodeCount() *int32 { if o == nil { return nil } return o.NodeCount } // GetNodeCountOk returns a tuple with the NodeCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetNodeCountOk() (*int32, bool) { if o == nil { return nil, false } return o.NodeCount, true } // SetNodeCount sets field value func (o *KubernetesNodePoolProperties) SetNodeCount(v int32) { o.NodeCount = &v } // HasNodeCount returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasNodeCount() bool { if o != nil && o.NodeCount != nil { return true } return false } // GetCpuFamily returns the CpuFamily field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetCpuFamily() *string { if o == nil { return nil } return o.CpuFamily } // GetCpuFamilyOk returns a tuple with the CpuFamily field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetCpuFamilyOk() (*string, bool) { if o == nil { return nil, false } return o.CpuFamily, true } // SetCpuFamily sets field value func (o *KubernetesNodePoolProperties) SetCpuFamily(v string) { o.CpuFamily = &v } // HasCpuFamily returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasCpuFamily() bool { if o != nil && o.CpuFamily != nil { return true } return false } // GetCoresCount returns the CoresCount field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetCoresCount() *int32 { if o == nil { return nil } return o.CoresCount } // GetCoresCountOk returns a tuple with the CoresCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetCoresCountOk() (*int32, bool) { if o == nil { return nil, false } return o.CoresCount, true } // SetCoresCount sets field value func (o *KubernetesNodePoolProperties) SetCoresCount(v int32) { o.CoresCount = &v } // HasCoresCount returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasCoresCount() bool { if o != nil && o.CoresCount != nil { return true } return false } // GetRamSize returns the RamSize field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetRamSize() *int32 { if o == nil { return nil } return o.RamSize } // GetRamSizeOk returns a tuple with the RamSize field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetRamSizeOk() (*int32, bool) { if o == nil { return nil, false } return o.RamSize, true } // SetRamSize sets field value func (o *KubernetesNodePoolProperties) SetRamSize(v int32) { o.RamSize = &v } // HasRamSize returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasRamSize() bool { if o != nil && o.RamSize != nil { return true } return false } // GetAvailabilityZone returns the AvailabilityZone field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetAvailabilityZone() *string { if o == nil { return nil } return o.AvailabilityZone } // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetAvailabilityZoneOk() (*string, bool) { if o == nil { return nil, false } return o.AvailabilityZone, true } // SetAvailabilityZone sets field value func (o *KubernetesNodePoolProperties) SetAvailabilityZone(v string) { o.AvailabilityZone = &v } // HasAvailabilityZone returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasAvailabilityZone() bool { if o != nil && o.AvailabilityZone != nil { return true } return false } // GetStorageType returns the StorageType field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetStorageType() *string { if o == nil { return nil } return o.StorageType } // GetStorageTypeOk returns a tuple with the StorageType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetStorageTypeOk() (*string, bool) { if o == nil { return nil, false } return o.StorageType, true } // SetStorageType sets field value func (o *KubernetesNodePoolProperties) SetStorageType(v string) { o.StorageType = &v } // HasStorageType returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasStorageType() bool { if o != nil && o.StorageType != nil { return true } return false } // GetStorageSize returns the StorageSize field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetStorageSize() *int32 { if o == nil { return nil } return o.StorageSize } // GetStorageSizeOk returns a tuple with the StorageSize field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetStorageSizeOk() (*int32, bool) { if o == nil { return nil, false } return o.StorageSize, true } // SetStorageSize sets field value func (o *KubernetesNodePoolProperties) SetStorageSize(v int32) { o.StorageSize = &v } // HasStorageSize returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasStorageSize() bool { if o != nil && o.StorageSize != nil { return true } return false } // GetK8sVersion returns the K8sVersion field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetK8sVersion() *string { if o == nil { return nil } return o.K8sVersion } // GetK8sVersionOk returns a tuple with the K8sVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } return o.K8sVersion, true } // SetK8sVersion sets field value func (o *KubernetesNodePoolProperties) SetK8sVersion(v string) { o.K8sVersion = &v } // HasK8sVersion returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasK8sVersion() bool { if o != nil && o.K8sVersion != nil { return true } return false } // GetMaintenanceWindow returns the MaintenanceWindow field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil } return o.MaintenanceWindow } // GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { if o == nil { return nil, false } return o.MaintenanceWindow, true } // SetMaintenanceWindow sets field value func (o *KubernetesNodePoolProperties) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { o.MaintenanceWindow = &v } // HasMaintenanceWindow returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasMaintenanceWindow() bool { if o != nil && o.MaintenanceWindow != nil { return true } return false } // GetAutoScaling returns the AutoScaling field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetAutoScaling() *KubernetesAutoScaling { if o == nil { return nil } return o.AutoScaling } // GetAutoScalingOk returns a tuple with the AutoScaling field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { if o == nil { return nil, false } return o.AutoScaling, true } // SetAutoScaling sets field value func (o *KubernetesNodePoolProperties) SetAutoScaling(v KubernetesAutoScaling) { o.AutoScaling = &v } // HasAutoScaling returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasAutoScaling() bool { if o != nil && o.AutoScaling != nil { return true } return false } // GetLans returns the Lans field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetLans() *[]KubernetesNodePoolLan { if o == nil { return nil } return o.Lans } // GetLansOk returns a tuple with the Lans field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetLansOk() (*[]KubernetesNodePoolLan, bool) { if o == nil { return nil, false } return o.Lans, true } // SetLans sets field value func (o *KubernetesNodePoolProperties) SetLans(v []KubernetesNodePoolLan) { o.Lans = &v } // HasLans returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasLans() bool { if o != nil && o.Lans != nil { return true } return false } // GetLabels returns the Labels field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetLabels() *map[string]string { if o == nil { return nil } return o.Labels } // GetLabelsOk returns a tuple with the Labels field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetLabelsOk() (*map[string]string, bool) { if o == nil { return nil, false } return o.Labels, true } // SetLabels sets field value func (o *KubernetesNodePoolProperties) SetLabels(v map[string]string) { o.Labels = &v } // HasLabels returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasLabels() bool { if o != nil && o.Labels != nil { return true } return false } // GetAnnotations returns the Annotations field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetAnnotations() *map[string]string { if o == nil { return nil } return o.Annotations } // GetAnnotationsOk returns a tuple with the Annotations field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetAnnotationsOk() (*map[string]string, bool) { if o == nil { return nil, false } return o.Annotations, true } // SetAnnotations sets field value func (o *KubernetesNodePoolProperties) SetAnnotations(v map[string]string) { o.Annotations = &v } // HasAnnotations returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasAnnotations() bool { if o != nil && o.Annotations != nil { return true } return false } // GetPublicIps returns the PublicIps field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetPublicIps() *[]string { if o == nil { return nil } return o.PublicIps } // GetPublicIpsOk returns a tuple with the PublicIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetPublicIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.PublicIps, true } // SetPublicIps sets field value func (o *KubernetesNodePoolProperties) SetPublicIps(v []string) { o.PublicIps = &v } // HasPublicIps returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasPublicIps() bool { if o != nil && o.PublicIps != nil { return true } return false } // GetAvailableUpgradeVersions returns the AvailableUpgradeVersions field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolProperties) GetAvailableUpgradeVersions() *[]string { if o == nil { return nil } return o.AvailableUpgradeVersions } // GetAvailableUpgradeVersionsOk returns a tuple with the AvailableUpgradeVersions field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolProperties) GetAvailableUpgradeVersionsOk() (*[]string, bool) { if o == nil { return nil, false } return o.AvailableUpgradeVersions, true } // SetAvailableUpgradeVersions sets field value func (o *KubernetesNodePoolProperties) SetAvailableUpgradeVersions(v []string) { o.AvailableUpgradeVersions = &v } // HasAvailableUpgradeVersions returns a boolean if a field has been set. func (o *KubernetesNodePoolProperties) HasAvailableUpgradeVersions() bool { if o != nil && o.AvailableUpgradeVersions != nil { return true } return false } func (o KubernetesNodePoolProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.DatacenterId != nil { toSerialize["datacenterId"] = o.DatacenterId } if o.NodeCount != nil { toSerialize["nodeCount"] = o.NodeCount } if o.CpuFamily != nil { toSerialize["cpuFamily"] = o.CpuFamily } if o.CoresCount != nil { toSerialize["coresCount"] = o.CoresCount } if o.RamSize != nil { toSerialize["ramSize"] = o.RamSize } if o.AvailabilityZone != nil { toSerialize["availabilityZone"] = o.AvailabilityZone } if o.StorageType != nil { toSerialize["storageType"] = o.StorageType } if o.StorageSize != nil { toSerialize["storageSize"] = o.StorageSize } if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } if o.MaintenanceWindow != nil { toSerialize["maintenanceWindow"] = o.MaintenanceWindow } if o.AutoScaling != nil { toSerialize["autoScaling"] = o.AutoScaling } if o.Lans != nil { toSerialize["lans"] = o.Lans } if o.Labels != nil { toSerialize["labels"] = o.Labels } if o.Annotations != nil { toSerialize["annotations"] = o.Annotations } if o.PublicIps != nil { toSerialize["publicIps"] = o.PublicIps } if o.AvailableUpgradeVersions != nil { toSerialize["availableUpgradeVersions"] = o.AvailableUpgradeVersions } return json.Marshal(toSerialize) } type NullableKubernetesNodePoolProperties struct { value *KubernetesNodePoolProperties isSet bool } func (v NullableKubernetesNodePoolProperties) Get() *KubernetesNodePoolProperties { return v.value } func (v *NullableKubernetesNodePoolProperties) Set(val *KubernetesNodePoolProperties) { v.value = val v.isSet = true } func (v NullableKubernetesNodePoolProperties) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodePoolProperties) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodePoolProperties(val *KubernetesNodePoolProperties) *NullableKubernetesNodePoolProperties { return &NullableKubernetesNodePoolProperties{value: val, isSet: true} } func (v NullableKubernetesNodePoolProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodePoolProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_pool_properties_for_post.go000066400000000000000000000521521465267054300320050ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodePoolPropertiesForPost struct for KubernetesNodePoolPropertiesForPost type KubernetesNodePoolPropertiesForPost struct { // A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Name *string `json:"name"` // The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located. DatacenterId *string `json:"datacenterId"` // The number of worker nodes of the node pool. NodeCount *int32 `json:"nodeCount"` // The CPU type for the nodes. CpuFamily *string `json:"cpuFamily"` // The total number of cores for the nodes. CoresCount *int32 `json:"coresCount"` // The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB. RamSize *int32 `json:"ramSize"` // The availability zone in which the target VM should be provisioned. AvailabilityZone *string `json:"availabilityZone"` // The storage type for the nodes. StorageType *string `json:"storageType"` // The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD. StorageSize *int32 `json:"storageSize"` // The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. K8sVersion *string `json:"k8sVersion,omitempty"` MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` // The array of existing private LANs to attach to worker nodes. Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` // The labels attached to the node pool. Labels *map[string]string `json:"labels,omitempty"` // The annotations attached to the node pool. Annotations *map[string]string `json:"annotations,omitempty"` // Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. PublicIps *[]string `json:"publicIps,omitempty"` } // NewKubernetesNodePoolPropertiesForPost instantiates a new KubernetesNodePoolPropertiesForPost object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodePoolPropertiesForPost(name string, datacenterId string, nodeCount int32, cpuFamily string, coresCount int32, ramSize int32, availabilityZone string, storageType string, storageSize int32) *KubernetesNodePoolPropertiesForPost { this := KubernetesNodePoolPropertiesForPost{} this.Name = &name this.DatacenterId = &datacenterId this.NodeCount = &nodeCount this.CpuFamily = &cpuFamily this.CoresCount = &coresCount this.RamSize = &ramSize this.AvailabilityZone = &availabilityZone this.StorageType = &storageType this.StorageSize = &storageSize return &this } // NewKubernetesNodePoolPropertiesForPostWithDefaults instantiates a new KubernetesNodePoolPropertiesForPost object // This 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 NewKubernetesNodePoolPropertiesForPostWithDefaults() *KubernetesNodePoolPropertiesForPost { this := KubernetesNodePoolPropertiesForPost{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *KubernetesNodePoolPropertiesForPost) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetDatacenterId returns the DatacenterId field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetDatacenterId() *string { if o == nil { return nil } return o.DatacenterId } // GetDatacenterIdOk returns a tuple with the DatacenterId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } return o.DatacenterId, true } // SetDatacenterId sets field value func (o *KubernetesNodePoolPropertiesForPost) SetDatacenterId(v string) { o.DatacenterId = &v } // HasDatacenterId returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasDatacenterId() bool { if o != nil && o.DatacenterId != nil { return true } return false } // GetNodeCount returns the NodeCount field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetNodeCount() *int32 { if o == nil { return nil } return o.NodeCount } // GetNodeCountOk returns a tuple with the NodeCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetNodeCountOk() (*int32, bool) { if o == nil { return nil, false } return o.NodeCount, true } // SetNodeCount sets field value func (o *KubernetesNodePoolPropertiesForPost) SetNodeCount(v int32) { o.NodeCount = &v } // HasNodeCount returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasNodeCount() bool { if o != nil && o.NodeCount != nil { return true } return false } // GetCpuFamily returns the CpuFamily field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetCpuFamily() *string { if o == nil { return nil } return o.CpuFamily } // GetCpuFamilyOk returns a tuple with the CpuFamily field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetCpuFamilyOk() (*string, bool) { if o == nil { return nil, false } return o.CpuFamily, true } // SetCpuFamily sets field value func (o *KubernetesNodePoolPropertiesForPost) SetCpuFamily(v string) { o.CpuFamily = &v } // HasCpuFamily returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasCpuFamily() bool { if o != nil && o.CpuFamily != nil { return true } return false } // GetCoresCount returns the CoresCount field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetCoresCount() *int32 { if o == nil { return nil } return o.CoresCount } // GetCoresCountOk returns a tuple with the CoresCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetCoresCountOk() (*int32, bool) { if o == nil { return nil, false } return o.CoresCount, true } // SetCoresCount sets field value func (o *KubernetesNodePoolPropertiesForPost) SetCoresCount(v int32) { o.CoresCount = &v } // HasCoresCount returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasCoresCount() bool { if o != nil && o.CoresCount != nil { return true } return false } // GetRamSize returns the RamSize field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetRamSize() *int32 { if o == nil { return nil } return o.RamSize } // GetRamSizeOk returns a tuple with the RamSize field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetRamSizeOk() (*int32, bool) { if o == nil { return nil, false } return o.RamSize, true } // SetRamSize sets field value func (o *KubernetesNodePoolPropertiesForPost) SetRamSize(v int32) { o.RamSize = &v } // HasRamSize returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasRamSize() bool { if o != nil && o.RamSize != nil { return true } return false } // GetAvailabilityZone returns the AvailabilityZone field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetAvailabilityZone() *string { if o == nil { return nil } return o.AvailabilityZone } // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetAvailabilityZoneOk() (*string, bool) { if o == nil { return nil, false } return o.AvailabilityZone, true } // SetAvailabilityZone sets field value func (o *KubernetesNodePoolPropertiesForPost) SetAvailabilityZone(v string) { o.AvailabilityZone = &v } // HasAvailabilityZone returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasAvailabilityZone() bool { if o != nil && o.AvailabilityZone != nil { return true } return false } // GetStorageType returns the StorageType field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetStorageType() *string { if o == nil { return nil } return o.StorageType } // GetStorageTypeOk returns a tuple with the StorageType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetStorageTypeOk() (*string, bool) { if o == nil { return nil, false } return o.StorageType, true } // SetStorageType sets field value func (o *KubernetesNodePoolPropertiesForPost) SetStorageType(v string) { o.StorageType = &v } // HasStorageType returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasStorageType() bool { if o != nil && o.StorageType != nil { return true } return false } // GetStorageSize returns the StorageSize field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetStorageSize() *int32 { if o == nil { return nil } return o.StorageSize } // GetStorageSizeOk returns a tuple with the StorageSize field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetStorageSizeOk() (*int32, bool) { if o == nil { return nil, false } return o.StorageSize, true } // SetStorageSize sets field value func (o *KubernetesNodePoolPropertiesForPost) SetStorageSize(v int32) { o.StorageSize = &v } // HasStorageSize returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasStorageSize() bool { if o != nil && o.StorageSize != nil { return true } return false } // GetK8sVersion returns the K8sVersion field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetK8sVersion() *string { if o == nil { return nil } return o.K8sVersion } // GetK8sVersionOk returns a tuple with the K8sVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } return o.K8sVersion, true } // SetK8sVersion sets field value func (o *KubernetesNodePoolPropertiesForPost) SetK8sVersion(v string) { o.K8sVersion = &v } // HasK8sVersion returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasK8sVersion() bool { if o != nil && o.K8sVersion != nil { return true } return false } // GetMaintenanceWindow returns the MaintenanceWindow field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil } return o.MaintenanceWindow } // GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { if o == nil { return nil, false } return o.MaintenanceWindow, true } // SetMaintenanceWindow sets field value func (o *KubernetesNodePoolPropertiesForPost) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { o.MaintenanceWindow = &v } // HasMaintenanceWindow returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasMaintenanceWindow() bool { if o != nil && o.MaintenanceWindow != nil { return true } return false } // GetAutoScaling returns the AutoScaling field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetAutoScaling() *KubernetesAutoScaling { if o == nil { return nil } return o.AutoScaling } // GetAutoScalingOk returns a tuple with the AutoScaling field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { if o == nil { return nil, false } return o.AutoScaling, true } // SetAutoScaling sets field value func (o *KubernetesNodePoolPropertiesForPost) SetAutoScaling(v KubernetesAutoScaling) { o.AutoScaling = &v } // HasAutoScaling returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasAutoScaling() bool { if o != nil && o.AutoScaling != nil { return true } return false } // GetLans returns the Lans field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetLans() *[]KubernetesNodePoolLan { if o == nil { return nil } return o.Lans } // GetLansOk returns a tuple with the Lans field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetLansOk() (*[]KubernetesNodePoolLan, bool) { if o == nil { return nil, false } return o.Lans, true } // SetLans sets field value func (o *KubernetesNodePoolPropertiesForPost) SetLans(v []KubernetesNodePoolLan) { o.Lans = &v } // HasLans returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasLans() bool { if o != nil && o.Lans != nil { return true } return false } // GetLabels returns the Labels field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetLabels() *map[string]string { if o == nil { return nil } return o.Labels } // GetLabelsOk returns a tuple with the Labels field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetLabelsOk() (*map[string]string, bool) { if o == nil { return nil, false } return o.Labels, true } // SetLabels sets field value func (o *KubernetesNodePoolPropertiesForPost) SetLabels(v map[string]string) { o.Labels = &v } // HasLabels returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasLabels() bool { if o != nil && o.Labels != nil { return true } return false } // GetAnnotations returns the Annotations field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetAnnotations() *map[string]string { if o == nil { return nil } return o.Annotations } // GetAnnotationsOk returns a tuple with the Annotations field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetAnnotationsOk() (*map[string]string, bool) { if o == nil { return nil, false } return o.Annotations, true } // SetAnnotations sets field value func (o *KubernetesNodePoolPropertiesForPost) SetAnnotations(v map[string]string) { o.Annotations = &v } // HasAnnotations returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasAnnotations() bool { if o != nil && o.Annotations != nil { return true } return false } // GetPublicIps returns the PublicIps field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPost) GetPublicIps() *[]string { if o == nil { return nil } return o.PublicIps } // GetPublicIpsOk returns a tuple with the PublicIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPost) GetPublicIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.PublicIps, true } // SetPublicIps sets field value func (o *KubernetesNodePoolPropertiesForPost) SetPublicIps(v []string) { o.PublicIps = &v } // HasPublicIps returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPost) HasPublicIps() bool { if o != nil && o.PublicIps != nil { return true } return false } func (o KubernetesNodePoolPropertiesForPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.DatacenterId != nil { toSerialize["datacenterId"] = o.DatacenterId } if o.NodeCount != nil { toSerialize["nodeCount"] = o.NodeCount } if o.CpuFamily != nil { toSerialize["cpuFamily"] = o.CpuFamily } if o.CoresCount != nil { toSerialize["coresCount"] = o.CoresCount } if o.RamSize != nil { toSerialize["ramSize"] = o.RamSize } if o.AvailabilityZone != nil { toSerialize["availabilityZone"] = o.AvailabilityZone } if o.StorageType != nil { toSerialize["storageType"] = o.StorageType } if o.StorageSize != nil { toSerialize["storageSize"] = o.StorageSize } if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } if o.MaintenanceWindow != nil { toSerialize["maintenanceWindow"] = o.MaintenanceWindow } if o.AutoScaling != nil { toSerialize["autoScaling"] = o.AutoScaling } if o.Lans != nil { toSerialize["lans"] = o.Lans } if o.Labels != nil { toSerialize["labels"] = o.Labels } if o.Annotations != nil { toSerialize["annotations"] = o.Annotations } if o.PublicIps != nil { toSerialize["publicIps"] = o.PublicIps } return json.Marshal(toSerialize) } type NullableKubernetesNodePoolPropertiesForPost struct { value *KubernetesNodePoolPropertiesForPost isSet bool } func (v NullableKubernetesNodePoolPropertiesForPost) Get() *KubernetesNodePoolPropertiesForPost { return v.value } func (v *NullableKubernetesNodePoolPropertiesForPost) Set(val *KubernetesNodePoolPropertiesForPost) { v.value = val v.isSet = true } func (v NullableKubernetesNodePoolPropertiesForPost) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodePoolPropertiesForPost) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodePoolPropertiesForPost(val *KubernetesNodePoolPropertiesForPost) *NullableKubernetesNodePoolPropertiesForPost { return &NullableKubernetesNodePoolPropertiesForPost{value: val, isSet: true} } func (v NullableKubernetesNodePoolPropertiesForPost) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodePoolPropertiesForPost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_pool_properties_for_put.go000066400000000000000000000317601465267054300316320ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodePoolPropertiesForPut struct for KubernetesNodePoolPropertiesForPut type KubernetesNodePoolPropertiesForPut struct { // A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. Name *string `json:"name,omitempty"` // The number of worker nodes of the node pool. NodeCount *int32 `json:"nodeCount"` // The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. K8sVersion *string `json:"k8sVersion,omitempty"` MaintenanceWindow *KubernetesMaintenanceWindow `json:"maintenanceWindow,omitempty"` AutoScaling *KubernetesAutoScaling `json:"autoScaling,omitempty"` // The array of existing private LANs to attach to worker nodes. Lans *[]KubernetesNodePoolLan `json:"lans,omitempty"` // The labels attached to the node pool. Labels *map[string]string `json:"labels,omitempty"` // The annotations attached to the node pool. Annotations *map[string]string `json:"annotations,omitempty"` // Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt. PublicIps *[]string `json:"publicIps,omitempty"` } // NewKubernetesNodePoolPropertiesForPut instantiates a new KubernetesNodePoolPropertiesForPut object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodePoolPropertiesForPut(nodeCount int32) *KubernetesNodePoolPropertiesForPut { this := KubernetesNodePoolPropertiesForPut{} this.NodeCount = &nodeCount return &this } // NewKubernetesNodePoolPropertiesForPutWithDefaults instantiates a new KubernetesNodePoolPropertiesForPut object // This 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 NewKubernetesNodePoolPropertiesForPutWithDefaults() *KubernetesNodePoolPropertiesForPut { this := KubernetesNodePoolPropertiesForPut{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPut) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *KubernetesNodePoolPropertiesForPut) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPut) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetNodeCount returns the NodeCount field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetNodeCount() *int32 { if o == nil { return nil } return o.NodeCount } // GetNodeCountOk returns a tuple with the NodeCount field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPut) GetNodeCountOk() (*int32, bool) { if o == nil { return nil, false } return o.NodeCount, true } // SetNodeCount sets field value func (o *KubernetesNodePoolPropertiesForPut) SetNodeCount(v int32) { o.NodeCount = &v } // HasNodeCount returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPut) HasNodeCount() bool { if o != nil && o.NodeCount != nil { return true } return false } // GetK8sVersion returns the K8sVersion field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetK8sVersion() *string { if o == nil { return nil } return o.K8sVersion } // GetK8sVersionOk returns a tuple with the K8sVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPut) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } return o.K8sVersion, true } // SetK8sVersion sets field value func (o *KubernetesNodePoolPropertiesForPut) SetK8sVersion(v string) { o.K8sVersion = &v } // HasK8sVersion returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPut) HasK8sVersion() bool { if o != nil && o.K8sVersion != nil { return true } return false } // GetMaintenanceWindow returns the MaintenanceWindow field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetMaintenanceWindow() *KubernetesMaintenanceWindow { if o == nil { return nil } return o.MaintenanceWindow } // GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPut) GetMaintenanceWindowOk() (*KubernetesMaintenanceWindow, bool) { if o == nil { return nil, false } return o.MaintenanceWindow, true } // SetMaintenanceWindow sets field value func (o *KubernetesNodePoolPropertiesForPut) SetMaintenanceWindow(v KubernetesMaintenanceWindow) { o.MaintenanceWindow = &v } // HasMaintenanceWindow returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPut) HasMaintenanceWindow() bool { if o != nil && o.MaintenanceWindow != nil { return true } return false } // GetAutoScaling returns the AutoScaling field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetAutoScaling() *KubernetesAutoScaling { if o == nil { return nil } return o.AutoScaling } // GetAutoScalingOk returns a tuple with the AutoScaling field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPut) GetAutoScalingOk() (*KubernetesAutoScaling, bool) { if o == nil { return nil, false } return o.AutoScaling, true } // SetAutoScaling sets field value func (o *KubernetesNodePoolPropertiesForPut) SetAutoScaling(v KubernetesAutoScaling) { o.AutoScaling = &v } // HasAutoScaling returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPut) HasAutoScaling() bool { if o != nil && o.AutoScaling != nil { return true } return false } // GetLans returns the Lans field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetLans() *[]KubernetesNodePoolLan { if o == nil { return nil } return o.Lans } // GetLansOk returns a tuple with the Lans field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPut) GetLansOk() (*[]KubernetesNodePoolLan, bool) { if o == nil { return nil, false } return o.Lans, true } // SetLans sets field value func (o *KubernetesNodePoolPropertiesForPut) SetLans(v []KubernetesNodePoolLan) { o.Lans = &v } // HasLans returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPut) HasLans() bool { if o != nil && o.Lans != nil { return true } return false } // GetLabels returns the Labels field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetLabels() *map[string]string { if o == nil { return nil } return o.Labels } // GetLabelsOk returns a tuple with the Labels field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPut) GetLabelsOk() (*map[string]string, bool) { if o == nil { return nil, false } return o.Labels, true } // SetLabels sets field value func (o *KubernetesNodePoolPropertiesForPut) SetLabels(v map[string]string) { o.Labels = &v } // HasLabels returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPut) HasLabels() bool { if o != nil && o.Labels != nil { return true } return false } // GetAnnotations returns the Annotations field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetAnnotations() *map[string]string { if o == nil { return nil } return o.Annotations } // GetAnnotationsOk returns a tuple with the Annotations field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPut) GetAnnotationsOk() (*map[string]string, bool) { if o == nil { return nil, false } return o.Annotations, true } // SetAnnotations sets field value func (o *KubernetesNodePoolPropertiesForPut) SetAnnotations(v map[string]string) { o.Annotations = &v } // HasAnnotations returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPut) HasAnnotations() bool { if o != nil && o.Annotations != nil { return true } return false } // GetPublicIps returns the PublicIps field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePoolPropertiesForPut) GetPublicIps() *[]string { if o == nil { return nil } return o.PublicIps } // GetPublicIpsOk returns a tuple with the PublicIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePoolPropertiesForPut) GetPublicIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.PublicIps, true } // SetPublicIps sets field value func (o *KubernetesNodePoolPropertiesForPut) SetPublicIps(v []string) { o.PublicIps = &v } // HasPublicIps returns a boolean if a field has been set. func (o *KubernetesNodePoolPropertiesForPut) HasPublicIps() bool { if o != nil && o.PublicIps != nil { return true } return false } func (o KubernetesNodePoolPropertiesForPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.NodeCount != nil { toSerialize["nodeCount"] = o.NodeCount } if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } if o.MaintenanceWindow != nil { toSerialize["maintenanceWindow"] = o.MaintenanceWindow } if o.AutoScaling != nil { toSerialize["autoScaling"] = o.AutoScaling } if o.Lans != nil { toSerialize["lans"] = o.Lans } if o.Labels != nil { toSerialize["labels"] = o.Labels } if o.Annotations != nil { toSerialize["annotations"] = o.Annotations } if o.PublicIps != nil { toSerialize["publicIps"] = o.PublicIps } return json.Marshal(toSerialize) } type NullableKubernetesNodePoolPropertiesForPut struct { value *KubernetesNodePoolPropertiesForPut isSet bool } func (v NullableKubernetesNodePoolPropertiesForPut) Get() *KubernetesNodePoolPropertiesForPut { return v.value } func (v *NullableKubernetesNodePoolPropertiesForPut) Set(val *KubernetesNodePoolPropertiesForPut) { v.value = val v.isSet = true } func (v NullableKubernetesNodePoolPropertiesForPut) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodePoolPropertiesForPut) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodePoolPropertiesForPut(val *KubernetesNodePoolPropertiesForPut) *NullableKubernetesNodePoolPropertiesForPut { return &NullableKubernetesNodePoolPropertiesForPut{value: val, isSet: true} } func (v NullableKubernetesNodePoolPropertiesForPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodePoolPropertiesForPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_pools.go000066400000000000000000000136571465267054300260100ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodePools struct for KubernetesNodePools type KubernetesNodePools struct { // A unique representation of the Kubernetes node pool as a resource collection. Id *string `json:"id,omitempty"` // The resource type within a collection. Type *string `json:"type,omitempty"` // The URL to the collection representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]KubernetesNodePool `json:"items,omitempty"` } // NewKubernetesNodePools instantiates a new KubernetesNodePools object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodePools() *KubernetesNodePools { this := KubernetesNodePools{} return &this } // NewKubernetesNodePoolsWithDefaults instantiates a new KubernetesNodePools object // This 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 NewKubernetesNodePoolsWithDefaults() *KubernetesNodePools { this := KubernetesNodePools{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePools) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePools) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesNodePools) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesNodePools) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePools) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePools) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *KubernetesNodePools) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *KubernetesNodePools) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePools) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePools) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *KubernetesNodePools) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *KubernetesNodePools) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *KubernetesNodePools) GetItems() *[]KubernetesNodePool { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodePools) GetItemsOk() (*[]KubernetesNodePool, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *KubernetesNodePools) SetItems(v []KubernetesNodePool) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *KubernetesNodePools) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o KubernetesNodePools) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableKubernetesNodePools struct { value *KubernetesNodePools isSet bool } func (v NullableKubernetesNodePools) Get() *KubernetesNodePools { return v.value } func (v *NullableKubernetesNodePools) Set(val *KubernetesNodePools) { v.value = val v.isSet = true } func (v NullableKubernetesNodePools) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodePools) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodePools(val *KubernetesNodePools) *NullableKubernetesNodePools { return &NullableKubernetesNodePools{value: val, isSet: true} } func (v NullableKubernetesNodePools) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodePools) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_node_properties.go000066400000000000000000000151151465267054300270370ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodeProperties struct for KubernetesNodeProperties type KubernetesNodeProperties struct { // The Kubernetes node name. Name *string `json:"name"` // The public IP associated with the node. PublicIP *string `json:"publicIP,omitempty"` // The private IP associated with the node. PrivateIP *string `json:"privateIP,omitempty"` // The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions. K8sVersion *string `json:"k8sVersion"` } // NewKubernetesNodeProperties instantiates a new KubernetesNodeProperties object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodeProperties(name string, k8sVersion string) *KubernetesNodeProperties { this := KubernetesNodeProperties{} this.Name = &name this.K8sVersion = &k8sVersion return &this } // NewKubernetesNodePropertiesWithDefaults instantiates a new KubernetesNodeProperties object // This 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 NewKubernetesNodePropertiesWithDefaults() *KubernetesNodeProperties { this := KubernetesNodeProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *KubernetesNodeProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodeProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *KubernetesNodeProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *KubernetesNodeProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetPublicIP returns the PublicIP field value // If the value is explicit nil, nil is returned func (o *KubernetesNodeProperties) GetPublicIP() *string { if o == nil { return nil } return o.PublicIP } // GetPublicIPOk returns a tuple with the PublicIP field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodeProperties) GetPublicIPOk() (*string, bool) { if o == nil { return nil, false } return o.PublicIP, true } // SetPublicIP sets field value func (o *KubernetesNodeProperties) SetPublicIP(v string) { o.PublicIP = &v } // HasPublicIP returns a boolean if a field has been set. func (o *KubernetesNodeProperties) HasPublicIP() bool { if o != nil && o.PublicIP != nil { return true } return false } // GetPrivateIP returns the PrivateIP field value // If the value is explicit nil, nil is returned func (o *KubernetesNodeProperties) GetPrivateIP() *string { if o == nil { return nil } return o.PrivateIP } // GetPrivateIPOk returns a tuple with the PrivateIP field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodeProperties) GetPrivateIPOk() (*string, bool) { if o == nil { return nil, false } return o.PrivateIP, true } // SetPrivateIP sets field value func (o *KubernetesNodeProperties) SetPrivateIP(v string) { o.PrivateIP = &v } // HasPrivateIP returns a boolean if a field has been set. func (o *KubernetesNodeProperties) HasPrivateIP() bool { if o != nil && o.PrivateIP != nil { return true } return false } // GetK8sVersion returns the K8sVersion field value // If the value is explicit nil, nil is returned func (o *KubernetesNodeProperties) GetK8sVersion() *string { if o == nil { return nil } return o.K8sVersion } // GetK8sVersionOk returns a tuple with the K8sVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodeProperties) GetK8sVersionOk() (*string, bool) { if o == nil { return nil, false } return o.K8sVersion, true } // SetK8sVersion sets field value func (o *KubernetesNodeProperties) SetK8sVersion(v string) { o.K8sVersion = &v } // HasK8sVersion returns a boolean if a field has been set. func (o *KubernetesNodeProperties) HasK8sVersion() bool { if o != nil && o.K8sVersion != nil { return true } return false } func (o KubernetesNodeProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.PublicIP != nil { toSerialize["publicIP"] = o.PublicIP } if o.PrivateIP != nil { toSerialize["privateIP"] = o.PrivateIP } if o.K8sVersion != nil { toSerialize["k8sVersion"] = o.K8sVersion } return json.Marshal(toSerialize) } type NullableKubernetesNodeProperties struct { value *KubernetesNodeProperties isSet bool } func (v NullableKubernetesNodeProperties) Get() *KubernetesNodeProperties { return v.value } func (v *NullableKubernetesNodeProperties) Set(val *KubernetesNodeProperties) { v.value = val v.isSet = true } func (v NullableKubernetesNodeProperties) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodeProperties) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodeProperties(val *KubernetesNodeProperties) *NullableKubernetesNodeProperties { return &NullableKubernetesNodeProperties{value: val, isSet: true} } func (v NullableKubernetesNodeProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodeProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_kubernetes_nodes.go000066400000000000000000000133571465267054300247540ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // KubernetesNodes struct for KubernetesNodes type KubernetesNodes struct { // A unique representation of the Kubernetes node pool as a resource collection. Id *string `json:"id,omitempty"` // The resource type within a collection. Type *string `json:"type,omitempty"` // The URL to the collection representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]KubernetesNode `json:"items,omitempty"` } // NewKubernetesNodes instantiates a new KubernetesNodes object // This constructor will assign default values to properties that have it defined, // 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 NewKubernetesNodes() *KubernetesNodes { this := KubernetesNodes{} return &this } // NewKubernetesNodesWithDefaults instantiates a new KubernetesNodes object // This 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 NewKubernetesNodesWithDefaults() *KubernetesNodes { this := KubernetesNodes{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *KubernetesNodes) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodes) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *KubernetesNodes) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *KubernetesNodes) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *KubernetesNodes) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodes) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *KubernetesNodes) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *KubernetesNodes) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *KubernetesNodes) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodes) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *KubernetesNodes) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *KubernetesNodes) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *KubernetesNodes) GetItems() *[]KubernetesNode { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *KubernetesNodes) GetItemsOk() (*[]KubernetesNode, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *KubernetesNodes) SetItems(v []KubernetesNode) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *KubernetesNodes) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o KubernetesNodes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableKubernetesNodes struct { value *KubernetesNodes isSet bool } func (v NullableKubernetesNodes) Get() *KubernetesNodes { return v.value } func (v *NullableKubernetesNodes) Set(val *KubernetesNodes) { v.value = val v.isSet = true } func (v NullableKubernetesNodes) IsSet() bool { return v.isSet } func (v *NullableKubernetesNodes) Unset() { v.value = nil v.isSet = false } func NewNullableKubernetesNodes(val *KubernetesNodes) *NullableKubernetesNodes { return &NullableKubernetesNodes{value: val, isSet: true} } func (v NullableKubernetesNodes) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableKubernetesNodes) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_label.go000066400000000000000000000144131465267054300224660ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Label struct for Label type Label struct { // Label is identified using standard URN. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *string `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *NoStateMetaData `json:"metadata,omitempty"` Properties *LabelProperties `json:"properties"` } // NewLabel instantiates a new Label object // This constructor will assign default values to properties that have it defined, // 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 NewLabel(properties LabelProperties) *Label { this := Label{} this.Properties = &properties return &this } // NewLabelWithDefaults instantiates a new Label object // This 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 NewLabelWithDefaults() *Label { this := Label{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Label) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Label) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Label) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Label) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Label) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Label) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Label) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Label) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Label) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Label) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Label) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Label) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Label) GetMetadata() *NoStateMetaData { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Label) GetMetadataOk() (*NoStateMetaData, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Label) SetMetadata(v NoStateMetaData) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Label) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Label) GetProperties() *LabelProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Label) GetPropertiesOk() (*LabelProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Label) SetProperties(v LabelProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Label) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o Label) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableLabel struct { value *Label isSet bool } func (v NullableLabel) Get() *Label { return v.value } func (v *NullableLabel) Set(val *Label) { v.value = val v.isSet = true } func (v NullableLabel) IsSet() bool { return v.isSet } func (v *NullableLabel) Unset() { v.value = nil v.isSet = false } func NewNullableLabel(val *Label) *NullableLabel { return &NullableLabel{value: val, isSet: true} } func (v NullableLabel) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLabel) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_label_properties.go000066400000000000000000000156351465267054300247510ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // LabelProperties struct for LabelProperties type LabelProperties struct { // A label key Key *string `json:"key,omitempty"` // A label value Value *string `json:"value,omitempty"` // The ID of the resource. ResourceId *string `json:"resourceId,omitempty"` // The type of the resource on which the label is applied. ResourceType *string `json:"resourceType,omitempty"` // URL to the Resource (absolute path) on which the label is applied. ResourceHref *string `json:"resourceHref,omitempty"` } // NewLabelProperties instantiates a new LabelProperties object // This constructor will assign default values to properties that have it defined, // 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 NewLabelProperties() *LabelProperties { this := LabelProperties{} return &this } // NewLabelPropertiesWithDefaults instantiates a new LabelProperties object // This 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 NewLabelPropertiesWithDefaults() *LabelProperties { this := LabelProperties{} return &this } // GetKey returns the Key field value // If the value is explicit nil, nil is returned func (o *LabelProperties) GetKey() *string { if o == nil { return nil } return o.Key } // GetKeyOk returns a tuple with the Key field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelProperties) GetKeyOk() (*string, bool) { if o == nil { return nil, false } return o.Key, true } // SetKey sets field value func (o *LabelProperties) SetKey(v string) { o.Key = &v } // HasKey returns a boolean if a field has been set. func (o *LabelProperties) HasKey() bool { if o != nil && o.Key != nil { return true } return false } // GetValue returns the Value field value // If the value is explicit nil, nil is returned func (o *LabelProperties) GetValue() *string { if o == nil { return nil } return o.Value } // GetValueOk returns a tuple with the Value field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelProperties) GetValueOk() (*string, bool) { if o == nil { return nil, false } return o.Value, true } // SetValue sets field value func (o *LabelProperties) SetValue(v string) { o.Value = &v } // HasValue returns a boolean if a field has been set. func (o *LabelProperties) HasValue() bool { if o != nil && o.Value != nil { return true } return false } // GetResourceId returns the ResourceId field value // If the value is explicit nil, nil is returned func (o *LabelProperties) GetResourceId() *string { if o == nil { return nil } return o.ResourceId } // GetResourceIdOk returns a tuple with the ResourceId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelProperties) GetResourceIdOk() (*string, bool) { if o == nil { return nil, false } return o.ResourceId, true } // SetResourceId sets field value func (o *LabelProperties) SetResourceId(v string) { o.ResourceId = &v } // HasResourceId returns a boolean if a field has been set. func (o *LabelProperties) HasResourceId() bool { if o != nil && o.ResourceId != nil { return true } return false } // GetResourceType returns the ResourceType field value // If the value is explicit nil, nil is returned func (o *LabelProperties) GetResourceType() *string { if o == nil { return nil } return o.ResourceType } // GetResourceTypeOk returns a tuple with the ResourceType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelProperties) GetResourceTypeOk() (*string, bool) { if o == nil { return nil, false } return o.ResourceType, true } // SetResourceType sets field value func (o *LabelProperties) SetResourceType(v string) { o.ResourceType = &v } // HasResourceType returns a boolean if a field has been set. func (o *LabelProperties) HasResourceType() bool { if o != nil && o.ResourceType != nil { return true } return false } // GetResourceHref returns the ResourceHref field value // If the value is explicit nil, nil is returned func (o *LabelProperties) GetResourceHref() *string { if o == nil { return nil } return o.ResourceHref } // GetResourceHrefOk returns a tuple with the ResourceHref field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelProperties) GetResourceHrefOk() (*string, bool) { if o == nil { return nil, false } return o.ResourceHref, true } // SetResourceHref sets field value func (o *LabelProperties) SetResourceHref(v string) { o.ResourceHref = &v } // HasResourceHref returns a boolean if a field has been set. func (o *LabelProperties) HasResourceHref() bool { if o != nil && o.ResourceHref != nil { return true } return false } func (o LabelProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Key != nil { toSerialize["key"] = o.Key } if o.Value != nil { toSerialize["value"] = o.Value } if o.ResourceId != nil { toSerialize["resourceId"] = o.ResourceId } if o.ResourceType != nil { toSerialize["resourceType"] = o.ResourceType } if o.ResourceHref != nil { toSerialize["resourceHref"] = o.ResourceHref } return json.Marshal(toSerialize) } type NullableLabelProperties struct { value *LabelProperties isSet bool } func (v NullableLabelProperties) Get() *LabelProperties { return v.value } func (v *NullableLabelProperties) Set(val *LabelProperties) { v.value = val v.isSet = true } func (v NullableLabelProperties) IsSet() bool { return v.isSet } func (v *NullableLabelProperties) Unset() { v.value = nil v.isSet = false } func NewNullableLabelProperties(val *LabelProperties) *NullableLabelProperties { return &NullableLabelProperties{value: val, isSet: true} } func (v NullableLabelProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLabelProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_label_resource.go000066400000000000000000000153161465267054300244000ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // LabelResource struct for LabelResource type LabelResource struct { // Label on a resource is identified using label key. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *string `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *NoStateMetaData `json:"metadata,omitempty"` Properties *LabelResourceProperties `json:"properties"` } // NewLabelResource instantiates a new LabelResource object // This constructor will assign default values to properties that have it defined, // 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 NewLabelResource(properties LabelResourceProperties) *LabelResource { this := LabelResource{} this.Properties = &properties return &this } // NewLabelResourceWithDefaults instantiates a new LabelResource object // This 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 NewLabelResourceWithDefaults() *LabelResource { this := LabelResource{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *LabelResource) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResource) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *LabelResource) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *LabelResource) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *LabelResource) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResource) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *LabelResource) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *LabelResource) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *LabelResource) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResource) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *LabelResource) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *LabelResource) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *LabelResource) GetMetadata() *NoStateMetaData { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResource) GetMetadataOk() (*NoStateMetaData, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *LabelResource) SetMetadata(v NoStateMetaData) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *LabelResource) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *LabelResource) GetProperties() *LabelResourceProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResource) GetPropertiesOk() (*LabelResourceProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *LabelResource) SetProperties(v LabelResourceProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *LabelResource) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o LabelResource) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableLabelResource struct { value *LabelResource isSet bool } func (v NullableLabelResource) Get() *LabelResource { return v.value } func (v *NullableLabelResource) Set(val *LabelResource) { v.value = val v.isSet = true } func (v NullableLabelResource) IsSet() bool { return v.isSet } func (v *NullableLabelResource) Unset() { v.value = nil v.isSet = false } func NewNullableLabelResource(val *LabelResource) *NullableLabelResource { return &NullableLabelResource{value: val, isSet: true} } func (v NullableLabelResource) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLabelResource) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_label_resource_properties.go000066400000000000000000000102711465267054300266470ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // LabelResourceProperties struct for LabelResourceProperties type LabelResourceProperties struct { // A label key Key *string `json:"key,omitempty"` // A label value Value *string `json:"value,omitempty"` } // NewLabelResourceProperties instantiates a new LabelResourceProperties object // This constructor will assign default values to properties that have it defined, // 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 NewLabelResourceProperties() *LabelResourceProperties { this := LabelResourceProperties{} return &this } // NewLabelResourcePropertiesWithDefaults instantiates a new LabelResourceProperties object // This 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 NewLabelResourcePropertiesWithDefaults() *LabelResourceProperties { this := LabelResourceProperties{} return &this } // GetKey returns the Key field value // If the value is explicit nil, nil is returned func (o *LabelResourceProperties) GetKey() *string { if o == nil { return nil } return o.Key } // GetKeyOk returns a tuple with the Key field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResourceProperties) GetKeyOk() (*string, bool) { if o == nil { return nil, false } return o.Key, true } // SetKey sets field value func (o *LabelResourceProperties) SetKey(v string) { o.Key = &v } // HasKey returns a boolean if a field has been set. func (o *LabelResourceProperties) HasKey() bool { if o != nil && o.Key != nil { return true } return false } // GetValue returns the Value field value // If the value is explicit nil, nil is returned func (o *LabelResourceProperties) GetValue() *string { if o == nil { return nil } return o.Value } // GetValueOk returns a tuple with the Value field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResourceProperties) GetValueOk() (*string, bool) { if o == nil { return nil, false } return o.Value, true } // SetValue sets field value func (o *LabelResourceProperties) SetValue(v string) { o.Value = &v } // HasValue returns a boolean if a field has been set. func (o *LabelResourceProperties) HasValue() bool { if o != nil && o.Value != nil { return true } return false } func (o LabelResourceProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Key != nil { toSerialize["key"] = o.Key } if o.Value != nil { toSerialize["value"] = o.Value } return json.Marshal(toSerialize) } type NullableLabelResourceProperties struct { value *LabelResourceProperties isSet bool } func (v NullableLabelResourceProperties) Get() *LabelResourceProperties { return v.value } func (v *NullableLabelResourceProperties) Set(val *LabelResourceProperties) { v.value = val v.isSet = true } func (v NullableLabelResourceProperties) IsSet() bool { return v.isSet } func (v *NullableLabelResourceProperties) Unset() { v.value = nil v.isSet = false } func NewNullableLabelResourceProperties(val *LabelResourceProperties) *NullableLabelResourceProperties { return &NullableLabelResourceProperties{value: val, isSet: true} } func (v NullableLabelResourceProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLabelResourceProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_label_resources.go000066400000000000000000000205031465267054300245550ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // LabelResources struct for LabelResources type LabelResources struct { // A unique representation of the label as a resource collection. Id *string `json:"id,omitempty"` // The type of resource within a collection. Type *string `json:"type,omitempty"` // URL to the collection representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]LabelResource `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewLabelResources instantiates a new LabelResources object // This constructor will assign default values to properties that have it defined, // 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 NewLabelResources() *LabelResources { this := LabelResources{} return &this } // NewLabelResourcesWithDefaults instantiates a new LabelResources object // This 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 NewLabelResourcesWithDefaults() *LabelResources { this := LabelResources{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *LabelResources) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResources) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *LabelResources) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *LabelResources) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *LabelResources) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResources) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *LabelResources) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *LabelResources) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *LabelResources) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResources) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *LabelResources) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *LabelResources) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *LabelResources) GetItems() *[]LabelResource { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResources) GetItemsOk() (*[]LabelResource, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *LabelResources) SetItems(v []LabelResource) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *LabelResources) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *LabelResources) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResources) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *LabelResources) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *LabelResources) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *LabelResources) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResources) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *LabelResources) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *LabelResources) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *LabelResources) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LabelResources) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *LabelResources) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *LabelResources) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o LabelResources) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableLabelResources struct { value *LabelResources isSet bool } func (v NullableLabelResources) Get() *LabelResources { return v.value } func (v *NullableLabelResources) Set(val *LabelResources) { v.value = val v.isSet = true } func (v NullableLabelResources) IsSet() bool { return v.isSet } func (v *NullableLabelResources) Unset() { v.value = nil v.isSet = false } func NewNullableLabelResources(val *LabelResources) *NullableLabelResources { return &NullableLabelResources{value: val, isSet: true} } func (v NullableLabelResources) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLabelResources) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_labels.go000066400000000000000000000124571465267054300226570ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Labels struct for Labels type Labels struct { // A unique representation of the label as a resource collection. Id *string `json:"id,omitempty"` // The type of resource within a collection. Type *string `json:"type,omitempty"` // URL to the collection representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Label `json:"items,omitempty"` } // NewLabels instantiates a new Labels object // This constructor will assign default values to properties that have it defined, // 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 NewLabels() *Labels { this := Labels{} return &this } // NewLabelsWithDefaults instantiates a new Labels object // This 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 NewLabelsWithDefaults() *Labels { this := Labels{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Labels) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Labels) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Labels) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Labels) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Labels) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Labels) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Labels) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Labels) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Labels) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Labels) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Labels) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Labels) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Labels) GetItems() *[]Label { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Labels) GetItemsOk() (*[]Label, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Labels) SetItems(v []Label) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Labels) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o Labels) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableLabels struct { value *Labels isSet bool } func (v NullableLabels) Get() *Labels { return v.value } func (v *NullableLabels) Set(val *Labels) { v.value = val v.isSet = true } func (v NullableLabels) IsSet() bool { return v.isSet } func (v *NullableLabels) Unset() { v.value = nil v.isSet = false } func NewNullableLabels(val *Labels) *NullableLabels { return &NullableLabels{value: val, isSet: true} } func (v NullableLabels) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLabels) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_lan.go000066400000000000000000000161221465267054300221600ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Lan struct for Lan type Lan struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *LanProperties `json:"properties"` Entities *LanEntities `json:"entities,omitempty"` } // NewLan instantiates a new Lan object // This constructor will assign default values to properties that have it defined, // 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 NewLan(properties LanProperties) *Lan { this := Lan{} this.Properties = &properties return &this } // NewLanWithDefaults instantiates a new Lan object // This 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 NewLanWithDefaults() *Lan { this := Lan{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Lan) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lan) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Lan) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Lan) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Lan) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lan) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Lan) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Lan) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Lan) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lan) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Lan) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Lan) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Lan) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lan) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Lan) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Lan) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Lan) GetProperties() *LanProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lan) GetPropertiesOk() (*LanProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Lan) SetProperties(v LanProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Lan) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *Lan) GetEntities() *LanEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lan) GetEntitiesOk() (*LanEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *Lan) SetEntities(v LanEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *Lan) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o Lan) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableLan struct { value *Lan isSet bool } func (v NullableLan) Get() *Lan { return v.value } func (v *NullableLan) Set(val *Lan) { v.value = val v.isSet = true } func (v NullableLan) IsSet() bool { return v.isSet } func (v *NullableLan) Unset() { v.value = nil v.isSet = false } func NewNullableLan(val *Lan) *NullableLan { return &NullableLan{value: val, isSet: true} } func (v NullableLan) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLan) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_lan_entities.go000066400000000000000000000056721465267054300240740ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // LanEntities struct for LanEntities type LanEntities struct { Nics *LanNics `json:"nics,omitempty"` } // NewLanEntities instantiates a new LanEntities object // This constructor will assign default values to properties that have it defined, // 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 NewLanEntities() *LanEntities { this := LanEntities{} return &this } // NewLanEntitiesWithDefaults instantiates a new LanEntities object // This 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 NewLanEntitiesWithDefaults() *LanEntities { this := LanEntities{} return &this } // GetNics returns the Nics field value // If the value is explicit nil, nil is returned func (o *LanEntities) GetNics() *LanNics { if o == nil { return nil } return o.Nics } // GetNicsOk returns a tuple with the Nics field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanEntities) GetNicsOk() (*LanNics, bool) { if o == nil { return nil, false } return o.Nics, true } // SetNics sets field value func (o *LanEntities) SetNics(v LanNics) { o.Nics = &v } // HasNics returns a boolean if a field has been set. func (o *LanEntities) HasNics() bool { if o != nil && o.Nics != nil { return true } return false } func (o LanEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Nics != nil { toSerialize["nics"] = o.Nics } return json.Marshal(toSerialize) } type NullableLanEntities struct { value *LanEntities isSet bool } func (v NullableLanEntities) Get() *LanEntities { return v.value } func (v *NullableLanEntities) Set(val *LanEntities) { v.value = val v.isSet = true } func (v NullableLanEntities) IsSet() bool { return v.isSet } func (v *NullableLanEntities) Unset() { v.value = nil v.isSet = false } func NewNullableLanEntities(val *LanEntities) *NullableLanEntities { return &NullableLanEntities{value: val, isSet: true} } func (v NullableLanEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLanEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_lan_nics.go000066400000000000000000000175521465267054300232040ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // LanNics struct for LanNics type LanNics struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Nic `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewLanNics instantiates a new LanNics object // This constructor will assign default values to properties that have it defined, // 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 NewLanNics() *LanNics { this := LanNics{} return &this } // NewLanNicsWithDefaults instantiates a new LanNics object // This 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 NewLanNicsWithDefaults() *LanNics { this := LanNics{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *LanNics) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanNics) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *LanNics) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *LanNics) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *LanNics) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanNics) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *LanNics) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *LanNics) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *LanNics) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanNics) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *LanNics) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *LanNics) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *LanNics) GetItems() *[]Nic { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanNics) GetItemsOk() (*[]Nic, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *LanNics) SetItems(v []Nic) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *LanNics) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *LanNics) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanNics) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *LanNics) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *LanNics) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *LanNics) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanNics) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *LanNics) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *LanNics) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *LanNics) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanNics) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *LanNics) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *LanNics) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o LanNics) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableLanNics struct { value *LanNics isSet bool } func (v NullableLanNics) Get() *LanNics { return v.value } func (v *NullableLanNics) Set(val *LanNics) { v.value = val v.isSet = true } func (v NullableLanNics) IsSet() bool { return v.isSet } func (v *NullableLanNics) Unset() { v.value = nil v.isSet = false } func NewNullableLanNics(val *LanNics) *NullableLanNics { return &NullableLanNics{value: val, isSet: true} } func (v NullableLanNics) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLanNics) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_lan_properties.go000066400000000000000000000201161465267054300244320ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // LanProperties struct for LanProperties type LanProperties struct { // The name of the resource. Name *string `json:"name,omitempty"` // IP failover configurations for lan IpFailover *[]IPFailover `json:"ipFailover,omitempty"` // For a GET request, this value is either 'null' or contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled. For POST/PUT/PATCH requests, 'AUTO' will result in enabling this LAN for IPv6 and automatically assign a /64 IPv6 CIDR block to this LAN and /80 IPv6 CIDR blocks to the NICs and one /128 IPv6 address to each connected NIC. If you choose the IPv6 CIDR block for the LAN on your own, then you must provide a /64 block, which is inside the IPv6 CIDR block of the virtual datacenter and unique inside all LANs from this virtual datacenter. If you enable IPv6 on a LAN with NICs, those NICs will get a /80 IPv6 CIDR block and one IPv6 address assigned to each automatically, unless you specify them explicitly on the LAN and on the NICs. A virtual data center is limited to a maximum of 256 IPv6-enabled LANs. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpv6CidrBlockNil` Ipv6CidrBlock *string `json:"ipv6CidrBlock,omitempty"` // The unique identifier of the Cross Connect the LAN is connected to, if any. It needs to be ensured that IP addresses of the NICs of all LANs connected to a given Cross Connect is not duplicated and belongs to the same subnet range. Pcc *string `json:"pcc,omitempty"` // Indicates if the LAN is connected to the internet or not. Public *bool `json:"public,omitempty"` } // NewLanProperties instantiates a new LanProperties object // This constructor will assign default values to properties that have it defined, // 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 NewLanProperties() *LanProperties { this := LanProperties{} return &this } // NewLanPropertiesWithDefaults instantiates a new LanProperties object // This 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 NewLanPropertiesWithDefaults() *LanProperties { this := LanProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *LanProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *LanProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *LanProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetIpFailover returns the IpFailover field value // If the value is explicit nil, nil is returned func (o *LanProperties) GetIpFailover() *[]IPFailover { if o == nil { return nil } return o.IpFailover } // GetIpFailoverOk returns a tuple with the IpFailover field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanProperties) GetIpFailoverOk() (*[]IPFailover, bool) { if o == nil { return nil, false } return o.IpFailover, true } // SetIpFailover sets field value func (o *LanProperties) SetIpFailover(v []IPFailover) { o.IpFailover = &v } // HasIpFailover returns a boolean if a field has been set. func (o *LanProperties) HasIpFailover() bool { if o != nil && o.IpFailover != nil { return true } return false } // GetIpv6CidrBlock returns the Ipv6CidrBlock field value // If the value is explicit nil, nil is returned func (o *LanProperties) GetIpv6CidrBlock() *string { if o == nil { return nil } return o.Ipv6CidrBlock } // GetIpv6CidrBlockOk returns a tuple with the Ipv6CidrBlock field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanProperties) GetIpv6CidrBlockOk() (*string, bool) { if o == nil { return nil, false } return o.Ipv6CidrBlock, true } // SetIpv6CidrBlock sets field value func (o *LanProperties) SetIpv6CidrBlock(v string) { o.Ipv6CidrBlock = &v } // sets Ipv6CidrBlock to the explicit address that will be encoded as nil when marshaled func (o *LanProperties) SetIpv6CidrBlockNil() { o.Ipv6CidrBlock = &Nilstring } // HasIpv6CidrBlock returns a boolean if a field has been set. func (o *LanProperties) HasIpv6CidrBlock() bool { if o != nil && o.Ipv6CidrBlock != nil { return true } return false } // GetPcc returns the Pcc field value // If the value is explicit nil, nil is returned func (o *LanProperties) GetPcc() *string { if o == nil { return nil } return o.Pcc } // GetPccOk returns a tuple with the Pcc field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanProperties) GetPccOk() (*string, bool) { if o == nil { return nil, false } return o.Pcc, true } // SetPcc sets field value func (o *LanProperties) SetPcc(v string) { o.Pcc = &v } // HasPcc returns a boolean if a field has been set. func (o *LanProperties) HasPcc() bool { if o != nil && o.Pcc != nil { return true } return false } // GetPublic returns the Public field value // If the value is explicit nil, nil is returned func (o *LanProperties) GetPublic() *bool { if o == nil { return nil } return o.Public } // GetPublicOk returns a tuple with the Public field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LanProperties) GetPublicOk() (*bool, bool) { if o == nil { return nil, false } return o.Public, true } // SetPublic sets field value func (o *LanProperties) SetPublic(v bool) { o.Public = &v } // HasPublic returns a boolean if a field has been set. func (o *LanProperties) HasPublic() bool { if o != nil && o.Public != nil { return true } return false } func (o LanProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.IpFailover != nil { toSerialize["ipFailover"] = o.IpFailover } if o.Ipv6CidrBlock == &Nilstring { toSerialize["ipv6CidrBlock"] = nil } else if o.Ipv6CidrBlock != nil { toSerialize["ipv6CidrBlock"] = o.Ipv6CidrBlock } if o.Pcc != nil { toSerialize["pcc"] = o.Pcc } if o.Public != nil { toSerialize["public"] = o.Public } return json.Marshal(toSerialize) } type NullableLanProperties struct { value *LanProperties isSet bool } func (v NullableLanProperties) Get() *LanProperties { return v.value } func (v *NullableLanProperties) Set(val *LanProperties) { v.value = val v.isSet = true } func (v NullableLanProperties) IsSet() bool { return v.isSet } func (v *NullableLanProperties) Unset() { v.value = nil v.isSet = false } func NewNullableLanProperties(val *LanProperties) *NullableLanProperties { return &NullableLanProperties{value: val, isSet: true} } func (v NullableLanProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLanProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_lans.go000066400000000000000000000173021465267054300223440ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Lans struct for Lans type Lans struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Lan `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewLans instantiates a new Lans object // This constructor will assign default values to properties that have it defined, // 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 NewLans() *Lans { this := Lans{} return &this } // NewLansWithDefaults instantiates a new Lans object // This 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 NewLansWithDefaults() *Lans { this := Lans{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Lans) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lans) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Lans) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Lans) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Lans) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lans) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Lans) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Lans) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Lans) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lans) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Lans) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Lans) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Lans) GetItems() *[]Lan { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lans) GetItemsOk() (*[]Lan, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Lans) SetItems(v []Lan) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Lans) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *Lans) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lans) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *Lans) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *Lans) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *Lans) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lans) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *Lans) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *Lans) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *Lans) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Lans) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *Lans) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *Lans) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o Lans) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableLans struct { value *Lans isSet bool } func (v NullableLans) Get() *Lans { return v.value } func (v *NullableLans) Set(val *Lans) { v.value = val v.isSet = true } func (v NullableLans) IsSet() bool { return v.isSet } func (v *NullableLans) Unset() { v.value = nil v.isSet = false } func NewNullableLans(val *Lans) *NullableLans { return &NullableLans{value: val, isSet: true} } func (v NullableLans) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLans) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_loadbalancer.go000066400000000000000000000171451465267054300240230ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Loadbalancer struct for Loadbalancer type Loadbalancer struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *LoadbalancerProperties `json:"properties"` Entities *LoadbalancerEntities `json:"entities,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(properties LoadbalancerProperties) *Loadbalancer { this := Loadbalancer{} this.Properties = &properties 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 } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Loadbalancer) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancer) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Loadbalancer) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Loadbalancer) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Loadbalancer) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancer) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Loadbalancer) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Loadbalancer) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Loadbalancer) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancer) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Loadbalancer) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Loadbalancer) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Loadbalancer) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancer) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Loadbalancer) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Loadbalancer) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Loadbalancer) GetProperties() *LoadbalancerProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancer) GetPropertiesOk() (*LoadbalancerProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Loadbalancer) SetProperties(v LoadbalancerProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Loadbalancer) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *Loadbalancer) GetEntities() *LoadbalancerEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancer) GetEntitiesOk() (*LoadbalancerEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *Loadbalancer) SetEntities(v LoadbalancerEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *Loadbalancer) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o Loadbalancer) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } 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) } golang-github-ionos-cloud-sdk-go-6.2.0/model_loadbalancer_entities.go000066400000000000000000000066061465267054300257270ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // LoadbalancerEntities struct for LoadbalancerEntities type LoadbalancerEntities struct { Balancednics *BalancedNics `json:"balancednics,omitempty"` } // NewLoadbalancerEntities instantiates a new LoadbalancerEntities object // This constructor will assign default values to properties that have it defined, // 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 NewLoadbalancerEntities() *LoadbalancerEntities { this := LoadbalancerEntities{} return &this } // NewLoadbalancerEntitiesWithDefaults instantiates a new LoadbalancerEntities object // This 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 NewLoadbalancerEntitiesWithDefaults() *LoadbalancerEntities { this := LoadbalancerEntities{} return &this } // GetBalancednics returns the Balancednics field value // If the value is explicit nil, nil is returned func (o *LoadbalancerEntities) GetBalancednics() *BalancedNics { if o == nil { return nil } return o.Balancednics } // GetBalancednicsOk returns a tuple with the Balancednics field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LoadbalancerEntities) GetBalancednicsOk() (*BalancedNics, bool) { if o == nil { return nil, false } return o.Balancednics, true } // SetBalancednics sets field value func (o *LoadbalancerEntities) SetBalancednics(v BalancedNics) { o.Balancednics = &v } // HasBalancednics returns a boolean if a field has been set. func (o *LoadbalancerEntities) HasBalancednics() bool { if o != nil && o.Balancednics != nil { return true } return false } func (o LoadbalancerEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Balancednics != nil { toSerialize["balancednics"] = o.Balancednics } return json.Marshal(toSerialize) } type NullableLoadbalancerEntities struct { value *LoadbalancerEntities isSet bool } func (v NullableLoadbalancerEntities) Get() *LoadbalancerEntities { return v.value } func (v *NullableLoadbalancerEntities) Set(val *LoadbalancerEntities) { v.value = val v.isSet = true } func (v NullableLoadbalancerEntities) IsSet() bool { return v.isSet } func (v *NullableLoadbalancerEntities) Unset() { v.value = nil v.isSet = false } func NewNullableLoadbalancerEntities(val *LoadbalancerEntities) *NullableLoadbalancerEntities { return &NullableLoadbalancerEntities{value: val, isSet: true} } func (v NullableLoadbalancerEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLoadbalancerEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_loadbalancer_properties.go000066400000000000000000000127211465267054300262720ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // LoadbalancerProperties struct for LoadbalancerProperties type LoadbalancerProperties struct { // The name of the resource. Name *string `json:"name,omitempty"` // IPv4 address of the loadbalancer. All attached NICs will inherit this IP. Leaving value null will assign IP automatically. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpNil` Ip *string `json:"ip,omitempty"` // Indicates if the loadbalancer will reserve an IP using DHCP. Dhcp *bool `json:"dhcp,omitempty"` } // NewLoadbalancerProperties instantiates a new LoadbalancerProperties object // This constructor will assign default values to properties that have it defined, // 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 NewLoadbalancerProperties() *LoadbalancerProperties { this := LoadbalancerProperties{} return &this } // NewLoadbalancerPropertiesWithDefaults instantiates a new LoadbalancerProperties object // This 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 NewLoadbalancerPropertiesWithDefaults() *LoadbalancerProperties { this := LoadbalancerProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *LoadbalancerProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LoadbalancerProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *LoadbalancerProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *LoadbalancerProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetIp returns the Ip field value // If the value is explicit nil, nil is returned func (o *LoadbalancerProperties) GetIp() *string { if o == nil { return nil } return o.Ip } // GetIpOk returns a tuple with the Ip field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LoadbalancerProperties) GetIpOk() (*string, bool) { if o == nil { return nil, false } return o.Ip, true } // SetIp sets field value func (o *LoadbalancerProperties) SetIp(v string) { o.Ip = &v } // sets Ip to the explicit address that will be encoded as nil when marshaled func (o *LoadbalancerProperties) SetIpNil() { o.Ip = &Nilstring } // HasIp returns a boolean if a field has been set. func (o *LoadbalancerProperties) HasIp() bool { if o != nil && o.Ip != nil { return true } return false } // GetDhcp returns the Dhcp field value // If the value is explicit nil, nil is returned func (o *LoadbalancerProperties) GetDhcp() *bool { if o == nil { return nil } return o.Dhcp } // GetDhcpOk returns a tuple with the Dhcp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LoadbalancerProperties) GetDhcpOk() (*bool, bool) { if o == nil { return nil, false } return o.Dhcp, true } // SetDhcp sets field value func (o *LoadbalancerProperties) SetDhcp(v bool) { o.Dhcp = &v } // HasDhcp returns a boolean if a field has been set. func (o *LoadbalancerProperties) HasDhcp() bool { if o != nil && o.Dhcp != nil { return true } return false } func (o LoadbalancerProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Ip == &Nilstring { toSerialize["ip"] = nil } else if o.Ip != nil { toSerialize["ip"] = o.Ip } if o.Dhcp != nil { toSerialize["dhcp"] = o.Dhcp } return json.Marshal(toSerialize) } type NullableLoadbalancerProperties struct { value *LoadbalancerProperties isSet bool } func (v NullableLoadbalancerProperties) Get() *LoadbalancerProperties { return v.value } func (v *NullableLoadbalancerProperties) Set(val *LoadbalancerProperties) { v.value = val v.isSet = true } func (v NullableLoadbalancerProperties) IsSet() bool { return v.isSet } func (v *NullableLoadbalancerProperties) Unset() { v.value = nil v.isSet = false } func NewNullableLoadbalancerProperties(val *LoadbalancerProperties) *NullableLoadbalancerProperties { return &NullableLoadbalancerProperties{value: val, isSet: true} } func (v NullableLoadbalancerProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLoadbalancerProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_loadbalancers.go000066400000000000000000000203361465267054300242020ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Loadbalancers struct for Loadbalancers type Loadbalancers struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Loadbalancer `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewLoadbalancers instantiates a new Loadbalancers object // This constructor will assign default values to properties that have it defined, // 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 NewLoadbalancers() *Loadbalancers { this := Loadbalancers{} return &this } // NewLoadbalancersWithDefaults instantiates a new Loadbalancers object // This 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 NewLoadbalancersWithDefaults() *Loadbalancers { this := Loadbalancers{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Loadbalancers) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancers) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Loadbalancers) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Loadbalancers) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Loadbalancers) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Loadbalancers) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Loadbalancers) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Loadbalancers) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Loadbalancers) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Loadbalancers) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Loadbalancers) GetItems() *[]Loadbalancer { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancers) GetItemsOk() (*[]Loadbalancer, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Loadbalancers) SetItems(v []Loadbalancer) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Loadbalancers) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *Loadbalancers) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancers) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *Loadbalancers) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *Loadbalancers) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *Loadbalancers) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancers) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *Loadbalancers) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *Loadbalancers) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *Loadbalancers) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Loadbalancers) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *Loadbalancers) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *Loadbalancers) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o Loadbalancers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableLoadbalancers struct { value *Loadbalancers isSet bool } func (v NullableLoadbalancers) Get() *Loadbalancers { return v.value } func (v *NullableLoadbalancers) Set(val *Loadbalancers) { v.value = val v.isSet = true } func (v NullableLoadbalancers) IsSet() bool { return v.isSet } func (v *NullableLoadbalancers) Unset() { v.value = nil v.isSet = false } func NewNullableLoadbalancers(val *Loadbalancers) *NullableLoadbalancers { return &NullableLoadbalancers{value: val, isSet: true} } func (v NullableLoadbalancers) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLoadbalancers) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_location.go000066400000000000000000000147251465267054300232250ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Location struct for Location type Location struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *LocationProperties `json:"properties"` } // NewLocation instantiates a new Location object // This constructor will assign default values to properties that have it defined, // 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 NewLocation(properties LocationProperties) *Location { this := Location{} this.Properties = &properties return &this } // NewLocationWithDefaults instantiates a new Location object // This 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 NewLocationWithDefaults() *Location { this := Location{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Location) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Location) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Location) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Location) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Location) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Location) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Location) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Location) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Location) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Location) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Location) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Location) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Location) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Location) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Location) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Location) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Location) GetProperties() *LocationProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Location) GetPropertiesOk() (*LocationProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Location) SetProperties(v LocationProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Location) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o Location) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableLocation struct { value *Location isSet bool } func (v NullableLocation) Get() *Location { return v.value } func (v *NullableLocation) Set(val *Location) { v.value = val v.isSet = true } func (v NullableLocation) IsSet() bool { return v.isSet } func (v *NullableLocation) Unset() { v.value = nil v.isSet = false } func NewNullableLocation(val *Location) *NullableLocation { return &NullableLocation{value: val, isSet: true} } func (v NullableLocation) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLocation) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_location_properties.go000066400000000000000000000145511465267054300254760ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // LocationProperties struct for LocationProperties type LocationProperties struct { // The location name. Name *string `json:"name,omitempty"` // A list of available features in the location. Features *[]string `json:"features,omitempty"` // A list of image aliases available in the location. ImageAliases *[]string `json:"imageAliases,omitempty"` // A list of available CPU types and related resources available in the location. CpuArchitecture *[]CpuArchitectureProperties `json:"cpuArchitecture,omitempty"` } // NewLocationProperties instantiates a new LocationProperties object // This constructor will assign default values to properties that have it defined, // 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 NewLocationProperties() *LocationProperties { this := LocationProperties{} return &this } // NewLocationPropertiesWithDefaults instantiates a new LocationProperties object // This 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 NewLocationPropertiesWithDefaults() *LocationProperties { this := LocationProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *LocationProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LocationProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *LocationProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *LocationProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetFeatures returns the Features field value // If the value is explicit nil, nil is returned func (o *LocationProperties) GetFeatures() *[]string { if o == nil { return nil } return o.Features } // GetFeaturesOk returns a tuple with the Features field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LocationProperties) GetFeaturesOk() (*[]string, bool) { if o == nil { return nil, false } return o.Features, true } // SetFeatures sets field value func (o *LocationProperties) SetFeatures(v []string) { o.Features = &v } // HasFeatures returns a boolean if a field has been set. func (o *LocationProperties) HasFeatures() bool { if o != nil && o.Features != nil { return true } return false } // GetImageAliases returns the ImageAliases field value // If the value is explicit nil, nil is returned func (o *LocationProperties) GetImageAliases() *[]string { if o == nil { return nil } return o.ImageAliases } // GetImageAliasesOk returns a tuple with the ImageAliases field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LocationProperties) GetImageAliasesOk() (*[]string, bool) { if o == nil { return nil, false } return o.ImageAliases, true } // SetImageAliases sets field value func (o *LocationProperties) SetImageAliases(v []string) { o.ImageAliases = &v } // HasImageAliases returns a boolean if a field has been set. func (o *LocationProperties) HasImageAliases() bool { if o != nil && o.ImageAliases != nil { return true } return false } // GetCpuArchitecture returns the CpuArchitecture field value // If the value is explicit nil, nil is returned func (o *LocationProperties) GetCpuArchitecture() *[]CpuArchitectureProperties { if o == nil { return nil } return o.CpuArchitecture } // GetCpuArchitectureOk returns a tuple with the CpuArchitecture field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *LocationProperties) GetCpuArchitectureOk() (*[]CpuArchitectureProperties, bool) { if o == nil { return nil, false } return o.CpuArchitecture, true } // SetCpuArchitecture sets field value func (o *LocationProperties) SetCpuArchitecture(v []CpuArchitectureProperties) { o.CpuArchitecture = &v } // HasCpuArchitecture returns a boolean if a field has been set. func (o *LocationProperties) HasCpuArchitecture() bool { if o != nil && o.CpuArchitecture != nil { return true } return false } func (o LocationProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Features != nil { toSerialize["features"] = o.Features } if o.ImageAliases != nil { toSerialize["imageAliases"] = o.ImageAliases } if o.CpuArchitecture != nil { toSerialize["cpuArchitecture"] = o.CpuArchitecture } return json.Marshal(toSerialize) } type NullableLocationProperties struct { value *LocationProperties isSet bool } func (v NullableLocationProperties) Get() *LocationProperties { return v.value } func (v *NullableLocationProperties) Set(val *LocationProperties) { v.value = val v.isSet = true } func (v NullableLocationProperties) IsSet() bool { return v.isSet } func (v *NullableLocationProperties) Unset() { v.value = nil v.isSet = false } func NewNullableLocationProperties(val *LocationProperties) *NullableLocationProperties { return &NullableLocationProperties{value: val, isSet: true} } func (v NullableLocationProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLocationProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_locations.go000066400000000000000000000126261465267054300234060ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Locations struct for Locations type Locations struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Location `json:"items,omitempty"` } // NewLocations instantiates a new Locations object // This constructor will assign default values to properties that have it defined, // 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 NewLocations() *Locations { this := Locations{} return &this } // NewLocationsWithDefaults instantiates a new Locations object // This 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 NewLocationsWithDefaults() *Locations { this := Locations{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Locations) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Locations) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Locations) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Locations) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Locations) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Locations) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Locations) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Locations) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Locations) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Locations) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Locations) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Locations) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Locations) GetItems() *[]Location { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Locations) GetItemsOk() (*[]Location, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Locations) SetItems(v []Location) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Locations) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o Locations) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableLocations struct { value *Locations isSet bool } func (v NullableLocations) Get() *Locations { return v.value } func (v *NullableLocations) Set(val *Locations) { v.value = val v.isSet = true } func (v NullableLocations) IsSet() bool { return v.isSet } func (v *NullableLocations) Unset() { v.value = nil v.isSet = false } func NewNullableLocations(val *Locations) *NullableLocations { return &NullableLocations{value: val, isSet: true} } func (v NullableLocations) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableLocations) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway.go000066400000000000000000000167571465267054300237270ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NatGateway struct for NatGateway type NatGateway struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *NatGatewayProperties `json:"properties"` Entities *NatGatewayEntities `json:"entities,omitempty"` } // NewNatGateway instantiates a new NatGateway object // This constructor will assign default values to properties that have it defined, // 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 NewNatGateway(properties NatGatewayProperties) *NatGateway { this := NatGateway{} this.Properties = &properties return &this } // NewNatGatewayWithDefaults instantiates a new NatGateway object // This 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 NewNatGatewayWithDefaults() *NatGateway { this := NatGateway{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NatGateway) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateway) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NatGateway) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NatGateway) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NatGateway) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateway) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NatGateway) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NatGateway) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NatGateway) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateway) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NatGateway) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NatGateway) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *NatGateway) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateway) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *NatGateway) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *NatGateway) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *NatGateway) GetProperties() *NatGatewayProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateway) GetPropertiesOk() (*NatGatewayProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *NatGateway) SetProperties(v NatGatewayProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *NatGateway) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *NatGateway) GetEntities() *NatGatewayEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateway) GetEntitiesOk() (*NatGatewayEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *NatGateway) SetEntities(v NatGatewayEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *NatGateway) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o NatGateway) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableNatGateway struct { value *NatGateway isSet bool } func (v NullableNatGateway) Get() *NatGateway { return v.value } func (v *NullableNatGateway) Set(val *NatGateway) { v.value = val v.isSet = true } func (v NullableNatGateway) IsSet() bool { return v.isSet } func (v *NullableNatGateway) Unset() { v.value = nil v.isSet = false } func NewNullableNatGateway(val *NatGateway) *NullableNatGateway { return &NullableNatGateway{value: val, isSet: true} } func (v NullableNatGateway) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGateway) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway_entities.go000066400000000000000000000101701465267054300256120ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NatGatewayEntities struct for NatGatewayEntities type NatGatewayEntities struct { Rules *NatGatewayRules `json:"rules,omitempty"` Flowlogs *FlowLogs `json:"flowlogs,omitempty"` } // NewNatGatewayEntities instantiates a new NatGatewayEntities object // This constructor will assign default values to properties that have it defined, // 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 NewNatGatewayEntities() *NatGatewayEntities { this := NatGatewayEntities{} return &this } // NewNatGatewayEntitiesWithDefaults instantiates a new NatGatewayEntities object // This 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 NewNatGatewayEntitiesWithDefaults() *NatGatewayEntities { this := NatGatewayEntities{} return &this } // GetRules returns the Rules field value // If the value is explicit nil, nil is returned func (o *NatGatewayEntities) GetRules() *NatGatewayRules { if o == nil { return nil } return o.Rules } // GetRulesOk returns a tuple with the Rules field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayEntities) GetRulesOk() (*NatGatewayRules, bool) { if o == nil { return nil, false } return o.Rules, true } // SetRules sets field value func (o *NatGatewayEntities) SetRules(v NatGatewayRules) { o.Rules = &v } // HasRules returns a boolean if a field has been set. func (o *NatGatewayEntities) HasRules() bool { if o != nil && o.Rules != nil { return true } return false } // GetFlowlogs returns the Flowlogs field value // If the value is explicit nil, nil is returned func (o *NatGatewayEntities) GetFlowlogs() *FlowLogs { if o == nil { return nil } return o.Flowlogs } // GetFlowlogsOk returns a tuple with the Flowlogs field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayEntities) GetFlowlogsOk() (*FlowLogs, bool) { if o == nil { return nil, false } return o.Flowlogs, true } // SetFlowlogs sets field value func (o *NatGatewayEntities) SetFlowlogs(v FlowLogs) { o.Flowlogs = &v } // HasFlowlogs returns a boolean if a field has been set. func (o *NatGatewayEntities) HasFlowlogs() bool { if o != nil && o.Flowlogs != nil { return true } return false } func (o NatGatewayEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Rules != nil { toSerialize["rules"] = o.Rules } if o.Flowlogs != nil { toSerialize["flowlogs"] = o.Flowlogs } return json.Marshal(toSerialize) } type NullableNatGatewayEntities struct { value *NatGatewayEntities isSet bool } func (v NullableNatGatewayEntities) Get() *NatGatewayEntities { return v.value } func (v *NullableNatGatewayEntities) Set(val *NatGatewayEntities) { v.value = val v.isSet = true } func (v NullableNatGatewayEntities) IsSet() bool { return v.isSet } func (v *NullableNatGatewayEntities) Unset() { v.value = nil v.isSet = false } func NewNullableNatGatewayEntities(val *NatGatewayEntities) *NullableNatGatewayEntities { return &NullableNatGatewayEntities{value: val, isSet: true} } func (v NullableNatGatewayEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGatewayEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway_lan_properties.go000066400000000000000000000107101465267054300270140ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NatGatewayLanProperties struct for NatGatewayLanProperties type NatGatewayLanProperties struct { // Id for the LAN connected to the NAT Gateway Id *int32 `json:"id"` // Collection of gateway IP addresses of the NAT Gateway. Will be auto-generated if not provided. Should ideally be an IP belonging to the same subnet as the LAN GatewayIps *[]string `json:"gatewayIps,omitempty"` } // NewNatGatewayLanProperties instantiates a new NatGatewayLanProperties object // This constructor will assign default values to properties that have it defined, // 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 NewNatGatewayLanProperties(id int32) *NatGatewayLanProperties { this := NatGatewayLanProperties{} this.Id = &id return &this } // NewNatGatewayLanPropertiesWithDefaults instantiates a new NatGatewayLanProperties object // This 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 NewNatGatewayLanPropertiesWithDefaults() *NatGatewayLanProperties { this := NatGatewayLanProperties{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NatGatewayLanProperties) GetId() *int32 { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayLanProperties) GetIdOk() (*int32, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NatGatewayLanProperties) SetId(v int32) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NatGatewayLanProperties) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetGatewayIps returns the GatewayIps field value // If the value is explicit nil, nil is returned func (o *NatGatewayLanProperties) GetGatewayIps() *[]string { if o == nil { return nil } return o.GatewayIps } // GetGatewayIpsOk returns a tuple with the GatewayIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayLanProperties) GetGatewayIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.GatewayIps, true } // SetGatewayIps sets field value func (o *NatGatewayLanProperties) SetGatewayIps(v []string) { o.GatewayIps = &v } // HasGatewayIps returns a boolean if a field has been set. func (o *NatGatewayLanProperties) HasGatewayIps() bool { if o != nil && o.GatewayIps != nil { return true } return false } func (o NatGatewayLanProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.GatewayIps != nil { toSerialize["gatewayIps"] = o.GatewayIps } return json.Marshal(toSerialize) } type NullableNatGatewayLanProperties struct { value *NatGatewayLanProperties isSet bool } func (v NullableNatGatewayLanProperties) Get() *NatGatewayLanProperties { return v.value } func (v *NullableNatGatewayLanProperties) Set(val *NatGatewayLanProperties) { v.value = val v.isSet = true } func (v NullableNatGatewayLanProperties) IsSet() bool { return v.isSet } func (v *NullableNatGatewayLanProperties) Unset() { v.value = nil v.isSet = false } func NewNullableNatGatewayLanProperties(val *NatGatewayLanProperties) *NullableNatGatewayLanProperties { return &NullableNatGatewayLanProperties{value: val, isSet: true} } func (v NullableNatGatewayLanProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGatewayLanProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway_properties.go000066400000000000000000000126421465267054300261700ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NatGatewayProperties struct for NatGatewayProperties type NatGatewayProperties struct { // Name of the NAT Gateway. Name *string `json:"name"` // Collection of public IP addresses of the NAT Gateway. Should be customer reserved IP addresses in that location. PublicIps *[]string `json:"publicIps"` // Collection of LANs connected to the NAT Gateway. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. Lans *[]NatGatewayLanProperties `json:"lans,omitempty"` } // NewNatGatewayProperties instantiates a new NatGatewayProperties object // This constructor will assign default values to properties that have it defined, // 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 NewNatGatewayProperties(name string, publicIps []string) *NatGatewayProperties { this := NatGatewayProperties{} this.Name = &name this.PublicIps = &publicIps return &this } // NewNatGatewayPropertiesWithDefaults instantiates a new NatGatewayProperties object // This 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 NewNatGatewayPropertiesWithDefaults() *NatGatewayProperties { this := NatGatewayProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *NatGatewayProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *NatGatewayProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *NatGatewayProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetPublicIps returns the PublicIps field value // If the value is explicit nil, nil is returned func (o *NatGatewayProperties) GetPublicIps() *[]string { if o == nil { return nil } return o.PublicIps } // GetPublicIpsOk returns a tuple with the PublicIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayProperties) GetPublicIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.PublicIps, true } // SetPublicIps sets field value func (o *NatGatewayProperties) SetPublicIps(v []string) { o.PublicIps = &v } // HasPublicIps returns a boolean if a field has been set. func (o *NatGatewayProperties) HasPublicIps() bool { if o != nil && o.PublicIps != nil { return true } return false } // GetLans returns the Lans field value // If the value is explicit nil, nil is returned func (o *NatGatewayProperties) GetLans() *[]NatGatewayLanProperties { if o == nil { return nil } return o.Lans } // GetLansOk returns a tuple with the Lans field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayProperties) GetLansOk() (*[]NatGatewayLanProperties, bool) { if o == nil { return nil, false } return o.Lans, true } // SetLans sets field value func (o *NatGatewayProperties) SetLans(v []NatGatewayLanProperties) { o.Lans = &v } // HasLans returns a boolean if a field has been set. func (o *NatGatewayProperties) HasLans() bool { if o != nil && o.Lans != nil { return true } return false } func (o NatGatewayProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.PublicIps != nil { toSerialize["publicIps"] = o.PublicIps } if o.Lans != nil { toSerialize["lans"] = o.Lans } return json.Marshal(toSerialize) } type NullableNatGatewayProperties struct { value *NatGatewayProperties isSet bool } func (v NullableNatGatewayProperties) Get() *NatGatewayProperties { return v.value } func (v *NullableNatGatewayProperties) Set(val *NatGatewayProperties) { v.value = val v.isSet = true } func (v NullableNatGatewayProperties) IsSet() bool { return v.isSet } func (v *NullableNatGatewayProperties) Unset() { v.value = nil v.isSet = false } func NewNullableNatGatewayProperties(val *NatGatewayProperties) *NullableNatGatewayProperties { return &NullableNatGatewayProperties{value: val, isSet: true} } func (v NullableNatGatewayProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGatewayProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway_put.go000066400000000000000000000133601465267054300246020ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NatGatewayPut struct for NatGatewayPut type NatGatewayPut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *NatGatewayProperties `json:"properties"` } // NewNatGatewayPut instantiates a new NatGatewayPut object // This constructor will assign default values to properties that have it defined, // 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 NewNatGatewayPut(properties NatGatewayProperties) *NatGatewayPut { this := NatGatewayPut{} this.Properties = &properties return &this } // NewNatGatewayPutWithDefaults instantiates a new NatGatewayPut object // This 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 NewNatGatewayPutWithDefaults() *NatGatewayPut { this := NatGatewayPut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NatGatewayPut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NatGatewayPut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NatGatewayPut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NatGatewayPut) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NatGatewayPut) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NatGatewayPut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NatGatewayPut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NatGatewayPut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NatGatewayPut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *NatGatewayPut) GetProperties() *NatGatewayProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayPut) GetPropertiesOk() (*NatGatewayProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *NatGatewayPut) SetProperties(v NatGatewayProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *NatGatewayPut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o NatGatewayPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableNatGatewayPut struct { value *NatGatewayPut isSet bool } func (v NullableNatGatewayPut) Get() *NatGatewayPut { return v.value } func (v *NullableNatGatewayPut) Set(val *NatGatewayPut) { v.value = val v.isSet = true } func (v NullableNatGatewayPut) IsSet() bool { return v.isSet } func (v *NullableNatGatewayPut) Unset() { v.value = nil v.isSet = false } func NewNullableNatGatewayPut(val *NatGatewayPut) *NullableNatGatewayPut { return &NullableNatGatewayPut{value: val, isSet: true} } func (v NullableNatGatewayPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGatewayPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway_rule.go000066400000000000000000000154151465267054300247440ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NatGatewayRule struct for NatGatewayRule type NatGatewayRule struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *NatGatewayRuleProperties `json:"properties"` } // NewNatGatewayRule instantiates a new NatGatewayRule object // This constructor will assign default values to properties that have it defined, // 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 NewNatGatewayRule(properties NatGatewayRuleProperties) *NatGatewayRule { this := NatGatewayRule{} this.Properties = &properties return &this } // NewNatGatewayRuleWithDefaults instantiates a new NatGatewayRule object // This 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 NewNatGatewayRuleWithDefaults() *NatGatewayRule { this := NatGatewayRule{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NatGatewayRule) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRule) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NatGatewayRule) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NatGatewayRule) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NatGatewayRule) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRule) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NatGatewayRule) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NatGatewayRule) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NatGatewayRule) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRule) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NatGatewayRule) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NatGatewayRule) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *NatGatewayRule) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *NatGatewayRule) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *NatGatewayRule) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *NatGatewayRule) GetProperties() *NatGatewayRuleProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRule) GetPropertiesOk() (*NatGatewayRuleProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *NatGatewayRule) SetProperties(v NatGatewayRuleProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *NatGatewayRule) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o NatGatewayRule) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableNatGatewayRule struct { value *NatGatewayRule isSet bool } func (v NullableNatGatewayRule) Get() *NatGatewayRule { return v.value } func (v *NullableNatGatewayRule) Set(val *NatGatewayRule) { v.value = val v.isSet = true } func (v NullableNatGatewayRule) IsSet() bool { return v.isSet } func (v *NullableNatGatewayRule) Unset() { v.value = nil v.isSet = false } func NewNullableNatGatewayRule(val *NatGatewayRule) *NullableNatGatewayRule { return &NullableNatGatewayRule{value: val, isSet: true} } func (v NullableNatGatewayRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGatewayRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway_rule_properties.go000066400000000000000000000241711465267054300272170ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NatGatewayRuleProperties struct for NatGatewayRuleProperties type NatGatewayRuleProperties struct { // The name of the NAT Gateway rule. Name *string `json:"name"` // Type of the NAT Gateway rule. Type *NatGatewayRuleType `json:"type,omitempty"` // Protocol of the NAT Gateway rule. Defaults to ALL. If protocol is 'ICMP' then targetPortRange start and end cannot be set. Protocol *NatGatewayRuleProtocol `json:"protocol,omitempty"` // Source subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets source IP address. SourceSubnet *string `json:"sourceSubnet"` // Public IP address of the NAT Gateway rule. Specifies the address used for masking outgoing packets source address field. Should be one of the customer reserved IP address already configured on the NAT Gateway resource PublicIp *string `json:"publicIp"` // Target or destination subnet of the NAT Gateway rule. For SNAT rules it specifies which packets this translation rule applies to based on the packets destination IP address. If none is provided, rule will match any address. TargetSubnet *string `json:"targetSubnet,omitempty"` TargetPortRange *TargetPortRange `json:"targetPortRange,omitempty"` } // NewNatGatewayRuleProperties instantiates a new NatGatewayRuleProperties object // This constructor will assign default values to properties that have it defined, // 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 NewNatGatewayRuleProperties(name string, sourceSubnet string, publicIp string) *NatGatewayRuleProperties { this := NatGatewayRuleProperties{} this.Name = &name this.SourceSubnet = &sourceSubnet this.PublicIp = &publicIp return &this } // NewNatGatewayRulePropertiesWithDefaults instantiates a new NatGatewayRuleProperties object // This 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 NewNatGatewayRulePropertiesWithDefaults() *NatGatewayRuleProperties { this := NatGatewayRuleProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *NatGatewayRuleProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRuleProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *NatGatewayRuleProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *NatGatewayRuleProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NatGatewayRuleProperties) GetType() *NatGatewayRuleType { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRuleProperties) GetTypeOk() (*NatGatewayRuleType, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NatGatewayRuleProperties) SetType(v NatGatewayRuleType) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NatGatewayRuleProperties) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetProtocol returns the Protocol field value // If the value is explicit nil, nil is returned func (o *NatGatewayRuleProperties) GetProtocol() *NatGatewayRuleProtocol { if o == nil { return nil } return o.Protocol } // GetProtocolOk returns a tuple with the Protocol field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRuleProperties) GetProtocolOk() (*NatGatewayRuleProtocol, bool) { if o == nil { return nil, false } return o.Protocol, true } // SetProtocol sets field value func (o *NatGatewayRuleProperties) SetProtocol(v NatGatewayRuleProtocol) { o.Protocol = &v } // HasProtocol returns a boolean if a field has been set. func (o *NatGatewayRuleProperties) HasProtocol() bool { if o != nil && o.Protocol != nil { return true } return false } // GetSourceSubnet returns the SourceSubnet field value // If the value is explicit nil, nil is returned func (o *NatGatewayRuleProperties) GetSourceSubnet() *string { if o == nil { return nil } return o.SourceSubnet } // GetSourceSubnetOk returns a tuple with the SourceSubnet field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRuleProperties) GetSourceSubnetOk() (*string, bool) { if o == nil { return nil, false } return o.SourceSubnet, true } // SetSourceSubnet sets field value func (o *NatGatewayRuleProperties) SetSourceSubnet(v string) { o.SourceSubnet = &v } // HasSourceSubnet returns a boolean if a field has been set. func (o *NatGatewayRuleProperties) HasSourceSubnet() bool { if o != nil && o.SourceSubnet != nil { return true } return false } // GetPublicIp returns the PublicIp field value // If the value is explicit nil, nil is returned func (o *NatGatewayRuleProperties) GetPublicIp() *string { if o == nil { return nil } return o.PublicIp } // GetPublicIpOk returns a tuple with the PublicIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRuleProperties) GetPublicIpOk() (*string, bool) { if o == nil { return nil, false } return o.PublicIp, true } // SetPublicIp sets field value func (o *NatGatewayRuleProperties) SetPublicIp(v string) { o.PublicIp = &v } // HasPublicIp returns a boolean if a field has been set. func (o *NatGatewayRuleProperties) HasPublicIp() bool { if o != nil && o.PublicIp != nil { return true } return false } // GetTargetSubnet returns the TargetSubnet field value // If the value is explicit nil, nil is returned func (o *NatGatewayRuleProperties) GetTargetSubnet() *string { if o == nil { return nil } return o.TargetSubnet } // GetTargetSubnetOk returns a tuple with the TargetSubnet field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRuleProperties) GetTargetSubnetOk() (*string, bool) { if o == nil { return nil, false } return o.TargetSubnet, true } // SetTargetSubnet sets field value func (o *NatGatewayRuleProperties) SetTargetSubnet(v string) { o.TargetSubnet = &v } // HasTargetSubnet returns a boolean if a field has been set. func (o *NatGatewayRuleProperties) HasTargetSubnet() bool { if o != nil && o.TargetSubnet != nil { return true } return false } // GetTargetPortRange returns the TargetPortRange field value // If the value is explicit nil, nil is returned func (o *NatGatewayRuleProperties) GetTargetPortRange() *TargetPortRange { if o == nil { return nil } return o.TargetPortRange } // GetTargetPortRangeOk returns a tuple with the TargetPortRange field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRuleProperties) GetTargetPortRangeOk() (*TargetPortRange, bool) { if o == nil { return nil, false } return o.TargetPortRange, true } // SetTargetPortRange sets field value func (o *NatGatewayRuleProperties) SetTargetPortRange(v TargetPortRange) { o.TargetPortRange = &v } // HasTargetPortRange returns a boolean if a field has been set. func (o *NatGatewayRuleProperties) HasTargetPortRange() bool { if o != nil && o.TargetPortRange != nil { return true } return false } func (o NatGatewayRuleProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Type != nil { toSerialize["type"] = o.Type } if o.Protocol != nil { toSerialize["protocol"] = o.Protocol } if o.SourceSubnet != nil { toSerialize["sourceSubnet"] = o.SourceSubnet } if o.PublicIp != nil { toSerialize["publicIp"] = o.PublicIp } if o.TargetSubnet != nil { toSerialize["targetSubnet"] = o.TargetSubnet } if o.TargetPortRange != nil { toSerialize["targetPortRange"] = o.TargetPortRange } return json.Marshal(toSerialize) } type NullableNatGatewayRuleProperties struct { value *NatGatewayRuleProperties isSet bool } func (v NullableNatGatewayRuleProperties) Get() *NatGatewayRuleProperties { return v.value } func (v *NullableNatGatewayRuleProperties) Set(val *NatGatewayRuleProperties) { v.value = val v.isSet = true } func (v NullableNatGatewayRuleProperties) IsSet() bool { return v.isSet } func (v *NullableNatGatewayRuleProperties) Unset() { v.value = nil v.isSet = false } func NewNullableNatGatewayRuleProperties(val *NatGatewayRuleProperties) *NullableNatGatewayRuleProperties { return &NullableNatGatewayRuleProperties{value: val, isSet: true} } func (v NullableNatGatewayRuleProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGatewayRuleProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway_rule_protocol.go000066400000000000000000000044361465267054300266660ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" "fmt" ) // NatGatewayRuleProtocol the model 'NatGatewayRuleProtocol' type NatGatewayRuleProtocol string // List of NatGatewayRuleProtocol const ( TCP NatGatewayRuleProtocol = "TCP" UDP NatGatewayRuleProtocol = "UDP" ICMP NatGatewayRuleProtocol = "ICMP" ALL NatGatewayRuleProtocol = "ALL" ) func (v *NatGatewayRuleProtocol) UnmarshalJSON(src []byte) error { var value string err := json.Unmarshal(src, &value) if err != nil { return err } enumTypeValue := NatGatewayRuleProtocol(value) for _, existing := range []NatGatewayRuleProtocol{"TCP", "UDP", "ICMP", "ALL"} { if existing == enumTypeValue { *v = enumTypeValue return nil } } return fmt.Errorf("%+v is not a valid NatGatewayRuleProtocol", value) } // Ptr returns reference to NatGatewayRuleProtocol value func (v NatGatewayRuleProtocol) Ptr() *NatGatewayRuleProtocol { return &v } type NullableNatGatewayRuleProtocol struct { value *NatGatewayRuleProtocol isSet bool } func (v NullableNatGatewayRuleProtocol) Get() *NatGatewayRuleProtocol { return v.value } func (v *NullableNatGatewayRuleProtocol) Set(val *NatGatewayRuleProtocol) { v.value = val v.isSet = true } func (v NullableNatGatewayRuleProtocol) IsSet() bool { return v.isSet } func (v *NullableNatGatewayRuleProtocol) Unset() { v.value = nil v.isSet = false } func NewNullableNatGatewayRuleProtocol(val *NatGatewayRuleProtocol) *NullableNatGatewayRuleProtocol { return &NullableNatGatewayRuleProtocol{value: val, isSet: true} } func (v NullableNatGatewayRuleProtocol) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGatewayRuleProtocol) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway_rule_put.go000066400000000000000000000136701465267054300256350ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NatGatewayRulePut struct for NatGatewayRulePut type NatGatewayRulePut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *NatGatewayRuleProperties `json:"properties"` } // NewNatGatewayRulePut instantiates a new NatGatewayRulePut object // This constructor will assign default values to properties that have it defined, // 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 NewNatGatewayRulePut(properties NatGatewayRuleProperties) *NatGatewayRulePut { this := NatGatewayRulePut{} this.Properties = &properties return &this } // NewNatGatewayRulePutWithDefaults instantiates a new NatGatewayRulePut object // This 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 NewNatGatewayRulePutWithDefaults() *NatGatewayRulePut { this := NatGatewayRulePut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NatGatewayRulePut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRulePut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NatGatewayRulePut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NatGatewayRulePut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NatGatewayRulePut) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRulePut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NatGatewayRulePut) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NatGatewayRulePut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NatGatewayRulePut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRulePut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NatGatewayRulePut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NatGatewayRulePut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *NatGatewayRulePut) GetProperties() *NatGatewayRuleProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRulePut) GetPropertiesOk() (*NatGatewayRuleProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *NatGatewayRulePut) SetProperties(v NatGatewayRuleProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *NatGatewayRulePut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o NatGatewayRulePut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableNatGatewayRulePut struct { value *NatGatewayRulePut isSet bool } func (v NullableNatGatewayRulePut) Get() *NatGatewayRulePut { return v.value } func (v *NullableNatGatewayRulePut) Set(val *NatGatewayRulePut) { v.value = val v.isSet = true } func (v NullableNatGatewayRulePut) IsSet() bool { return v.isSet } func (v *NullableNatGatewayRulePut) Unset() { v.value = nil v.isSet = false } func NewNullableNatGatewayRulePut(val *NatGatewayRulePut) *NullableNatGatewayRulePut { return &NullableNatGatewayRulePut{value: val, isSet: true} } func (v NullableNatGatewayRulePut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGatewayRulePut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway_rule_type.go000066400000000000000000000040621465267054300260010ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" "fmt" ) // NatGatewayRuleType the model 'NatGatewayRuleType' type NatGatewayRuleType string // List of NatGatewayRuleType const ( SNAT NatGatewayRuleType = "SNAT" ) func (v *NatGatewayRuleType) UnmarshalJSON(src []byte) error { var value string err := json.Unmarshal(src, &value) if err != nil { return err } enumTypeValue := NatGatewayRuleType(value) for _, existing := range []NatGatewayRuleType{"SNAT"} { if existing == enumTypeValue { *v = enumTypeValue return nil } } return fmt.Errorf("%+v is not a valid NatGatewayRuleType", value) } // Ptr returns reference to NatGatewayRuleType value func (v NatGatewayRuleType) Ptr() *NatGatewayRuleType { return &v } type NullableNatGatewayRuleType struct { value *NatGatewayRuleType isSet bool } func (v NullableNatGatewayRuleType) Get() *NatGatewayRuleType { return v.value } func (v *NullableNatGatewayRuleType) Set(val *NatGatewayRuleType) { v.value = val v.isSet = true } func (v NullableNatGatewayRuleType) IsSet() bool { return v.isSet } func (v *NullableNatGatewayRuleType) Unset() { v.value = nil v.isSet = false } func NewNullableNatGatewayRuleType(val *NatGatewayRuleType) *NullableNatGatewayRuleType { return &NullableNatGatewayRuleType{value: val, isSet: true} } func (v NullableNatGatewayRuleType) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGatewayRuleType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateway_rules.go000066400000000000000000000132661465267054300251310ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NatGatewayRules struct for NatGatewayRules type NatGatewayRules struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]NatGatewayRule `json:"items,omitempty"` } // NewNatGatewayRules instantiates a new NatGatewayRules object // This constructor will assign default values to properties that have it defined, // 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 NewNatGatewayRules() *NatGatewayRules { this := NatGatewayRules{} return &this } // NewNatGatewayRulesWithDefaults instantiates a new NatGatewayRules object // This 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 NewNatGatewayRulesWithDefaults() *NatGatewayRules { this := NatGatewayRules{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NatGatewayRules) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRules) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NatGatewayRules) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NatGatewayRules) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NatGatewayRules) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRules) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NatGatewayRules) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NatGatewayRules) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NatGatewayRules) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRules) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NatGatewayRules) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NatGatewayRules) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *NatGatewayRules) GetItems() *[]NatGatewayRule { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGatewayRules) GetItemsOk() (*[]NatGatewayRule, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *NatGatewayRules) SetItems(v []NatGatewayRule) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *NatGatewayRules) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o NatGatewayRules) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableNatGatewayRules struct { value *NatGatewayRules isSet bool } func (v NullableNatGatewayRules) Get() *NatGatewayRules { return v.value } func (v *NullableNatGatewayRules) Set(val *NatGatewayRules) { v.value = val v.isSet = true } func (v NullableNatGatewayRules) IsSet() bool { return v.isSet } func (v *NullableNatGatewayRules) Unset() { v.value = nil v.isSet = false } func NewNullableNatGatewayRules(val *NatGatewayRules) *NullableNatGatewayRules { return &NullableNatGatewayRules{value: val, isSet: true} } func (v NullableNatGatewayRules) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGatewayRules) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nat_gateways.go000066400000000000000000000201461465267054300240750ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NatGateways struct for NatGateways type NatGateways struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]NatGateway `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewNatGateways instantiates a new NatGateways object // This constructor will assign default values to properties that have it defined, // 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 NewNatGateways() *NatGateways { this := NatGateways{} return &this } // NewNatGatewaysWithDefaults instantiates a new NatGateways object // This 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 NewNatGatewaysWithDefaults() *NatGateways { this := NatGateways{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NatGateways) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateways) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NatGateways) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NatGateways) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NatGateways) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateways) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NatGateways) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NatGateways) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NatGateways) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateways) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NatGateways) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NatGateways) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *NatGateways) GetItems() *[]NatGateway { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateways) GetItemsOk() (*[]NatGateway, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *NatGateways) SetItems(v []NatGateway) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *NatGateways) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *NatGateways) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateways) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *NatGateways) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *NatGateways) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *NatGateways) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateways) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *NatGateways) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *NatGateways) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *NatGateways) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NatGateways) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *NatGateways) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *NatGateways) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o NatGateways) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableNatGateways struct { value *NatGateways isSet bool } func (v NullableNatGateways) Get() *NatGateways { return v.value } func (v *NullableNatGateways) Set(val *NatGateways) { v.value = val v.isSet = true } func (v NullableNatGateways) IsSet() bool { return v.isSet } func (v *NullableNatGateways) Unset() { v.value = nil v.isSet = false } func NewNullableNatGateways(val *NatGateways) *NullableNatGateways { return &NullableNatGateways{value: val, isSet: true} } func (v NullableNatGateways) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNatGateways) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancer.go000066400000000000000000000200221465267054300257170ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancer struct for NetworkLoadBalancer type NetworkLoadBalancer struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *NetworkLoadBalancerProperties `json:"properties"` Entities *NetworkLoadBalancerEntities `json:"entities,omitempty"` } // NewNetworkLoadBalancer instantiates a new NetworkLoadBalancer object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancer(properties NetworkLoadBalancerProperties) *NetworkLoadBalancer { this := NetworkLoadBalancer{} this.Properties = &properties return &this } // NewNetworkLoadBalancerWithDefaults instantiates a new NetworkLoadBalancer object // This 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 NewNetworkLoadBalancerWithDefaults() *NetworkLoadBalancer { this := NetworkLoadBalancer{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancer) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancer) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NetworkLoadBalancer) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NetworkLoadBalancer) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancer) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancer) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NetworkLoadBalancer) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NetworkLoadBalancer) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancer) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancer) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NetworkLoadBalancer) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NetworkLoadBalancer) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancer) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancer) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *NetworkLoadBalancer) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *NetworkLoadBalancer) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancer) GetProperties() *NetworkLoadBalancerProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancer) GetPropertiesOk() (*NetworkLoadBalancerProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *NetworkLoadBalancer) SetProperties(v NetworkLoadBalancerProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *NetworkLoadBalancer) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancer) GetEntities() *NetworkLoadBalancerEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancer) GetEntitiesOk() (*NetworkLoadBalancerEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *NetworkLoadBalancer) SetEntities(v NetworkLoadBalancerEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *NetworkLoadBalancer) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o NetworkLoadBalancer) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancer struct { value *NetworkLoadBalancer isSet bool } func (v NullableNetworkLoadBalancer) Get() *NetworkLoadBalancer { return v.value } func (v *NullableNetworkLoadBalancer) Set(val *NetworkLoadBalancer) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancer) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancer) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancer(val *NetworkLoadBalancer) *NullableNetworkLoadBalancer { return &NullableNetworkLoadBalancer{value: val, isSet: true} } func (v NullableNetworkLoadBalancer) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancer_entities.go000066400000000000000000000113351465267054300276320ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancerEntities struct for NetworkLoadBalancerEntities type NetworkLoadBalancerEntities struct { Flowlogs *FlowLogs `json:"flowlogs,omitempty"` Forwardingrules *NetworkLoadBalancerForwardingRules `json:"forwardingrules,omitempty"` } // NewNetworkLoadBalancerEntities instantiates a new NetworkLoadBalancerEntities object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancerEntities() *NetworkLoadBalancerEntities { this := NetworkLoadBalancerEntities{} return &this } // NewNetworkLoadBalancerEntitiesWithDefaults instantiates a new NetworkLoadBalancerEntities object // This 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 NewNetworkLoadBalancerEntitiesWithDefaults() *NetworkLoadBalancerEntities { this := NetworkLoadBalancerEntities{} return &this } // GetFlowlogs returns the Flowlogs field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerEntities) GetFlowlogs() *FlowLogs { if o == nil { return nil } return o.Flowlogs } // GetFlowlogsOk returns a tuple with the Flowlogs field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerEntities) GetFlowlogsOk() (*FlowLogs, bool) { if o == nil { return nil, false } return o.Flowlogs, true } // SetFlowlogs sets field value func (o *NetworkLoadBalancerEntities) SetFlowlogs(v FlowLogs) { o.Flowlogs = &v } // HasFlowlogs returns a boolean if a field has been set. func (o *NetworkLoadBalancerEntities) HasFlowlogs() bool { if o != nil && o.Flowlogs != nil { return true } return false } // GetForwardingrules returns the Forwardingrules field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerEntities) GetForwardingrules() *NetworkLoadBalancerForwardingRules { if o == nil { return nil } return o.Forwardingrules } // GetForwardingrulesOk returns a tuple with the Forwardingrules field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerEntities) GetForwardingrulesOk() (*NetworkLoadBalancerForwardingRules, bool) { if o == nil { return nil, false } return o.Forwardingrules, true } // SetForwardingrules sets field value func (o *NetworkLoadBalancerEntities) SetForwardingrules(v NetworkLoadBalancerForwardingRules) { o.Forwardingrules = &v } // HasForwardingrules returns a boolean if a field has been set. func (o *NetworkLoadBalancerEntities) HasForwardingrules() bool { if o != nil && o.Forwardingrules != nil { return true } return false } func (o NetworkLoadBalancerEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Flowlogs != nil { toSerialize["flowlogs"] = o.Flowlogs } if o.Forwardingrules != nil { toSerialize["forwardingrules"] = o.Forwardingrules } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancerEntities struct { value *NetworkLoadBalancerEntities isSet bool } func (v NullableNetworkLoadBalancerEntities) Get() *NetworkLoadBalancerEntities { return v.value } func (v *NullableNetworkLoadBalancerEntities) Set(val *NetworkLoadBalancerEntities) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancerEntities) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancerEntities) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancerEntities(val *NetworkLoadBalancerEntities) *NullableNetworkLoadBalancerEntities { return &NullableNetworkLoadBalancerEntities{value: val, isSet: true} } func (v NullableNetworkLoadBalancerEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancerEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancer_forwarding_rule.go000066400000000000000000000174371465267054300312100ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancerForwardingRule struct for NetworkLoadBalancerForwardingRule type NetworkLoadBalancerForwardingRule struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *NetworkLoadBalancerForwardingRuleProperties `json:"properties"` } // NewNetworkLoadBalancerForwardingRule instantiates a new NetworkLoadBalancerForwardingRule object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancerForwardingRule(properties NetworkLoadBalancerForwardingRuleProperties) *NetworkLoadBalancerForwardingRule { this := NetworkLoadBalancerForwardingRule{} this.Properties = &properties return &this } // NewNetworkLoadBalancerForwardingRuleWithDefaults instantiates a new NetworkLoadBalancerForwardingRule object // This 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 NewNetworkLoadBalancerForwardingRuleWithDefaults() *NetworkLoadBalancerForwardingRule { this := NetworkLoadBalancerForwardingRule{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRule) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRule) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NetworkLoadBalancerForwardingRule) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRule) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRule) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRule) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NetworkLoadBalancerForwardingRule) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRule) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRule) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRule) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NetworkLoadBalancerForwardingRule) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRule) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRule) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRule) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *NetworkLoadBalancerForwardingRule) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRule) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRule) GetProperties() *NetworkLoadBalancerForwardingRuleProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRule) GetPropertiesOk() (*NetworkLoadBalancerForwardingRuleProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *NetworkLoadBalancerForwardingRule) SetProperties(v NetworkLoadBalancerForwardingRuleProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRule) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o NetworkLoadBalancerForwardingRule) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancerForwardingRule struct { value *NetworkLoadBalancerForwardingRule isSet bool } func (v NullableNetworkLoadBalancerForwardingRule) Get() *NetworkLoadBalancerForwardingRule { return v.value } func (v *NullableNetworkLoadBalancerForwardingRule) Set(val *NetworkLoadBalancerForwardingRule) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancerForwardingRule) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancerForwardingRule) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancerForwardingRule(val *NetworkLoadBalancerForwardingRule) *NullableNetworkLoadBalancerForwardingRule { return &NullableNetworkLoadBalancerForwardingRule{value: val, isSet: true} } func (v NullableNetworkLoadBalancerForwardingRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancerForwardingRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancer_forwarding_rule_health_check.go000066400000000000000000000174571465267054300336740ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancerForwardingRuleHealthCheck struct for NetworkLoadBalancerForwardingRuleHealthCheck type NetworkLoadBalancerForwardingRuleHealthCheck struct { // The maximum time in milliseconds to wait for the client to acknowledge or send data; default is 50,000 (50 seconds). ClientTimeout *int32 `json:"clientTimeout,omitempty"` // The maximum time in milliseconds to wait for a connection attempt to a target to succeed; default is 5000 (five seconds). ConnectTimeout *int32 `json:"connectTimeout,omitempty"` // The maximum time in milliseconds that a target can remain inactive; default is 50,000 (50 seconds). TargetTimeout *int32 `json:"targetTimeout,omitempty"` // The maximum number of attempts to reconnect to a target after a connection failure. Valid range is 0 to 65535 and default is three reconnection attempts. Retries *int32 `json:"retries,omitempty"` } // NewNetworkLoadBalancerForwardingRuleHealthCheck instantiates a new NetworkLoadBalancerForwardingRuleHealthCheck object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancerForwardingRuleHealthCheck() *NetworkLoadBalancerForwardingRuleHealthCheck { this := NetworkLoadBalancerForwardingRuleHealthCheck{} return &this } // NewNetworkLoadBalancerForwardingRuleHealthCheckWithDefaults instantiates a new NetworkLoadBalancerForwardingRuleHealthCheck object // This 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 NewNetworkLoadBalancerForwardingRuleHealthCheckWithDefaults() *NetworkLoadBalancerForwardingRuleHealthCheck { this := NetworkLoadBalancerForwardingRuleHealthCheck{} return &this } // GetClientTimeout returns the ClientTimeout field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetClientTimeout() *int32 { if o == nil { return nil } return o.ClientTimeout } // GetClientTimeoutOk returns a tuple with the ClientTimeout field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetClientTimeoutOk() (*int32, bool) { if o == nil { return nil, false } return o.ClientTimeout, true } // SetClientTimeout sets field value func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetClientTimeout(v int32) { o.ClientTimeout = &v } // HasClientTimeout returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasClientTimeout() bool { if o != nil && o.ClientTimeout != nil { return true } return false } // GetConnectTimeout returns the ConnectTimeout field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetConnectTimeout() *int32 { if o == nil { return nil } return o.ConnectTimeout } // GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetConnectTimeoutOk() (*int32, bool) { if o == nil { return nil, false } return o.ConnectTimeout, true } // SetConnectTimeout sets field value func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetConnectTimeout(v int32) { o.ConnectTimeout = &v } // HasConnectTimeout returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasConnectTimeout() bool { if o != nil && o.ConnectTimeout != nil { return true } return false } // GetTargetTimeout returns the TargetTimeout field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetTargetTimeout() *int32 { if o == nil { return nil } return o.TargetTimeout } // GetTargetTimeoutOk returns a tuple with the TargetTimeout field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetTargetTimeoutOk() (*int32, bool) { if o == nil { return nil, false } return o.TargetTimeout, true } // SetTargetTimeout sets field value func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetTargetTimeout(v int32) { o.TargetTimeout = &v } // HasTargetTimeout returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasTargetTimeout() bool { if o != nil && o.TargetTimeout != nil { return true } return false } // GetRetries returns the Retries field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetRetries() *int32 { if o == nil { return nil } return o.Retries } // GetRetriesOk returns a tuple with the Retries field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleHealthCheck) GetRetriesOk() (*int32, bool) { if o == nil { return nil, false } return o.Retries, true } // SetRetries sets field value func (o *NetworkLoadBalancerForwardingRuleHealthCheck) SetRetries(v int32) { o.Retries = &v } // HasRetries returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleHealthCheck) HasRetries() bool { if o != nil && o.Retries != nil { return true } return false } func (o NetworkLoadBalancerForwardingRuleHealthCheck) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ClientTimeout != nil { toSerialize["clientTimeout"] = o.ClientTimeout } if o.ConnectTimeout != nil { toSerialize["connectTimeout"] = o.ConnectTimeout } if o.TargetTimeout != nil { toSerialize["targetTimeout"] = o.TargetTimeout } if o.Retries != nil { toSerialize["retries"] = o.Retries } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancerForwardingRuleHealthCheck struct { value *NetworkLoadBalancerForwardingRuleHealthCheck isSet bool } func (v NullableNetworkLoadBalancerForwardingRuleHealthCheck) Get() *NetworkLoadBalancerForwardingRuleHealthCheck { return v.value } func (v *NullableNetworkLoadBalancerForwardingRuleHealthCheck) Set(val *NetworkLoadBalancerForwardingRuleHealthCheck) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancerForwardingRuleHealthCheck) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancerForwardingRuleHealthCheck) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancerForwardingRuleHealthCheck(val *NetworkLoadBalancerForwardingRuleHealthCheck) *NullableNetworkLoadBalancerForwardingRuleHealthCheck { return &NullableNetworkLoadBalancerForwardingRuleHealthCheck{value: val, isSet: true} } func (v NullableNetworkLoadBalancerForwardingRuleHealthCheck) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancerForwardingRuleHealthCheck) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancer_forwarding_rule_properties.go000066400000000000000000000255661465267054300334660ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancerForwardingRuleProperties struct for NetworkLoadBalancerForwardingRuleProperties type NetworkLoadBalancerForwardingRuleProperties struct { // The name of the Network Load Balancer forwarding rule. Name *string `json:"name"` // Balancing algorithm Algorithm *string `json:"algorithm"` // Balancing protocol Protocol *string `json:"protocol"` // Listening (inbound) IP. ListenerIp *string `json:"listenerIp"` // Listening (inbound) port number; valid range is 1 to 65535. ListenerPort *int32 `json:"listenerPort"` HealthCheck *NetworkLoadBalancerForwardingRuleHealthCheck `json:"healthCheck,omitempty"` // Array of items in the collection. Targets *[]NetworkLoadBalancerForwardingRuleTarget `json:"targets"` } // NewNetworkLoadBalancerForwardingRuleProperties instantiates a new NetworkLoadBalancerForwardingRuleProperties object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancerForwardingRuleProperties(name string, algorithm string, protocol string, listenerIp string, listenerPort int32, targets []NetworkLoadBalancerForwardingRuleTarget) *NetworkLoadBalancerForwardingRuleProperties { this := NetworkLoadBalancerForwardingRuleProperties{} this.Name = &name this.Algorithm = &algorithm this.Protocol = &protocol this.ListenerIp = &listenerIp this.ListenerPort = &listenerPort this.Targets = &targets return &this } // NewNetworkLoadBalancerForwardingRulePropertiesWithDefaults instantiates a new NetworkLoadBalancerForwardingRuleProperties object // This 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 NewNetworkLoadBalancerForwardingRulePropertiesWithDefaults() *NetworkLoadBalancerForwardingRuleProperties { this := NetworkLoadBalancerForwardingRuleProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *NetworkLoadBalancerForwardingRuleProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetAlgorithm returns the Algorithm field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetAlgorithm() *string { if o == nil { return nil } return o.Algorithm } // GetAlgorithmOk returns a tuple with the Algorithm field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetAlgorithmOk() (*string, bool) { if o == nil { return nil, false } return o.Algorithm, true } // SetAlgorithm sets field value func (o *NetworkLoadBalancerForwardingRuleProperties) SetAlgorithm(v string) { o.Algorithm = &v } // HasAlgorithm returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleProperties) HasAlgorithm() bool { if o != nil && o.Algorithm != nil { return true } return false } // GetProtocol returns the Protocol field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetProtocol() *string { if o == nil { return nil } return o.Protocol } // GetProtocolOk returns a tuple with the Protocol field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetProtocolOk() (*string, bool) { if o == nil { return nil, false } return o.Protocol, true } // SetProtocol sets field value func (o *NetworkLoadBalancerForwardingRuleProperties) SetProtocol(v string) { o.Protocol = &v } // HasProtocol returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleProperties) HasProtocol() bool { if o != nil && o.Protocol != nil { return true } return false } // GetListenerIp returns the ListenerIp field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetListenerIp() *string { if o == nil { return nil } return o.ListenerIp } // GetListenerIpOk returns a tuple with the ListenerIp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetListenerIpOk() (*string, bool) { if o == nil { return nil, false } return o.ListenerIp, true } // SetListenerIp sets field value func (o *NetworkLoadBalancerForwardingRuleProperties) SetListenerIp(v string) { o.ListenerIp = &v } // HasListenerIp returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleProperties) HasListenerIp() bool { if o != nil && o.ListenerIp != nil { return true } return false } // GetListenerPort returns the ListenerPort field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetListenerPort() *int32 { if o == nil { return nil } return o.ListenerPort } // GetListenerPortOk returns a tuple with the ListenerPort field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetListenerPortOk() (*int32, bool) { if o == nil { return nil, false } return o.ListenerPort, true } // SetListenerPort sets field value func (o *NetworkLoadBalancerForwardingRuleProperties) SetListenerPort(v int32) { o.ListenerPort = &v } // HasListenerPort returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleProperties) HasListenerPort() bool { if o != nil && o.ListenerPort != nil { return true } return false } // GetHealthCheck returns the HealthCheck field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetHealthCheck() *NetworkLoadBalancerForwardingRuleHealthCheck { if o == nil { return nil } return o.HealthCheck } // GetHealthCheckOk returns a tuple with the HealthCheck field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetHealthCheckOk() (*NetworkLoadBalancerForwardingRuleHealthCheck, bool) { if o == nil { return nil, false } return o.HealthCheck, true } // SetHealthCheck sets field value func (o *NetworkLoadBalancerForwardingRuleProperties) SetHealthCheck(v NetworkLoadBalancerForwardingRuleHealthCheck) { o.HealthCheck = &v } // HasHealthCheck returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleProperties) HasHealthCheck() bool { if o != nil && o.HealthCheck != nil { return true } return false } // GetTargets returns the Targets field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetTargets() *[]NetworkLoadBalancerForwardingRuleTarget { if o == nil { return nil } return o.Targets } // GetTargetsOk returns a tuple with the Targets field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleProperties) GetTargetsOk() (*[]NetworkLoadBalancerForwardingRuleTarget, bool) { if o == nil { return nil, false } return o.Targets, true } // SetTargets sets field value func (o *NetworkLoadBalancerForwardingRuleProperties) SetTargets(v []NetworkLoadBalancerForwardingRuleTarget) { o.Targets = &v } // HasTargets returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleProperties) HasTargets() bool { if o != nil && o.Targets != nil { return true } return false } func (o NetworkLoadBalancerForwardingRuleProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Algorithm != nil { toSerialize["algorithm"] = o.Algorithm } if o.Protocol != nil { toSerialize["protocol"] = o.Protocol } if o.ListenerIp != nil { toSerialize["listenerIp"] = o.ListenerIp } if o.ListenerPort != nil { toSerialize["listenerPort"] = o.ListenerPort } if o.HealthCheck != nil { toSerialize["healthCheck"] = o.HealthCheck } if o.Targets != nil { toSerialize["targets"] = o.Targets } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancerForwardingRuleProperties struct { value *NetworkLoadBalancerForwardingRuleProperties isSet bool } func (v NullableNetworkLoadBalancerForwardingRuleProperties) Get() *NetworkLoadBalancerForwardingRuleProperties { return v.value } func (v *NullableNetworkLoadBalancerForwardingRuleProperties) Set(val *NetworkLoadBalancerForwardingRuleProperties) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancerForwardingRuleProperties) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancerForwardingRuleProperties) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancerForwardingRuleProperties(val *NetworkLoadBalancerForwardingRuleProperties) *NullableNetworkLoadBalancerForwardingRuleProperties { return &NullableNetworkLoadBalancerForwardingRuleProperties{value: val, isSet: true} } func (v NullableNetworkLoadBalancerForwardingRuleProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancerForwardingRuleProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancer_forwarding_rule_put.go000066400000000000000000000155561465267054300321000ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancerForwardingRulePut struct for NetworkLoadBalancerForwardingRulePut type NetworkLoadBalancerForwardingRulePut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *NetworkLoadBalancerForwardingRuleProperties `json:"properties"` } // NewNetworkLoadBalancerForwardingRulePut instantiates a new NetworkLoadBalancerForwardingRulePut object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancerForwardingRulePut(properties NetworkLoadBalancerForwardingRuleProperties) *NetworkLoadBalancerForwardingRulePut { this := NetworkLoadBalancerForwardingRulePut{} this.Properties = &properties return &this } // NewNetworkLoadBalancerForwardingRulePutWithDefaults instantiates a new NetworkLoadBalancerForwardingRulePut object // This 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 NewNetworkLoadBalancerForwardingRulePutWithDefaults() *NetworkLoadBalancerForwardingRulePut { this := NetworkLoadBalancerForwardingRulePut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRulePut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRulePut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NetworkLoadBalancerForwardingRulePut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRulePut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRulePut) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRulePut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NetworkLoadBalancerForwardingRulePut) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRulePut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRulePut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRulePut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NetworkLoadBalancerForwardingRulePut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRulePut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRulePut) GetProperties() *NetworkLoadBalancerForwardingRuleProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRulePut) GetPropertiesOk() (*NetworkLoadBalancerForwardingRuleProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *NetworkLoadBalancerForwardingRulePut) SetProperties(v NetworkLoadBalancerForwardingRuleProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRulePut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o NetworkLoadBalancerForwardingRulePut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancerForwardingRulePut struct { value *NetworkLoadBalancerForwardingRulePut isSet bool } func (v NullableNetworkLoadBalancerForwardingRulePut) Get() *NetworkLoadBalancerForwardingRulePut { return v.value } func (v *NullableNetworkLoadBalancerForwardingRulePut) Set(val *NetworkLoadBalancerForwardingRulePut) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancerForwardingRulePut) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancerForwardingRulePut) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancerForwardingRulePut(val *NetworkLoadBalancerForwardingRulePut) *NullableNetworkLoadBalancerForwardingRulePut { return &NullableNetworkLoadBalancerForwardingRulePut{value: val, isSet: true} } func (v NullableNetworkLoadBalancerForwardingRulePut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancerForwardingRulePut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancer_forwarding_rule_target.go000066400000000000000000000212631465267054300325460ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancerForwardingRuleTarget struct for NetworkLoadBalancerForwardingRuleTarget type NetworkLoadBalancerForwardingRuleTarget struct { // The IP of the balanced target VM. Ip *string `json:"ip"` // The port of the balanced target service; valid range is 1 to 65535. Port *int32 `json:"port"` // Traffic is distributed in proportion to target weight, relative to the combined weight of all targets. A target with higher weight receives a greater share of traffic. Valid range is 0 to 256 and default is 1. Targets with weight of 0 do not participate in load balancing but still accept persistent connections. It is best to assign weights in the middle of the range to leave room for later adjustments. Weight *int32 `json:"weight"` // Proxy protocol version. ProxyProtocol *string `json:"proxyProtocol,omitempty"` HealthCheck *NetworkLoadBalancerForwardingRuleTargetHealthCheck `json:"healthCheck,omitempty"` } // NewNetworkLoadBalancerForwardingRuleTarget instantiates a new NetworkLoadBalancerForwardingRuleTarget object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancerForwardingRuleTarget(ip string, port int32, weight int32) *NetworkLoadBalancerForwardingRuleTarget { this := NetworkLoadBalancerForwardingRuleTarget{} this.Ip = &ip this.Port = &port this.Weight = &weight var proxyProtocol string = "none" this.ProxyProtocol = &proxyProtocol return &this } // NewNetworkLoadBalancerForwardingRuleTargetWithDefaults instantiates a new NetworkLoadBalancerForwardingRuleTarget object // This 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 NewNetworkLoadBalancerForwardingRuleTargetWithDefaults() *NetworkLoadBalancerForwardingRuleTarget { this := NetworkLoadBalancerForwardingRuleTarget{} var proxyProtocol string = "none" this.ProxyProtocol = &proxyProtocol return &this } // GetIp returns the Ip field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetIp() *string { if o == nil { return nil } return o.Ip } // GetIpOk returns a tuple with the Ip field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetIpOk() (*string, bool) { if o == nil { return nil, false } return o.Ip, true } // SetIp sets field value func (o *NetworkLoadBalancerForwardingRuleTarget) SetIp(v string) { o.Ip = &v } // HasIp returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleTarget) HasIp() bool { if o != nil && o.Ip != nil { return true } return false } // GetPort returns the Port field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetPort() *int32 { if o == nil { return nil } return o.Port } // GetPortOk returns a tuple with the Port field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetPortOk() (*int32, bool) { if o == nil { return nil, false } return o.Port, true } // SetPort sets field value func (o *NetworkLoadBalancerForwardingRuleTarget) SetPort(v int32) { o.Port = &v } // HasPort returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleTarget) HasPort() bool { if o != nil && o.Port != nil { return true } return false } // GetWeight returns the Weight field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetWeight() *int32 { if o == nil { return nil } return o.Weight } // GetWeightOk returns a tuple with the Weight field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetWeightOk() (*int32, bool) { if o == nil { return nil, false } return o.Weight, true } // SetWeight sets field value func (o *NetworkLoadBalancerForwardingRuleTarget) SetWeight(v int32) { o.Weight = &v } // HasWeight returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleTarget) HasWeight() bool { if o != nil && o.Weight != nil { return true } return false } // GetProxyProtocol returns the ProxyProtocol field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetProxyProtocol() *string { if o == nil { return nil } return o.ProxyProtocol } // GetProxyProtocolOk returns a tuple with the ProxyProtocol field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetProxyProtocolOk() (*string, bool) { if o == nil { return nil, false } return o.ProxyProtocol, true } // SetProxyProtocol sets field value func (o *NetworkLoadBalancerForwardingRuleTarget) SetProxyProtocol(v string) { o.ProxyProtocol = &v } // HasProxyProtocol returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleTarget) HasProxyProtocol() bool { if o != nil && o.ProxyProtocol != nil { return true } return false } // GetHealthCheck returns the HealthCheck field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetHealthCheck() *NetworkLoadBalancerForwardingRuleTargetHealthCheck { if o == nil { return nil } return o.HealthCheck } // GetHealthCheckOk returns a tuple with the HealthCheck field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleTarget) GetHealthCheckOk() (*NetworkLoadBalancerForwardingRuleTargetHealthCheck, bool) { if o == nil { return nil, false } return o.HealthCheck, true } // SetHealthCheck sets field value func (o *NetworkLoadBalancerForwardingRuleTarget) SetHealthCheck(v NetworkLoadBalancerForwardingRuleTargetHealthCheck) { o.HealthCheck = &v } // HasHealthCheck returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleTarget) HasHealthCheck() bool { if o != nil && o.HealthCheck != nil { return true } return false } func (o NetworkLoadBalancerForwardingRuleTarget) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Ip != nil { toSerialize["ip"] = o.Ip } if o.Port != nil { toSerialize["port"] = o.Port } if o.Weight != nil { toSerialize["weight"] = o.Weight } if o.ProxyProtocol != nil { toSerialize["proxyProtocol"] = o.ProxyProtocol } if o.HealthCheck != nil { toSerialize["healthCheck"] = o.HealthCheck } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancerForwardingRuleTarget struct { value *NetworkLoadBalancerForwardingRuleTarget isSet bool } func (v NullableNetworkLoadBalancerForwardingRuleTarget) Get() *NetworkLoadBalancerForwardingRuleTarget { return v.value } func (v *NullableNetworkLoadBalancerForwardingRuleTarget) Set(val *NetworkLoadBalancerForwardingRuleTarget) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancerForwardingRuleTarget) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancerForwardingRuleTarget) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancerForwardingRuleTarget(val *NetworkLoadBalancerForwardingRuleTarget) *NullableNetworkLoadBalancerForwardingRuleTarget { return &NullableNetworkLoadBalancerForwardingRuleTarget{value: val, isSet: true} } func (v NullableNetworkLoadBalancerForwardingRuleTarget) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancerForwardingRuleTarget) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } model_network_load_balancer_forwarding_rule_target_health_check.go000066400000000000000000000153711465267054300351540ustar00rootroot00000000000000golang-github-ionos-cloud-sdk-go-6.2.0/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancerForwardingRuleTargetHealthCheck struct for NetworkLoadBalancerForwardingRuleTargetHealthCheck type NetworkLoadBalancerForwardingRuleTargetHealthCheck struct { // Makes the target available only if it accepts periodic health check TCP connection attempts; when turned off, the target is considered always available. The health check only consists of a connection attempt to the address and port of the target. Check *bool `json:"check,omitempty"` // The interval in milliseconds between consecutive health checks; default is 2000. CheckInterval *int32 `json:"checkInterval,omitempty"` // Maintenance mode prevents the target from receiving balanced traffic. Maintenance *bool `json:"maintenance,omitempty"` } // NewNetworkLoadBalancerForwardingRuleTargetHealthCheck instantiates a new NetworkLoadBalancerForwardingRuleTargetHealthCheck object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancerForwardingRuleTargetHealthCheck() *NetworkLoadBalancerForwardingRuleTargetHealthCheck { this := NetworkLoadBalancerForwardingRuleTargetHealthCheck{} return &this } // NewNetworkLoadBalancerForwardingRuleTargetHealthCheckWithDefaults instantiates a new NetworkLoadBalancerForwardingRuleTargetHealthCheck object // This 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 NewNetworkLoadBalancerForwardingRuleTargetHealthCheckWithDefaults() *NetworkLoadBalancerForwardingRuleTargetHealthCheck { this := NetworkLoadBalancerForwardingRuleTargetHealthCheck{} return &this } // GetCheck returns the Check field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetCheck() *bool { if o == nil { return nil } return o.Check } // GetCheckOk returns a tuple with the Check field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetCheckOk() (*bool, bool) { if o == nil { return nil, false } return o.Check, true } // SetCheck sets field value func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) SetCheck(v bool) { o.Check = &v } // HasCheck returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) HasCheck() bool { if o != nil && o.Check != nil { return true } return false } // GetCheckInterval returns the CheckInterval field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetCheckInterval() *int32 { if o == nil { return nil } return o.CheckInterval } // GetCheckIntervalOk returns a tuple with the CheckInterval field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetCheckIntervalOk() (*int32, bool) { if o == nil { return nil, false } return o.CheckInterval, true } // SetCheckInterval sets field value func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) SetCheckInterval(v int32) { o.CheckInterval = &v } // HasCheckInterval returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) HasCheckInterval() bool { if o != nil && o.CheckInterval != nil { return true } return false } // GetMaintenance returns the Maintenance field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetMaintenance() *bool { if o == nil { return nil } return o.Maintenance } // GetMaintenanceOk returns a tuple with the Maintenance field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) GetMaintenanceOk() (*bool, bool) { if o == nil { return nil, false } return o.Maintenance, true } // SetMaintenance sets field value func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) SetMaintenance(v bool) { o.Maintenance = &v } // HasMaintenance returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRuleTargetHealthCheck) HasMaintenance() bool { if o != nil && o.Maintenance != nil { return true } return false } func (o NetworkLoadBalancerForwardingRuleTargetHealthCheck) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Check != nil { toSerialize["check"] = o.Check } if o.CheckInterval != nil { toSerialize["checkInterval"] = o.CheckInterval } if o.Maintenance != nil { toSerialize["maintenance"] = o.Maintenance } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancerForwardingRuleTargetHealthCheck struct { value *NetworkLoadBalancerForwardingRuleTargetHealthCheck isSet bool } func (v NullableNetworkLoadBalancerForwardingRuleTargetHealthCheck) Get() *NetworkLoadBalancerForwardingRuleTargetHealthCheck { return v.value } func (v *NullableNetworkLoadBalancerForwardingRuleTargetHealthCheck) Set(val *NetworkLoadBalancerForwardingRuleTargetHealthCheck) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancerForwardingRuleTargetHealthCheck) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancerForwardingRuleTargetHealthCheck) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancerForwardingRuleTargetHealthCheck(val *NetworkLoadBalancerForwardingRuleTargetHealthCheck) *NullableNetworkLoadBalancerForwardingRuleTargetHealthCheck { return &NullableNetworkLoadBalancerForwardingRuleTargetHealthCheck{value: val, isSet: true} } func (v NullableNetworkLoadBalancerForwardingRuleTargetHealthCheck) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancerForwardingRuleTargetHealthCheck) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancer_forwarding_rules.go000066400000000000000000000227121465267054300313630ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancerForwardingRules struct for NetworkLoadBalancerForwardingRules type NetworkLoadBalancerForwardingRules struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]NetworkLoadBalancerForwardingRule `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewNetworkLoadBalancerForwardingRules instantiates a new NetworkLoadBalancerForwardingRules object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancerForwardingRules() *NetworkLoadBalancerForwardingRules { this := NetworkLoadBalancerForwardingRules{} return &this } // NewNetworkLoadBalancerForwardingRulesWithDefaults instantiates a new NetworkLoadBalancerForwardingRules object // This 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 NewNetworkLoadBalancerForwardingRulesWithDefaults() *NetworkLoadBalancerForwardingRules { this := NetworkLoadBalancerForwardingRules{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRules) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRules) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NetworkLoadBalancerForwardingRules) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRules) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRules) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRules) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NetworkLoadBalancerForwardingRules) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRules) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRules) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRules) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NetworkLoadBalancerForwardingRules) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRules) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRules) GetItems() *[]NetworkLoadBalancerForwardingRule { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRules) GetItemsOk() (*[]NetworkLoadBalancerForwardingRule, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *NetworkLoadBalancerForwardingRules) SetItems(v []NetworkLoadBalancerForwardingRule) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRules) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRules) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRules) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *NetworkLoadBalancerForwardingRules) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRules) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRules) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRules) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *NetworkLoadBalancerForwardingRules) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRules) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerForwardingRules) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerForwardingRules) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *NetworkLoadBalancerForwardingRules) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *NetworkLoadBalancerForwardingRules) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o NetworkLoadBalancerForwardingRules) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancerForwardingRules struct { value *NetworkLoadBalancerForwardingRules isSet bool } func (v NullableNetworkLoadBalancerForwardingRules) Get() *NetworkLoadBalancerForwardingRules { return v.value } func (v *NullableNetworkLoadBalancerForwardingRules) Set(val *NetworkLoadBalancerForwardingRules) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancerForwardingRules) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancerForwardingRules) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancerForwardingRules(val *NetworkLoadBalancerForwardingRules) *NullableNetworkLoadBalancerForwardingRules { return &NullableNetworkLoadBalancerForwardingRules{value: val, isSet: true} } func (v NullableNetworkLoadBalancerForwardingRules) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancerForwardingRules) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancer_properties.go000066400000000000000000000242061465267054300302030ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancerProperties struct for NetworkLoadBalancerProperties type NetworkLoadBalancerProperties struct { // The name of the Network Load Balancer. Name *string `json:"name"` // ID of the listening LAN (inbound). ListenerLan *int32 `json:"listenerLan"` // Collection of the Network Load Balancer IP addresses. (Inbound and outbound) IPs of the listenerLan must be customer-reserved IPs for public Load Balancers, and private IPs for private Load Balancers. Ips *[]string `json:"ips,omitempty"` // ID of the balanced private target LAN (outbound). TargetLan *int32 `json:"targetLan"` // Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet. LbPrivateIps *[]string `json:"lbPrivateIps,omitempty"` // Turn logging on and off for this product. Default value is 'false'. CentralLogging *bool `json:"centralLogging,omitempty"` // Specifies the format of the logs. LoggingFormat *string `json:"loggingFormat,omitempty"` } // NewNetworkLoadBalancerProperties instantiates a new NetworkLoadBalancerProperties object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancerProperties(name string, listenerLan int32, targetLan int32) *NetworkLoadBalancerProperties { this := NetworkLoadBalancerProperties{} this.Name = &name this.ListenerLan = &listenerLan this.TargetLan = &targetLan return &this } // NewNetworkLoadBalancerPropertiesWithDefaults instantiates a new NetworkLoadBalancerProperties object // This 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 NewNetworkLoadBalancerPropertiesWithDefaults() *NetworkLoadBalancerProperties { this := NetworkLoadBalancerProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *NetworkLoadBalancerProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *NetworkLoadBalancerProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetListenerLan returns the ListenerLan field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerProperties) GetListenerLan() *int32 { if o == nil { return nil } return o.ListenerLan } // GetListenerLanOk returns a tuple with the ListenerLan field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerProperties) GetListenerLanOk() (*int32, bool) { if o == nil { return nil, false } return o.ListenerLan, true } // SetListenerLan sets field value func (o *NetworkLoadBalancerProperties) SetListenerLan(v int32) { o.ListenerLan = &v } // HasListenerLan returns a boolean if a field has been set. func (o *NetworkLoadBalancerProperties) HasListenerLan() bool { if o != nil && o.ListenerLan != nil { return true } return false } // GetIps returns the Ips field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerProperties) GetIps() *[]string { if o == nil { return nil } return o.Ips } // GetIpsOk returns a tuple with the Ips field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerProperties) GetIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.Ips, true } // SetIps sets field value func (o *NetworkLoadBalancerProperties) SetIps(v []string) { o.Ips = &v } // HasIps returns a boolean if a field has been set. func (o *NetworkLoadBalancerProperties) HasIps() bool { if o != nil && o.Ips != nil { return true } return false } // GetTargetLan returns the TargetLan field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerProperties) GetTargetLan() *int32 { if o == nil { return nil } return o.TargetLan } // GetTargetLanOk returns a tuple with the TargetLan field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerProperties) GetTargetLanOk() (*int32, bool) { if o == nil { return nil, false } return o.TargetLan, true } // SetTargetLan sets field value func (o *NetworkLoadBalancerProperties) SetTargetLan(v int32) { o.TargetLan = &v } // HasTargetLan returns a boolean if a field has been set. func (o *NetworkLoadBalancerProperties) HasTargetLan() bool { if o != nil && o.TargetLan != nil { return true } return false } // GetLbPrivateIps returns the LbPrivateIps field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerProperties) GetLbPrivateIps() *[]string { if o == nil { return nil } return o.LbPrivateIps } // GetLbPrivateIpsOk returns a tuple with the LbPrivateIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerProperties) GetLbPrivateIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.LbPrivateIps, true } // SetLbPrivateIps sets field value func (o *NetworkLoadBalancerProperties) SetLbPrivateIps(v []string) { o.LbPrivateIps = &v } // HasLbPrivateIps returns a boolean if a field has been set. func (o *NetworkLoadBalancerProperties) HasLbPrivateIps() bool { if o != nil && o.LbPrivateIps != nil { return true } return false } // GetCentralLogging returns the CentralLogging field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerProperties) GetCentralLogging() *bool { if o == nil { return nil } return o.CentralLogging } // GetCentralLoggingOk returns a tuple with the CentralLogging field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerProperties) GetCentralLoggingOk() (*bool, bool) { if o == nil { return nil, false } return o.CentralLogging, true } // SetCentralLogging sets field value func (o *NetworkLoadBalancerProperties) SetCentralLogging(v bool) { o.CentralLogging = &v } // HasCentralLogging returns a boolean if a field has been set. func (o *NetworkLoadBalancerProperties) HasCentralLogging() bool { if o != nil && o.CentralLogging != nil { return true } return false } // GetLoggingFormat returns the LoggingFormat field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerProperties) GetLoggingFormat() *string { if o == nil { return nil } return o.LoggingFormat } // GetLoggingFormatOk returns a tuple with the LoggingFormat field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerProperties) GetLoggingFormatOk() (*string, bool) { if o == nil { return nil, false } return o.LoggingFormat, true } // SetLoggingFormat sets field value func (o *NetworkLoadBalancerProperties) SetLoggingFormat(v string) { o.LoggingFormat = &v } // HasLoggingFormat returns a boolean if a field has been set. func (o *NetworkLoadBalancerProperties) HasLoggingFormat() bool { if o != nil && o.LoggingFormat != nil { return true } return false } func (o NetworkLoadBalancerProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.ListenerLan != nil { toSerialize["listenerLan"] = o.ListenerLan } if o.Ips != nil { toSerialize["ips"] = o.Ips } if o.TargetLan != nil { toSerialize["targetLan"] = o.TargetLan } if o.LbPrivateIps != nil { toSerialize["lbPrivateIps"] = o.LbPrivateIps } if o.CentralLogging != nil { toSerialize["centralLogging"] = o.CentralLogging } if o.LoggingFormat != nil { toSerialize["loggingFormat"] = o.LoggingFormat } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancerProperties struct { value *NetworkLoadBalancerProperties isSet bool } func (v NullableNetworkLoadBalancerProperties) Get() *NetworkLoadBalancerProperties { return v.value } func (v *NullableNetworkLoadBalancerProperties) Set(val *NetworkLoadBalancerProperties) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancerProperties) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancerProperties) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancerProperties(val *NetworkLoadBalancerProperties) *NullableNetworkLoadBalancerProperties { return &NullableNetworkLoadBalancerProperties{value: val, isSet: true} } func (v NullableNetworkLoadBalancerProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancerProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancer_put.go000066400000000000000000000142621465267054300266200ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancerPut struct for NetworkLoadBalancerPut type NetworkLoadBalancerPut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *NetworkLoadBalancerProperties `json:"properties"` } // NewNetworkLoadBalancerPut instantiates a new NetworkLoadBalancerPut object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancerPut(properties NetworkLoadBalancerProperties) *NetworkLoadBalancerPut { this := NetworkLoadBalancerPut{} this.Properties = &properties return &this } // NewNetworkLoadBalancerPutWithDefaults instantiates a new NetworkLoadBalancerPut object // This 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 NewNetworkLoadBalancerPutWithDefaults() *NetworkLoadBalancerPut { this := NetworkLoadBalancerPut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerPut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NetworkLoadBalancerPut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NetworkLoadBalancerPut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerPut) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NetworkLoadBalancerPut) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NetworkLoadBalancerPut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerPut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NetworkLoadBalancerPut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NetworkLoadBalancerPut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancerPut) GetProperties() *NetworkLoadBalancerProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancerPut) GetPropertiesOk() (*NetworkLoadBalancerProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *NetworkLoadBalancerPut) SetProperties(v NetworkLoadBalancerProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *NetworkLoadBalancerPut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o NetworkLoadBalancerPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancerPut struct { value *NetworkLoadBalancerPut isSet bool } func (v NullableNetworkLoadBalancerPut) Get() *NetworkLoadBalancerPut { return v.value } func (v *NullableNetworkLoadBalancerPut) Set(val *NetworkLoadBalancerPut) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancerPut) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancerPut) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancerPut(val *NetworkLoadBalancerPut) *NullableNetworkLoadBalancerPut { return &NullableNetworkLoadBalancerPut{value: val, isSet: true} } func (v NullableNetworkLoadBalancerPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancerPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_network_load_balancers.go000066400000000000000000000212021465267054300261030ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NetworkLoadBalancers struct for NetworkLoadBalancers type NetworkLoadBalancers struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]NetworkLoadBalancer `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewNetworkLoadBalancers instantiates a new NetworkLoadBalancers object // This constructor will assign default values to properties that have it defined, // 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 NewNetworkLoadBalancers() *NetworkLoadBalancers { this := NetworkLoadBalancers{} return &this } // NewNetworkLoadBalancersWithDefaults instantiates a new NetworkLoadBalancers object // This 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 NewNetworkLoadBalancersWithDefaults() *NetworkLoadBalancers { this := NetworkLoadBalancers{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancers) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancers) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NetworkLoadBalancers) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NetworkLoadBalancers) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancers) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NetworkLoadBalancers) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NetworkLoadBalancers) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancers) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NetworkLoadBalancers) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NetworkLoadBalancers) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancers) GetItems() *[]NetworkLoadBalancer { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancers) GetItemsOk() (*[]NetworkLoadBalancer, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *NetworkLoadBalancers) SetItems(v []NetworkLoadBalancer) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *NetworkLoadBalancers) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancers) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancers) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *NetworkLoadBalancers) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *NetworkLoadBalancers) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancers) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancers) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *NetworkLoadBalancers) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *NetworkLoadBalancers) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *NetworkLoadBalancers) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NetworkLoadBalancers) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *NetworkLoadBalancers) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *NetworkLoadBalancers) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o NetworkLoadBalancers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableNetworkLoadBalancers struct { value *NetworkLoadBalancers isSet bool } func (v NullableNetworkLoadBalancers) Get() *NetworkLoadBalancers { return v.value } func (v *NullableNetworkLoadBalancers) Set(val *NetworkLoadBalancers) { v.value = val v.isSet = true } func (v NullableNetworkLoadBalancers) IsSet() bool { return v.isSet } func (v *NullableNetworkLoadBalancers) Unset() { v.value = nil v.isSet = false } func NewNullableNetworkLoadBalancers(val *NetworkLoadBalancers) *NullableNetworkLoadBalancers { return &NullableNetworkLoadBalancers{value: val, isSet: true} } func (v NullableNetworkLoadBalancers) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNetworkLoadBalancers) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nic.go000066400000000000000000000161221465267054300221570ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Nic struct for Nic type Nic struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *NicProperties `json:"properties"` Entities *NicEntities `json:"entities,omitempty"` } // NewNic instantiates a new Nic object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewNic(properties NicProperties) *Nic { this := Nic{} this.Properties = &properties return &this } // NewNicWithDefaults instantiates a new Nic object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewNicWithDefaults() *Nic { this := Nic{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Nic) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nic) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Nic) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Nic) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Nic) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nic) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Nic) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Nic) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Nic) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nic) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Nic) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Nic) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Nic) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nic) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Nic) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Nic) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Nic) GetProperties() *NicProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nic) GetPropertiesOk() (*NicProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Nic) SetProperties(v NicProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Nic) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *Nic) GetEntities() *NicEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nic) GetEntitiesOk() (*NicEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *Nic) SetEntities(v NicEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *Nic) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o Nic) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableNic struct { value *Nic isSet bool } func (v NullableNic) Get() *Nic { return v.value } func (v *NullableNic) Set(val *Nic) { v.value = val v.isSet = true } func (v NullableNic) IsSet() bool { return v.isSet } func (v *NullableNic) Unset() { v.value = nil v.isSet = false } func NewNullableNic(val *Nic) *NullableNic { return &NullableNic{value: val, isSet: true} } func (v NullableNic) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNic) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nic_entities.go000066400000000000000000000100141465267054300240550ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NicEntities struct for NicEntities type NicEntities struct { Flowlogs *FlowLogs `json:"flowlogs,omitempty"` Firewallrules *FirewallRules `json:"firewallrules,omitempty"` } // NewNicEntities instantiates a new NicEntities object // This constructor will assign default values to properties that have it defined, // 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 NewNicEntities() *NicEntities { this := NicEntities{} return &this } // NewNicEntitiesWithDefaults instantiates a new NicEntities object // This 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 NewNicEntitiesWithDefaults() *NicEntities { this := NicEntities{} return &this } // GetFlowlogs returns the Flowlogs field value // If the value is explicit nil, nil is returned func (o *NicEntities) GetFlowlogs() *FlowLogs { if o == nil { return nil } return o.Flowlogs } // GetFlowlogsOk returns a tuple with the Flowlogs field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicEntities) GetFlowlogsOk() (*FlowLogs, bool) { if o == nil { return nil, false } return o.Flowlogs, true } // SetFlowlogs sets field value func (o *NicEntities) SetFlowlogs(v FlowLogs) { o.Flowlogs = &v } // HasFlowlogs returns a boolean if a field has been set. func (o *NicEntities) HasFlowlogs() bool { if o != nil && o.Flowlogs != nil { return true } return false } // GetFirewallrules returns the Firewallrules field value // If the value is explicit nil, nil is returned func (o *NicEntities) GetFirewallrules() *FirewallRules { if o == nil { return nil } return o.Firewallrules } // GetFirewallrulesOk returns a tuple with the Firewallrules field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicEntities) GetFirewallrulesOk() (*FirewallRules, bool) { if o == nil { return nil, false } return o.Firewallrules, true } // SetFirewallrules sets field value func (o *NicEntities) SetFirewallrules(v FirewallRules) { o.Firewallrules = &v } // HasFirewallrules returns a boolean if a field has been set. func (o *NicEntities) HasFirewallrules() bool { if o != nil && o.Firewallrules != nil { return true } return false } func (o NicEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Flowlogs != nil { toSerialize["flowlogs"] = o.Flowlogs } if o.Firewallrules != nil { toSerialize["firewallrules"] = o.Firewallrules } return json.Marshal(toSerialize) } type NullableNicEntities struct { value *NicEntities isSet bool } func (v NullableNicEntities) Get() *NicEntities { return v.value } func (v *NullableNicEntities) Set(val *NicEntities) { v.value = val v.isSet = true } func (v NullableNicEntities) IsSet() bool { return v.isSet } func (v *NullableNicEntities) Unset() { v.value = nil v.isSet = false } func NewNullableNicEntities(val *NicEntities) *NullableNicEntities { return &NullableNicEntities{value: val, isSet: true} } func (v NullableNicEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNicEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nic_properties.go000066400000000000000000000377731465267054300244520ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NicProperties struct for NicProperties type NicProperties struct { // The name of the resource. Name *string `json:"name,omitempty"` // The MAC address of the NIC. Mac *string `json:"mac,omitempty"` // Collection of IP addresses, assigned to the NIC. Explicitly assigned public IPs need to come from reserved IP blocks. Passing value null or empty array will assign an IP address automatically. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nil[]string` can be used, or the setter `SetIpsNil` Ips *[]string `json:"ips,omitempty"` // Indicates if the NIC will reserve an IP using DHCP. Dhcp *bool `json:"dhcp,omitempty"` // If this NIC is connected to an IPv6 enabled LAN then this property contains the IPv6 IP addresses of the NIC. The maximum number of IPv6 IP addresses per NIC is 50, if you need more, contact support. If you leave this property 'null' when adding a NIC, when changing the NIC's IPv6 CIDR block, when changing the LAN's IPv6 CIDR block or when moving the NIC to a different IPv6 enabled LAN, then we will automatically assign the same number of IPv6 addresses which you had before from the NICs new CIDR block. If you leave this property 'null' while not changing the CIDR block, the IPv6 IP addresses won't be changed either. You can also provide your own self choosen IPv6 addresses, which then must be inside the IPv6 CIDR block of this NIC. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nil[]string` can be used, or the setter `SetIpv6IpsNil` Ipv6Ips *[]string `json:"ipv6Ips,omitempty"` // If this NIC is connected to an IPv6 enabled LAN then this property contains the /80 IPv6 CIDR block of the NIC. If you leave this property 'null' when adding a NIC to an IPv6-enabled LAN, then an IPv6 CIDR block will automatically be assigned to the NIC, but you can also specify an /80 IPv6 CIDR block for the NIC on your own, which must be inside the /64 IPv6 CIDR block of the LAN and unique. This value can only be set, if the LAN already has an IPv6 CIDR block assigned. An IPv6-enabled LAN is limited to a maximum of 65,536 NICs. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetIpv6CidrBlockNil` Ipv6CidrBlock *string `json:"ipv6CidrBlock,omitempty"` // Indicates if the NIC will receive an IPv6 using DHCP. It can be set to 'true' or 'false' only if this NIC is connected to an IPv6 enabled LAN. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilbool` can be used, or the setter `SetDhcpv6Nil` Dhcpv6 *bool `json:"dhcpv6,omitempty"` // The LAN ID the NIC will be on. If the LAN ID does not exist, it will be implicitly created. Lan *int32 `json:"lan"` // Activate or deactivate the firewall. By default, an active firewall without any defined rules will block all incoming network traffic except for the firewall rules that explicitly allows certain protocols, IP addresses and ports. FirewallActive *bool `json:"firewallActive,omitempty"` // The type of firewall rules that will be allowed on the NIC. If not specified, the default INGRESS value is used. FirewallType *string `json:"firewallType,omitempty"` // The Logical Unit Number (LUN) of the storage volume. Null if this NIC was created using Cloud API and no DCD changes were performed on the Datacenter. DeviceNumber *int32 `json:"deviceNumber,omitempty"` // The PCI slot number for the NIC. PciSlot *int32 `json:"pciSlot,omitempty"` } // NewNicProperties instantiates a new NicProperties object // This constructor will assign default values to properties that have it defined, // 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 NewNicProperties(lan int32) *NicProperties { this := NicProperties{} var dhcp bool = true this.Dhcp = &dhcp this.Lan = &lan return &this } // NewNicPropertiesWithDefaults instantiates a new NicProperties object // This 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 NewNicPropertiesWithDefaults() *NicProperties { this := NicProperties{} var dhcp bool = true this.Dhcp = &dhcp return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *NicProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *NicProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetMac returns the Mac field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetMac() *string { if o == nil { return nil } return o.Mac } // GetMacOk returns a tuple with the Mac field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetMacOk() (*string, bool) { if o == nil { return nil, false } return o.Mac, true } // SetMac sets field value func (o *NicProperties) SetMac(v string) { o.Mac = &v } // HasMac returns a boolean if a field has been set. func (o *NicProperties) HasMac() bool { if o != nil && o.Mac != nil { return true } return false } // GetIps returns the Ips field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetIps() *[]string { if o == nil { return nil } return o.Ips } // GetIpsOk returns a tuple with the Ips field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetIpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.Ips, true } // SetIps sets field value func (o *NicProperties) SetIps(v []string) { o.Ips = &v } // HasIps returns a boolean if a field has been set. func (o *NicProperties) HasIps() bool { if o != nil && o.Ips != nil { return true } return false } // GetDhcp returns the Dhcp field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetDhcp() *bool { if o == nil { return nil } return o.Dhcp } // GetDhcpOk returns a tuple with the Dhcp field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetDhcpOk() (*bool, bool) { if o == nil { return nil, false } return o.Dhcp, true } // SetDhcp sets field value func (o *NicProperties) SetDhcp(v bool) { o.Dhcp = &v } // HasDhcp returns a boolean if a field has been set. func (o *NicProperties) HasDhcp() bool { if o != nil && o.Dhcp != nil { return true } return false } // GetIpv6Ips returns the Ipv6Ips field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetIpv6Ips() *[]string { if o == nil { return nil } return o.Ipv6Ips } // GetIpv6IpsOk returns a tuple with the Ipv6Ips field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetIpv6IpsOk() (*[]string, bool) { if o == nil { return nil, false } return o.Ipv6Ips, true } // SetIpv6Ips sets field value func (o *NicProperties) SetIpv6Ips(v []string) { o.Ipv6Ips = &v } // HasIpv6Ips returns a boolean if a field has been set. func (o *NicProperties) HasIpv6Ips() bool { if o != nil && o.Ipv6Ips != nil { return true } return false } // GetIpv6CidrBlock returns the Ipv6CidrBlock field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetIpv6CidrBlock() *string { if o == nil { return nil } return o.Ipv6CidrBlock } // GetIpv6CidrBlockOk returns a tuple with the Ipv6CidrBlock field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetIpv6CidrBlockOk() (*string, bool) { if o == nil { return nil, false } return o.Ipv6CidrBlock, true } // SetIpv6CidrBlock sets field value func (o *NicProperties) SetIpv6CidrBlock(v string) { o.Ipv6CidrBlock = &v } // sets Ipv6CidrBlock to the explicit address that will be encoded as nil when marshaled func (o *NicProperties) SetIpv6CidrBlockNil() { o.Ipv6CidrBlock = &Nilstring } // HasIpv6CidrBlock returns a boolean if a field has been set. func (o *NicProperties) HasIpv6CidrBlock() bool { if o != nil && o.Ipv6CidrBlock != nil { return true } return false } // GetDhcpv6 returns the Dhcpv6 field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetDhcpv6() *bool { if o == nil { return nil } return o.Dhcpv6 } // GetDhcpv6Ok returns a tuple with the Dhcpv6 field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetDhcpv6Ok() (*bool, bool) { if o == nil { return nil, false } return o.Dhcpv6, true } // SetDhcpv6 sets field value func (o *NicProperties) SetDhcpv6(v bool) { o.Dhcpv6 = &v } // sets Dhcpv6 to the explicit address that will be encoded as nil when marshaled func (o *NicProperties) SetDhcpv6Nil() { o.Dhcpv6 = &Nilbool } // HasDhcpv6 returns a boolean if a field has been set. func (o *NicProperties) HasDhcpv6() bool { if o != nil && o.Dhcpv6 != nil { return true } return false } // GetLan returns the Lan field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetLan() *int32 { if o == nil { return nil } return o.Lan } // GetLanOk returns a tuple with the Lan field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetLanOk() (*int32, bool) { if o == nil { return nil, false } return o.Lan, true } // SetLan sets field value func (o *NicProperties) SetLan(v int32) { o.Lan = &v } // HasLan returns a boolean if a field has been set. func (o *NicProperties) HasLan() bool { if o != nil && o.Lan != nil { return true } return false } // GetFirewallActive returns the FirewallActive field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetFirewallActive() *bool { if o == nil { return nil } return o.FirewallActive } // GetFirewallActiveOk returns a tuple with the FirewallActive field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetFirewallActiveOk() (*bool, bool) { if o == nil { return nil, false } return o.FirewallActive, true } // SetFirewallActive sets field value func (o *NicProperties) SetFirewallActive(v bool) { o.FirewallActive = &v } // HasFirewallActive returns a boolean if a field has been set. func (o *NicProperties) HasFirewallActive() bool { if o != nil && o.FirewallActive != nil { return true } return false } // GetFirewallType returns the FirewallType field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetFirewallType() *string { if o == nil { return nil } return o.FirewallType } // GetFirewallTypeOk returns a tuple with the FirewallType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetFirewallTypeOk() (*string, bool) { if o == nil { return nil, false } return o.FirewallType, true } // SetFirewallType sets field value func (o *NicProperties) SetFirewallType(v string) { o.FirewallType = &v } // HasFirewallType returns a boolean if a field has been set. func (o *NicProperties) HasFirewallType() bool { if o != nil && o.FirewallType != nil { return true } return false } // GetDeviceNumber returns the DeviceNumber field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetDeviceNumber() *int32 { if o == nil { return nil } return o.DeviceNumber } // GetDeviceNumberOk returns a tuple with the DeviceNumber field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetDeviceNumberOk() (*int32, bool) { if o == nil { return nil, false } return o.DeviceNumber, true } // SetDeviceNumber sets field value func (o *NicProperties) SetDeviceNumber(v int32) { o.DeviceNumber = &v } // HasDeviceNumber returns a boolean if a field has been set. func (o *NicProperties) HasDeviceNumber() bool { if o != nil && o.DeviceNumber != nil { return true } return false } // GetPciSlot returns the PciSlot field value // If the value is explicit nil, nil is returned func (o *NicProperties) GetPciSlot() *int32 { if o == nil { return nil } return o.PciSlot } // GetPciSlotOk returns a tuple with the PciSlot field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicProperties) GetPciSlotOk() (*int32, bool) { if o == nil { return nil, false } return o.PciSlot, true } // SetPciSlot sets field value func (o *NicProperties) SetPciSlot(v int32) { o.PciSlot = &v } // HasPciSlot returns a boolean if a field has been set. func (o *NicProperties) HasPciSlot() bool { if o != nil && o.PciSlot != nil { return true } return false } func (o NicProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Mac != nil { toSerialize["mac"] = o.Mac } if o.Ips != nil { toSerialize["ips"] = o.Ips } if o.Dhcp != nil { toSerialize["dhcp"] = o.Dhcp } if o.Ipv6Ips != nil { toSerialize["ipv6Ips"] = o.Ipv6Ips } if o.Ipv6CidrBlock == &Nilstring { toSerialize["ipv6CidrBlock"] = nil } else if o.Ipv6CidrBlock != nil { toSerialize["ipv6CidrBlock"] = o.Ipv6CidrBlock } if o.Dhcpv6 == &Nilbool { toSerialize["dhcpv6"] = nil } else if o.Dhcpv6 != nil { toSerialize["dhcpv6"] = o.Dhcpv6 } if o.Lan != nil { toSerialize["lan"] = o.Lan } if o.FirewallActive != nil { toSerialize["firewallActive"] = o.FirewallActive } if o.FirewallType != nil { toSerialize["firewallType"] = o.FirewallType } if o.DeviceNumber != nil { toSerialize["deviceNumber"] = o.DeviceNumber } if o.PciSlot != nil { toSerialize["pciSlot"] = o.PciSlot } return json.Marshal(toSerialize) } type NullableNicProperties struct { value *NicProperties isSet bool } func (v NullableNicProperties) Get() *NicProperties { return v.value } func (v *NullableNicProperties) Set(val *NicProperties) { v.value = val v.isSet = true } func (v NullableNicProperties) IsSet() bool { return v.isSet } func (v *NullableNicProperties) Unset() { v.value = nil v.isSet = false } func NewNullableNicProperties(val *NicProperties) *NullableNicProperties { return &NullableNicProperties{value: val, isSet: true} } func (v NullableNicProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNicProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nic_put.go000066400000000000000000000126221465267054300230500ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // NicPut struct for NicPut type NicPut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *NicProperties `json:"properties"` } // NewNicPut instantiates a new NicPut object // This constructor will assign default values to properties that have it defined, // 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 NewNicPut(properties NicProperties) *NicPut { this := NicPut{} this.Properties = &properties return &this } // NewNicPutWithDefaults instantiates a new NicPut object // This 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 NewNicPutWithDefaults() *NicPut { this := NicPut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *NicPut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *NicPut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *NicPut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *NicPut) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *NicPut) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *NicPut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *NicPut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *NicPut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *NicPut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *NicPut) GetProperties() *NicProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NicPut) GetPropertiesOk() (*NicProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *NicPut) SetProperties(v NicProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *NicPut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o NicPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableNicPut struct { value *NicPut isSet bool } func (v NullableNicPut) Get() *NicPut { return v.value } func (v *NullableNicPut) Set(val *NicPut) { v.value = val v.isSet = true } func (v NullableNicPut) IsSet() bool { return v.isSet } func (v *NullableNicPut) Unset() { v.value = nil v.isSet = false } func NewNullableNicPut(val *NicPut) *NullableNicPut { return &NullableNicPut{value: val, isSet: true} } func (v NullableNicPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNicPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_nics.go000066400000000000000000000173021465267054300223430ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Nics struct for Nics type Nics struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Nic `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewNics instantiates a new Nics object // This constructor will assign default values to properties that have it defined, // 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 NewNics() *Nics { this := Nics{} return &this } // NewNicsWithDefaults instantiates a new Nics object // This 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 NewNicsWithDefaults() *Nics { this := Nics{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Nics) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nics) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Nics) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Nics) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Nics) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nics) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Nics) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Nics) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Nics) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nics) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Nics) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Nics) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Nics) GetItems() *[]Nic { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nics) GetItemsOk() (*[]Nic, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Nics) SetItems(v []Nic) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Nics) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *Nics) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nics) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *Nics) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *Nics) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *Nics) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nics) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *Nics) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *Nics) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *Nics) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Nics) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *Nics) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *Nics) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o Nics) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableNics struct { value *Nics isSet bool } func (v NullableNics) Get() *Nics { return v.value } func (v *NullableNics) Set(val *Nics) { v.value = val v.isSet = true } func (v NullableNics) IsSet() bool { return v.isSet } func (v *NullableNics) Unset() { v.value = nil v.isSet = false } func NewNullableNics(val *Nics) *NullableNics { return &NullableNics{value: val, isSet: true} } func (v NullableNics) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNics) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_no_state_meta_data.go000066400000000000000000000234061465267054300252240ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" "time" ) // NoStateMetaData struct for NoStateMetaData type NoStateMetaData struct { // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. Etag *string `json:"etag,omitempty"` // The time when the resource was created. CreatedDate *IonosTime // The user who has created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The unique ID of the user who created the resource. CreatedByUserId *string `json:"createdByUserId,omitempty"` // The last time the resource was modified. LastModifiedDate *IonosTime // The user who last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The unique ID of the user who last modified the resource. LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` } // NewNoStateMetaData instantiates a new NoStateMetaData object // This constructor will assign default values to properties that have it defined, // 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 NewNoStateMetaData() *NoStateMetaData { this := NoStateMetaData{} return &this } // NewNoStateMetaDataWithDefaults instantiates a new NoStateMetaData object // This 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 NewNoStateMetaDataWithDefaults() *NoStateMetaData { this := NoStateMetaData{} return &this } // GetEtag returns the Etag field value // If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetEtag() *string { if o == nil { return nil } return o.Etag } // GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NoStateMetaData) GetEtagOk() (*string, bool) { if o == nil { return nil, false } return o.Etag, true } // SetEtag sets field value func (o *NoStateMetaData) SetEtag(v string) { o.Etag = &v } // HasEtag returns a boolean if a field has been set. func (o *NoStateMetaData) HasEtag() bool { if o != nil && o.Etag != nil { return true } return false } // GetCreatedDate returns the CreatedDate field value // If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetCreatedDate() *time.Time { if o == nil { return nil } if o.CreatedDate == nil { return nil } return &o.CreatedDate.Time } // GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NoStateMetaData) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.CreatedDate == nil { return nil, false } return &o.CreatedDate.Time, true } // SetCreatedDate sets field value func (o *NoStateMetaData) SetCreatedDate(v time.Time) { o.CreatedDate = &IonosTime{v} } // HasCreatedDate returns a boolean if a field has been set. func (o *NoStateMetaData) HasCreatedDate() bool { if o != nil && o.CreatedDate != nil { return true } return false } // GetCreatedBy returns the CreatedBy field value // If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetCreatedBy() *string { if o == nil { return nil } return o.CreatedBy } // GetCreatedByOk returns a tuple with the CreatedBy field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NoStateMetaData) GetCreatedByOk() (*string, bool) { if o == nil { return nil, false } return o.CreatedBy, true } // SetCreatedBy sets field value func (o *NoStateMetaData) SetCreatedBy(v string) { o.CreatedBy = &v } // HasCreatedBy returns a boolean if a field has been set. func (o *NoStateMetaData) HasCreatedBy() bool { if o != nil && o.CreatedBy != nil { return true } return false } // GetCreatedByUserId returns the CreatedByUserId field value // If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetCreatedByUserId() *string { if o == nil { return nil } return o.CreatedByUserId } // GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NoStateMetaData) GetCreatedByUserIdOk() (*string, bool) { if o == nil { return nil, false } return o.CreatedByUserId, true } // SetCreatedByUserId sets field value func (o *NoStateMetaData) SetCreatedByUserId(v string) { o.CreatedByUserId = &v } // HasCreatedByUserId returns a boolean if a field has been set. func (o *NoStateMetaData) HasCreatedByUserId() bool { if o != nil && o.CreatedByUserId != nil { return true } return false } // GetLastModifiedDate returns the LastModifiedDate field value // If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetLastModifiedDate() *time.Time { if o == nil { return nil } if o.LastModifiedDate == nil { return nil } return &o.LastModifiedDate.Time } // GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NoStateMetaData) GetLastModifiedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.LastModifiedDate == nil { return nil, false } return &o.LastModifiedDate.Time, true } // SetLastModifiedDate sets field value func (o *NoStateMetaData) SetLastModifiedDate(v time.Time) { o.LastModifiedDate = &IonosTime{v} } // HasLastModifiedDate returns a boolean if a field has been set. func (o *NoStateMetaData) HasLastModifiedDate() bool { if o != nil && o.LastModifiedDate != nil { return true } return false } // GetLastModifiedBy returns the LastModifiedBy field value // If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetLastModifiedBy() *string { if o == nil { return nil } return o.LastModifiedBy } // GetLastModifiedByOk returns a tuple with the LastModifiedBy field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NoStateMetaData) GetLastModifiedByOk() (*string, bool) { if o == nil { return nil, false } return o.LastModifiedBy, true } // SetLastModifiedBy sets field value func (o *NoStateMetaData) SetLastModifiedBy(v string) { o.LastModifiedBy = &v } // HasLastModifiedBy returns a boolean if a field has been set. func (o *NoStateMetaData) HasLastModifiedBy() bool { if o != nil && o.LastModifiedBy != nil { return true } return false } // GetLastModifiedByUserId returns the LastModifiedByUserId field value // If the value is explicit nil, nil is returned func (o *NoStateMetaData) GetLastModifiedByUserId() *string { if o == nil { return nil } return o.LastModifiedByUserId } // GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NoStateMetaData) GetLastModifiedByUserIdOk() (*string, bool) { if o == nil { return nil, false } return o.LastModifiedByUserId, true } // SetLastModifiedByUserId sets field value func (o *NoStateMetaData) SetLastModifiedByUserId(v string) { o.LastModifiedByUserId = &v } // HasLastModifiedByUserId returns a boolean if a field has been set. func (o *NoStateMetaData) HasLastModifiedByUserId() bool { if o != nil && o.LastModifiedByUserId != nil { return true } return false } func (o NoStateMetaData) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Etag != nil { toSerialize["etag"] = o.Etag } if o.CreatedDate != nil { toSerialize["createdDate"] = o.CreatedDate } if o.CreatedBy != nil { toSerialize["createdBy"] = o.CreatedBy } if o.CreatedByUserId != nil { toSerialize["createdByUserId"] = o.CreatedByUserId } if o.LastModifiedDate != nil { toSerialize["lastModifiedDate"] = o.LastModifiedDate } if o.LastModifiedBy != nil { toSerialize["lastModifiedBy"] = o.LastModifiedBy } if o.LastModifiedByUserId != nil { toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId } return json.Marshal(toSerialize) } type NullableNoStateMetaData struct { value *NoStateMetaData isSet bool } func (v NullableNoStateMetaData) Get() *NoStateMetaData { return v.value } func (v *NullableNoStateMetaData) Set(val *NoStateMetaData) { v.value = val v.isSet = true } func (v NullableNoStateMetaData) IsSet() bool { return v.isSet } func (v *NullableNoStateMetaData) Unset() { v.value = nil v.isSet = false } func NewNullableNoStateMetaData(val *NoStateMetaData) *NullableNoStateMetaData { return &NullableNoStateMetaData{value: val, isSet: true} } func (v NullableNoStateMetaData) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNoStateMetaData) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_pagination_links.go000066400000000000000000000117521465267054300247430ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // PaginationLinks struct for PaginationLinks type PaginationLinks struct { // URL (with offset and limit parameters) of the previous page; only present if offset is greater than 0. Prev *string `json:"prev,omitempty"` // URL (with offset and limit parameters) of the current page. Self *string `json:"self,omitempty"` // URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements. Next *string `json:"next,omitempty"` } // NewPaginationLinks instantiates a new PaginationLinks object // This constructor will assign default values to properties that have it defined, // 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 NewPaginationLinks() *PaginationLinks { this := PaginationLinks{} return &this } // NewPaginationLinksWithDefaults instantiates a new PaginationLinks object // This 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 NewPaginationLinksWithDefaults() *PaginationLinks { this := PaginationLinks{} return &this } // GetPrev returns the Prev field value // If the value is explicit nil, nil is returned func (o *PaginationLinks) GetPrev() *string { if o == nil { return nil } return o.Prev } // GetPrevOk returns a tuple with the Prev field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PaginationLinks) GetPrevOk() (*string, bool) { if o == nil { return nil, false } return o.Prev, true } // SetPrev sets field value func (o *PaginationLinks) SetPrev(v string) { o.Prev = &v } // HasPrev returns a boolean if a field has been set. func (o *PaginationLinks) HasPrev() bool { if o != nil && o.Prev != nil { return true } return false } // GetSelf returns the Self field value // If the value is explicit nil, nil is returned func (o *PaginationLinks) GetSelf() *string { if o == nil { return nil } return o.Self } // GetSelfOk returns a tuple with the Self field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PaginationLinks) GetSelfOk() (*string, bool) { if o == nil { return nil, false } return o.Self, true } // SetSelf sets field value func (o *PaginationLinks) SetSelf(v string) { o.Self = &v } // HasSelf returns a boolean if a field has been set. func (o *PaginationLinks) HasSelf() bool { if o != nil && o.Self != nil { return true } return false } // GetNext returns the Next field value // If the value is explicit nil, nil is returned func (o *PaginationLinks) GetNext() *string { if o == nil { return nil } return o.Next } // GetNextOk returns a tuple with the Next field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PaginationLinks) GetNextOk() (*string, bool) { if o == nil { return nil, false } return o.Next, true } // SetNext sets field value func (o *PaginationLinks) SetNext(v string) { o.Next = &v } // HasNext returns a boolean if a field has been set. func (o *PaginationLinks) HasNext() bool { if o != nil && o.Next != nil { return true } return false } func (o PaginationLinks) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Prev != nil { toSerialize["prev"] = o.Prev } if o.Self != nil { toSerialize["self"] = o.Self } if o.Next != nil { toSerialize["next"] = o.Next } return json.Marshal(toSerialize) } type NullablePaginationLinks struct { value *PaginationLinks isSet bool } func (v NullablePaginationLinks) Get() *PaginationLinks { return v.value } func (v *NullablePaginationLinks) Set(val *PaginationLinks) { v.value = val v.isSet = true } func (v NullablePaginationLinks) IsSet() bool { return v.isSet } func (v *NullablePaginationLinks) Unset() { v.value = nil v.isSet = false } func NewNullablePaginationLinks(val *PaginationLinks) *NullablePaginationLinks { return &NullablePaginationLinks{value: val, isSet: true} } func (v NullablePaginationLinks) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullablePaginationLinks) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_peer.go000066400000000000000000000147521465267054300223500ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Peer struct for Peer type Peer struct { // Identifier of the LAN connected to the Cross Connect. Id *string `json:"id,omitempty"` // Name of the LAN connected to the Cross Connect. Name *string `json:"name,omitempty"` // Identifier of the virtual data center connected to the Cross Connect. DatacenterId *string `json:"datacenterId,omitempty"` // Name of the virtual data center connected to the Cross Connect. DatacenterName *string `json:"datacenterName,omitempty"` // Location of the virtual data center connected to the Cross Connect. Location *string `json:"location,omitempty"` } // NewPeer instantiates a new Peer object // This constructor will assign default values to properties that have it defined, // 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 NewPeer() *Peer { this := Peer{} return &this } // NewPeerWithDefaults instantiates a new Peer object // This 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 NewPeerWithDefaults() *Peer { this := Peer{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Peer) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Peer) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Peer) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Peer) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *Peer) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Peer) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *Peer) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *Peer) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetDatacenterId returns the DatacenterId field value // If the value is explicit nil, nil is returned func (o *Peer) GetDatacenterId() *string { if o == nil { return nil } return o.DatacenterId } // GetDatacenterIdOk returns a tuple with the DatacenterId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Peer) GetDatacenterIdOk() (*string, bool) { if o == nil { return nil, false } return o.DatacenterId, true } // SetDatacenterId sets field value func (o *Peer) SetDatacenterId(v string) { o.DatacenterId = &v } // HasDatacenterId returns a boolean if a field has been set. func (o *Peer) HasDatacenterId() bool { if o != nil && o.DatacenterId != nil { return true } return false } // GetDatacenterName returns the DatacenterName field value // If the value is explicit nil, nil is returned func (o *Peer) GetDatacenterName() *string { if o == nil { return nil } return o.DatacenterName } // GetDatacenterNameOk returns a tuple with the DatacenterName field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Peer) GetDatacenterNameOk() (*string, bool) { if o == nil { return nil, false } return o.DatacenterName, true } // SetDatacenterName sets field value func (o *Peer) SetDatacenterName(v string) { o.DatacenterName = &v } // HasDatacenterName returns a boolean if a field has been set. func (o *Peer) HasDatacenterName() bool { if o != nil && o.DatacenterName != nil { return true } return false } // GetLocation returns the Location field value // If the value is explicit nil, nil is returned func (o *Peer) GetLocation() *string { if o == nil { return nil } return o.Location } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Peer) GetLocationOk() (*string, bool) { if o == nil { return nil, false } return o.Location, true } // SetLocation sets field value func (o *Peer) SetLocation(v string) { o.Location = &v } // HasLocation returns a boolean if a field has been set. func (o *Peer) HasLocation() bool { if o != nil && o.Location != nil { return true } return false } func (o Peer) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Name != nil { toSerialize["name"] = o.Name } if o.DatacenterId != nil { toSerialize["datacenterId"] = o.DatacenterId } if o.DatacenterName != nil { toSerialize["datacenterName"] = o.DatacenterName } if o.Location != nil { toSerialize["location"] = o.Location } return json.Marshal(toSerialize) } type NullablePeer struct { value *Peer isSet bool } func (v NullablePeer) Get() *Peer { return v.value } func (v *NullablePeer) Set(val *Peer) { v.value = val v.isSet = true } func (v NullablePeer) IsSet() bool { return v.isSet } func (v *NullablePeer) Unset() { v.value = nil v.isSet = false } func NewNullablePeer(val *Peer) *NullablePeer { return &NullablePeer{value: val, isSet: true} } func (v NullablePeer) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullablePeer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_private_cross_connect.go000066400000000000000000000160351465267054300260050ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // PrivateCrossConnect struct for PrivateCrossConnect type PrivateCrossConnect struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *PrivateCrossConnectProperties `json:"properties"` } // NewPrivateCrossConnect instantiates a new PrivateCrossConnect object // This constructor will assign default values to properties that have it defined, // 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 NewPrivateCrossConnect(properties PrivateCrossConnectProperties) *PrivateCrossConnect { this := PrivateCrossConnect{} this.Properties = &properties return &this } // NewPrivateCrossConnectWithDefaults instantiates a new PrivateCrossConnect object // This 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 NewPrivateCrossConnectWithDefaults() *PrivateCrossConnect { this := PrivateCrossConnect{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnect) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnect) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *PrivateCrossConnect) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *PrivateCrossConnect) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnect) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnect) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *PrivateCrossConnect) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *PrivateCrossConnect) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnect) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnect) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *PrivateCrossConnect) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *PrivateCrossConnect) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnect) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnect) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *PrivateCrossConnect) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *PrivateCrossConnect) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnect) GetProperties() *PrivateCrossConnectProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnect) GetPropertiesOk() (*PrivateCrossConnectProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *PrivateCrossConnect) SetProperties(v PrivateCrossConnectProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *PrivateCrossConnect) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o PrivateCrossConnect) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullablePrivateCrossConnect struct { value *PrivateCrossConnect isSet bool } func (v NullablePrivateCrossConnect) Get() *PrivateCrossConnect { return v.value } func (v *NullablePrivateCrossConnect) Set(val *PrivateCrossConnect) { v.value = val v.isSet = true } func (v NullablePrivateCrossConnect) IsSet() bool { return v.isSet } func (v *NullablePrivateCrossConnect) Unset() { v.value = nil v.isSet = false } func NewNullablePrivateCrossConnect(val *PrivateCrossConnect) *NullablePrivateCrossConnect { return &NullablePrivateCrossConnect{value: val, isSet: true} } func (v NullablePrivateCrossConnect) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullablePrivateCrossConnect) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_private_cross_connect_properties.go000066400000000000000000000161511465267054300302600ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // PrivateCrossConnectProperties struct for PrivateCrossConnectProperties type PrivateCrossConnectProperties struct { // The name of the Cross Connect. Name *string `json:"name,omitempty"` // Human-readable description of the Cross Connect. Description *string `json:"description,omitempty"` // Read-Only attribute. Lists LAN's connected to this Cross Connect. Peers *[]Peer `json:"peers,omitempty"` // Read-Only attribute. Lists data centers that can be connected to this Cross Connect. If the Cross Connect is not connected to any LANs it lists all VDCs the user has access to. If the Cross Connect is connected to at least 1 LAN it lists all VDCs the user has access to in the location of the connected LAN. ConnectableDatacenters *[]ConnectableDatacenter `json:"connectableDatacenters,omitempty"` } // NewPrivateCrossConnectProperties instantiates a new PrivateCrossConnectProperties object // This constructor will assign default values to properties that have it defined, // 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 NewPrivateCrossConnectProperties() *PrivateCrossConnectProperties { this := PrivateCrossConnectProperties{} return &this } // NewPrivateCrossConnectPropertiesWithDefaults instantiates a new PrivateCrossConnectProperties object // This 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 NewPrivateCrossConnectPropertiesWithDefaults() *PrivateCrossConnectProperties { this := PrivateCrossConnectProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnectProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnectProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *PrivateCrossConnectProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *PrivateCrossConnectProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetDescription returns the Description field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnectProperties) GetDescription() *string { if o == nil { return nil } return o.Description } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnectProperties) GetDescriptionOk() (*string, bool) { if o == nil { return nil, false } return o.Description, true } // SetDescription sets field value func (o *PrivateCrossConnectProperties) SetDescription(v string) { o.Description = &v } // HasDescription returns a boolean if a field has been set. func (o *PrivateCrossConnectProperties) HasDescription() bool { if o != nil && o.Description != nil { return true } return false } // GetPeers returns the Peers field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnectProperties) GetPeers() *[]Peer { if o == nil { return nil } return o.Peers } // GetPeersOk returns a tuple with the Peers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnectProperties) GetPeersOk() (*[]Peer, bool) { if o == nil { return nil, false } return o.Peers, true } // SetPeers sets field value func (o *PrivateCrossConnectProperties) SetPeers(v []Peer) { o.Peers = &v } // HasPeers returns a boolean if a field has been set. func (o *PrivateCrossConnectProperties) HasPeers() bool { if o != nil && o.Peers != nil { return true } return false } // GetConnectableDatacenters returns the ConnectableDatacenters field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnectProperties) GetConnectableDatacenters() *[]ConnectableDatacenter { if o == nil { return nil } return o.ConnectableDatacenters } // GetConnectableDatacentersOk returns a tuple with the ConnectableDatacenters field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnectProperties) GetConnectableDatacentersOk() (*[]ConnectableDatacenter, bool) { if o == nil { return nil, false } return o.ConnectableDatacenters, true } // SetConnectableDatacenters sets field value func (o *PrivateCrossConnectProperties) SetConnectableDatacenters(v []ConnectableDatacenter) { o.ConnectableDatacenters = &v } // HasConnectableDatacenters returns a boolean if a field has been set. func (o *PrivateCrossConnectProperties) HasConnectableDatacenters() bool { if o != nil && o.ConnectableDatacenters != nil { return true } return false } func (o PrivateCrossConnectProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Description != nil { toSerialize["description"] = o.Description } if o.Peers != nil { toSerialize["peers"] = o.Peers } if o.ConnectableDatacenters != nil { toSerialize["connectableDatacenters"] = o.ConnectableDatacenters } return json.Marshal(toSerialize) } type NullablePrivateCrossConnectProperties struct { value *PrivateCrossConnectProperties isSet bool } func (v NullablePrivateCrossConnectProperties) Get() *PrivateCrossConnectProperties { return v.value } func (v *NullablePrivateCrossConnectProperties) Set(val *PrivateCrossConnectProperties) { v.value = val v.isSet = true } func (v NullablePrivateCrossConnectProperties) IsSet() bool { return v.isSet } func (v *NullablePrivateCrossConnectProperties) Unset() { v.value = nil v.isSet = false } func NewNullablePrivateCrossConnectProperties(val *PrivateCrossConnectProperties) *NullablePrivateCrossConnectProperties { return &NullablePrivateCrossConnectProperties{value: val, isSet: true} } func (v NullablePrivateCrossConnectProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullablePrivateCrossConnectProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_private_cross_connects.go000066400000000000000000000136461465267054300261750ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // PrivateCrossConnects struct for PrivateCrossConnects type PrivateCrossConnects struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]PrivateCrossConnect `json:"items,omitempty"` } // NewPrivateCrossConnects instantiates a new PrivateCrossConnects object // This constructor will assign default values to properties that have it defined, // 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 NewPrivateCrossConnects() *PrivateCrossConnects { this := PrivateCrossConnects{} return &this } // NewPrivateCrossConnectsWithDefaults instantiates a new PrivateCrossConnects object // This 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 NewPrivateCrossConnectsWithDefaults() *PrivateCrossConnects { this := PrivateCrossConnects{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnects) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnects) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *PrivateCrossConnects) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *PrivateCrossConnects) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnects) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnects) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *PrivateCrossConnects) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *PrivateCrossConnects) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnects) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnects) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *PrivateCrossConnects) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *PrivateCrossConnects) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *PrivateCrossConnects) GetItems() *[]PrivateCrossConnect { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PrivateCrossConnects) GetItemsOk() (*[]PrivateCrossConnect, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *PrivateCrossConnects) SetItems(v []PrivateCrossConnect) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *PrivateCrossConnects) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o PrivateCrossConnects) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullablePrivateCrossConnects struct { value *PrivateCrossConnects isSet bool } func (v NullablePrivateCrossConnects) Get() *PrivateCrossConnects { return v.value } func (v *NullablePrivateCrossConnects) Set(val *PrivateCrossConnects) { v.value = val v.isSet = true } func (v NullablePrivateCrossConnects) IsSet() bool { return v.isSet } func (v *NullablePrivateCrossConnects) Unset() { v.value = nil v.isSet = false } func NewNullablePrivateCrossConnects(val *PrivateCrossConnects) *NullablePrivateCrossConnects { return &NullablePrivateCrossConnects{value: val, isSet: true} } func (v NullablePrivateCrossConnects) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullablePrivateCrossConnects) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_remote_console_url.go000066400000000000000000000062041465267054300253050ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // RemoteConsoleUrl struct for RemoteConsoleUrl type RemoteConsoleUrl struct { // The remote console url with the jwToken parameter for access Url *string `json:"url,omitempty"` } // NewRemoteConsoleUrl instantiates a new RemoteConsoleUrl object // This constructor will assign default values to properties that have it defined, // 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 NewRemoteConsoleUrl() *RemoteConsoleUrl { this := RemoteConsoleUrl{} return &this } // NewRemoteConsoleUrlWithDefaults instantiates a new RemoteConsoleUrl object // This 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 NewRemoteConsoleUrlWithDefaults() *RemoteConsoleUrl { this := RemoteConsoleUrl{} return &this } // GetUrl returns the Url field value // If the value is explicit nil, nil is returned func (o *RemoteConsoleUrl) GetUrl() *string { if o == nil { return nil } return o.Url } // GetUrlOk returns a tuple with the Url field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RemoteConsoleUrl) GetUrlOk() (*string, bool) { if o == nil { return nil, false } return o.Url, true } // SetUrl sets field value func (o *RemoteConsoleUrl) SetUrl(v string) { o.Url = &v } // HasUrl returns a boolean if a field has been set. func (o *RemoteConsoleUrl) HasUrl() bool { if o != nil && o.Url != nil { return true } return false } func (o RemoteConsoleUrl) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Url != nil { toSerialize["url"] = o.Url } return json.Marshal(toSerialize) } type NullableRemoteConsoleUrl struct { value *RemoteConsoleUrl isSet bool } func (v NullableRemoteConsoleUrl) Get() *RemoteConsoleUrl { return v.value } func (v *NullableRemoteConsoleUrl) Set(val *RemoteConsoleUrl) { v.value = val v.isSet = true } func (v NullableRemoteConsoleUrl) IsSet() bool { return v.isSet } func (v *NullableRemoteConsoleUrl) Unset() { v.value = nil v.isSet = false } func NewNullableRemoteConsoleUrl(val *RemoteConsoleUrl) *NullableRemoteConsoleUrl { return &NullableRemoteConsoleUrl{value: val, isSet: true} } func (v NullableRemoteConsoleUrl) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableRemoteConsoleUrl) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_request.go000066400000000000000000000145531465267054300231040ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Request struct for Request type Request struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *RequestMetadata `json:"metadata,omitempty"` Properties *RequestProperties `json:"properties"` } // NewRequest instantiates a new Request object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewRequest(properties RequestProperties) *Request { this := Request{} this.Properties = &properties return &this } // NewRequestWithDefaults instantiates a new Request object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewRequestWithDefaults() *Request { this := Request{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Request) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Request) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Request) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Request) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Request) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Request) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Request) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Request) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Request) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Request) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Request) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Request) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Request) GetMetadata() *RequestMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Request) GetMetadataOk() (*RequestMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Request) SetMetadata(v RequestMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Request) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Request) GetProperties() *RequestProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Request) GetPropertiesOk() (*RequestProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Request) SetProperties(v RequestProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Request) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o Request) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableRequest struct { value *Request isSet bool } func (v NullableRequest) Get() *Request { return v.value } func (v *NullableRequest) Set(val *Request) { v.value = val v.isSet = true } func (v NullableRequest) IsSet() bool { return v.isSet } func (v *NullableRequest) Unset() { v.value = nil v.isSet = false } func NewNullableRequest(val *Request) *NullableRequest { return &NullableRequest{value: val, isSet: true} } func (v NullableRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_request_metadata.go000066400000000000000000000144741465267054300247460ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" "time" ) // RequestMetadata struct for RequestMetadata type RequestMetadata struct { // The last time the resource was created. CreatedDate *IonosTime // The user who created the resource. CreatedBy *string `json:"createdBy,omitempty"` // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. Etag *string `json:"etag,omitempty"` RequestStatus *RequestStatus `json:"requestStatus,omitempty"` } // NewRequestMetadata instantiates a new RequestMetadata object // This constructor will assign default values to properties that have it defined, // 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 NewRequestMetadata() *RequestMetadata { this := RequestMetadata{} return &this } // NewRequestMetadataWithDefaults instantiates a new RequestMetadata object // This 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 NewRequestMetadataWithDefaults() *RequestMetadata { this := RequestMetadata{} return &this } // GetCreatedDate returns the CreatedDate field value // If the value is explicit nil, nil is returned func (o *RequestMetadata) GetCreatedDate() *time.Time { if o == nil { return nil } if o.CreatedDate == nil { return nil } return &o.CreatedDate.Time } // GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.CreatedDate == nil { return nil, false } return &o.CreatedDate.Time, true } // SetCreatedDate sets field value func (o *RequestMetadata) SetCreatedDate(v time.Time) { o.CreatedDate = &IonosTime{v} } // HasCreatedDate returns a boolean if a field has been set. func (o *RequestMetadata) HasCreatedDate() bool { if o != nil && o.CreatedDate != nil { return true } return false } // GetCreatedBy returns the CreatedBy field value // If the value is explicit nil, nil is returned func (o *RequestMetadata) GetCreatedBy() *string { if o == nil { return nil } return o.CreatedBy } // GetCreatedByOk returns a tuple with the CreatedBy field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestMetadata) GetCreatedByOk() (*string, bool) { if o == nil { return nil, false } return o.CreatedBy, true } // SetCreatedBy sets field value func (o *RequestMetadata) SetCreatedBy(v string) { o.CreatedBy = &v } // HasCreatedBy returns a boolean if a field has been set. func (o *RequestMetadata) HasCreatedBy() bool { if o != nil && o.CreatedBy != nil { return true } return false } // GetEtag returns the Etag field value // If the value is explicit nil, nil is returned func (o *RequestMetadata) GetEtag() *string { if o == nil { return nil } return o.Etag } // GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestMetadata) GetEtagOk() (*string, bool) { if o == nil { return nil, false } return o.Etag, true } // SetEtag sets field value func (o *RequestMetadata) SetEtag(v string) { o.Etag = &v } // HasEtag returns a boolean if a field has been set. func (o *RequestMetadata) HasEtag() bool { if o != nil && o.Etag != nil { return true } return false } // GetRequestStatus returns the RequestStatus field value // If the value is explicit nil, nil is returned func (o *RequestMetadata) GetRequestStatus() *RequestStatus { if o == nil { return nil } return o.RequestStatus } // GetRequestStatusOk returns a tuple with the RequestStatus field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestMetadata) GetRequestStatusOk() (*RequestStatus, bool) { if o == nil { return nil, false } return o.RequestStatus, true } // SetRequestStatus sets field value func (o *RequestMetadata) SetRequestStatus(v RequestStatus) { o.RequestStatus = &v } // HasRequestStatus returns a boolean if a field has been set. func (o *RequestMetadata) HasRequestStatus() bool { if o != nil && o.RequestStatus != nil { return true } return false } func (o RequestMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.CreatedDate != nil { toSerialize["createdDate"] = o.CreatedDate } if o.CreatedBy != nil { toSerialize["createdBy"] = o.CreatedBy } if o.Etag != nil { toSerialize["etag"] = o.Etag } if o.RequestStatus != nil { toSerialize["requestStatus"] = o.RequestStatus } return json.Marshal(toSerialize) } type NullableRequestMetadata struct { value *RequestMetadata isSet bool } func (v NullableRequestMetadata) Get() *RequestMetadata { return v.value } func (v *NullableRequestMetadata) Set(val *RequestMetadata) { v.value = val v.isSet = true } func (v NullableRequestMetadata) IsSet() bool { return v.isSet } func (v *NullableRequestMetadata) Unset() { v.value = nil v.isSet = false } func NewNullableRequestMetadata(val *RequestMetadata) *NullableRequestMetadata { return &NullableRequestMetadata{value: val, isSet: true} } func (v NullableRequestMetadata) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableRequestMetadata) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_request_properties.go000066400000000000000000000133621465267054300253550ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // RequestProperties struct for RequestProperties type RequestProperties struct { Method *string `json:"method,omitempty"` Headers *map[string]string `json:"headers,omitempty"` Body *string `json:"body,omitempty"` Url *string `json:"url,omitempty"` } // NewRequestProperties instantiates a new RequestProperties object // This constructor will assign default values to properties that have it defined, // 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 NewRequestProperties() *RequestProperties { this := RequestProperties{} return &this } // NewRequestPropertiesWithDefaults instantiates a new RequestProperties object // This 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 NewRequestPropertiesWithDefaults() *RequestProperties { this := RequestProperties{} return &this } // GetMethod returns the Method field value // If the value is explicit nil, nil is returned func (o *RequestProperties) GetMethod() *string { if o == nil { return nil } return o.Method } // GetMethodOk returns a tuple with the Method field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestProperties) GetMethodOk() (*string, bool) { if o == nil { return nil, false } return o.Method, true } // SetMethod sets field value func (o *RequestProperties) SetMethod(v string) { o.Method = &v } // HasMethod returns a boolean if a field has been set. func (o *RequestProperties) HasMethod() bool { if o != nil && o.Method != nil { return true } return false } // GetHeaders returns the Headers field value // If the value is explicit nil, nil is returned func (o *RequestProperties) GetHeaders() *map[string]string { if o == nil { return nil } return o.Headers } // GetHeadersOk returns a tuple with the Headers field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestProperties) GetHeadersOk() (*map[string]string, bool) { if o == nil { return nil, false } return o.Headers, true } // SetHeaders sets field value func (o *RequestProperties) SetHeaders(v map[string]string) { o.Headers = &v } // HasHeaders returns a boolean if a field has been set. func (o *RequestProperties) HasHeaders() bool { if o != nil && o.Headers != nil { return true } return false } // GetBody returns the Body field value // If the value is explicit nil, nil is returned func (o *RequestProperties) GetBody() *string { if o == nil { return nil } return o.Body } // GetBodyOk returns a tuple with the Body field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestProperties) GetBodyOk() (*string, bool) { if o == nil { return nil, false } return o.Body, true } // SetBody sets field value func (o *RequestProperties) SetBody(v string) { o.Body = &v } // HasBody returns a boolean if a field has been set. func (o *RequestProperties) HasBody() bool { if o != nil && o.Body != nil { return true } return false } // GetUrl returns the Url field value // If the value is explicit nil, nil is returned func (o *RequestProperties) GetUrl() *string { if o == nil { return nil } return o.Url } // GetUrlOk returns a tuple with the Url field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestProperties) GetUrlOk() (*string, bool) { if o == nil { return nil, false } return o.Url, true } // SetUrl sets field value func (o *RequestProperties) SetUrl(v string) { o.Url = &v } // HasUrl returns a boolean if a field has been set. func (o *RequestProperties) HasUrl() bool { if o != nil && o.Url != nil { return true } return false } func (o RequestProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Method != nil { toSerialize["method"] = o.Method } if o.Headers != nil { toSerialize["headers"] = o.Headers } if o.Body != nil { toSerialize["body"] = o.Body } if o.Url != nil { toSerialize["url"] = o.Url } return json.Marshal(toSerialize) } type NullableRequestProperties struct { value *RequestProperties isSet bool } func (v NullableRequestProperties) Get() *RequestProperties { return v.value } func (v *NullableRequestProperties) Set(val *RequestProperties) { v.value = val v.isSet = true } func (v NullableRequestProperties) IsSet() bool { return v.isSet } func (v *NullableRequestProperties) Unset() { v.value = nil v.isSet = false } func NewNullableRequestProperties(val *RequestProperties) *NullableRequestProperties { return &NullableRequestProperties{value: val, isSet: true} } func (v NullableRequestProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableRequestProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_request_status.go000066400000000000000000000132301465267054300244760ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // RequestStatus struct for RequestStatus type RequestStatus struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *RequestStatusMetadata `json:"metadata,omitempty"` } // NewRequestStatus instantiates a new RequestStatus object // This constructor will assign default values to properties that have it defined, // 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 NewRequestStatus() *RequestStatus { this := RequestStatus{} return &this } // NewRequestStatusWithDefaults instantiates a new RequestStatus object // This 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 NewRequestStatusWithDefaults() *RequestStatus { this := RequestStatus{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *RequestStatus) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestStatus) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *RequestStatus) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *RequestStatus) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *RequestStatus) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestStatus) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *RequestStatus) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *RequestStatus) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *RequestStatus) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestStatus) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *RequestStatus) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *RequestStatus) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *RequestStatus) GetMetadata() *RequestStatusMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestStatus) GetMetadataOk() (*RequestStatusMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *RequestStatus) SetMetadata(v RequestStatusMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *RequestStatus) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } func (o RequestStatus) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } return json.Marshal(toSerialize) } type NullableRequestStatus struct { value *RequestStatus isSet bool } func (v NullableRequestStatus) Get() *RequestStatus { return v.value } func (v *NullableRequestStatus) Set(val *RequestStatus) { v.value = val v.isSet = true } func (v NullableRequestStatus) IsSet() bool { return v.isSet } func (v *NullableRequestStatus) Unset() { v.value = nil v.isSet = false } func NewNullableRequestStatus(val *RequestStatus) *NullableRequestStatus { return &NullableRequestStatus{value: val, isSet: true} } func (v NullableRequestStatus) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableRequestStatus) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_request_status_metadata.go000066400000000000000000000142251465267054300263430ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // RequestStatusMetadata struct for RequestStatusMetadata type RequestStatusMetadata struct { Status *string `json:"status,omitempty"` Message *string `json:"message,omitempty"` // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. Etag *string `json:"etag,omitempty"` Targets *[]RequestTarget `json:"targets,omitempty"` } // NewRequestStatusMetadata instantiates a new RequestStatusMetadata object // This constructor will assign default values to properties that have it defined, // 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 NewRequestStatusMetadata() *RequestStatusMetadata { this := RequestStatusMetadata{} return &this } // NewRequestStatusMetadataWithDefaults instantiates a new RequestStatusMetadata object // This 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 NewRequestStatusMetadataWithDefaults() *RequestStatusMetadata { this := RequestStatusMetadata{} return &this } // GetStatus returns the Status field value // If the value is explicit nil, nil is returned func (o *RequestStatusMetadata) GetStatus() *string { if o == nil { return nil } return o.Status } // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestStatusMetadata) GetStatusOk() (*string, bool) { if o == nil { return nil, false } return o.Status, true } // SetStatus sets field value func (o *RequestStatusMetadata) SetStatus(v string) { o.Status = &v } // HasStatus returns a boolean if a field has been set. func (o *RequestStatusMetadata) HasStatus() bool { if o != nil && o.Status != nil { return true } return false } // GetMessage returns the Message field value // If the value is explicit nil, nil is returned func (o *RequestStatusMetadata) GetMessage() *string { if o == nil { return nil } return o.Message } // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestStatusMetadata) GetMessageOk() (*string, bool) { if o == nil { return nil, false } return o.Message, true } // SetMessage sets field value func (o *RequestStatusMetadata) SetMessage(v string) { o.Message = &v } // HasMessage returns a boolean if a field has been set. func (o *RequestStatusMetadata) HasMessage() bool { if o != nil && o.Message != nil { return true } return false } // GetEtag returns the Etag field value // If the value is explicit nil, nil is returned func (o *RequestStatusMetadata) GetEtag() *string { if o == nil { return nil } return o.Etag } // GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestStatusMetadata) GetEtagOk() (*string, bool) { if o == nil { return nil, false } return o.Etag, true } // SetEtag sets field value func (o *RequestStatusMetadata) SetEtag(v string) { o.Etag = &v } // HasEtag returns a boolean if a field has been set. func (o *RequestStatusMetadata) HasEtag() bool { if o != nil && o.Etag != nil { return true } return false } // GetTargets returns the Targets field value // If the value is explicit nil, nil is returned func (o *RequestStatusMetadata) GetTargets() *[]RequestTarget { if o == nil { return nil } return o.Targets } // GetTargetsOk returns a tuple with the Targets field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestStatusMetadata) GetTargetsOk() (*[]RequestTarget, bool) { if o == nil { return nil, false } return o.Targets, true } // SetTargets sets field value func (o *RequestStatusMetadata) SetTargets(v []RequestTarget) { o.Targets = &v } // HasTargets returns a boolean if a field has been set. func (o *RequestStatusMetadata) HasTargets() bool { if o != nil && o.Targets != nil { return true } return false } func (o RequestStatusMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Status != nil { toSerialize["status"] = o.Status } if o.Message != nil { toSerialize["message"] = o.Message } if o.Etag != nil { toSerialize["etag"] = o.Etag } if o.Targets != nil { toSerialize["targets"] = o.Targets } return json.Marshal(toSerialize) } type NullableRequestStatusMetadata struct { value *RequestStatusMetadata isSet bool } func (v NullableRequestStatusMetadata) Get() *RequestStatusMetadata { return v.value } func (v *NullableRequestStatusMetadata) Set(val *RequestStatusMetadata) { v.value = val v.isSet = true } func (v NullableRequestStatusMetadata) IsSet() bool { return v.isSet } func (v *NullableRequestStatusMetadata) Unset() { v.value = nil v.isSet = false } func NewNullableRequestStatusMetadata(val *RequestStatusMetadata) *NullableRequestStatusMetadata { return &NullableRequestStatusMetadata{value: val, isSet: true} } func (v NullableRequestStatusMetadata) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableRequestStatusMetadata) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_request_target.go000066400000000000000000000076621465267054300244550ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // RequestTarget struct for RequestTarget type RequestTarget struct { Target *ResourceReference `json:"target,omitempty"` Status *string `json:"status,omitempty"` } // NewRequestTarget instantiates a new RequestTarget object // This constructor will assign default values to properties that have it defined, // 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 NewRequestTarget() *RequestTarget { this := RequestTarget{} return &this } // NewRequestTargetWithDefaults instantiates a new RequestTarget object // This 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 NewRequestTargetWithDefaults() *RequestTarget { this := RequestTarget{} return &this } // GetTarget returns the Target field value // If the value is explicit nil, nil is returned func (o *RequestTarget) GetTarget() *ResourceReference { if o == nil { return nil } return o.Target } // GetTargetOk returns a tuple with the Target field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestTarget) GetTargetOk() (*ResourceReference, bool) { if o == nil { return nil, false } return o.Target, true } // SetTarget sets field value func (o *RequestTarget) SetTarget(v ResourceReference) { o.Target = &v } // HasTarget returns a boolean if a field has been set. func (o *RequestTarget) HasTarget() bool { if o != nil && o.Target != nil { return true } return false } // GetStatus returns the Status field value // If the value is explicit nil, nil is returned func (o *RequestTarget) GetStatus() *string { if o == nil { return nil } return o.Status } // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *RequestTarget) GetStatusOk() (*string, bool) { if o == nil { return nil, false } return o.Status, true } // SetStatus sets field value func (o *RequestTarget) SetStatus(v string) { o.Status = &v } // HasStatus returns a boolean if a field has been set. func (o *RequestTarget) HasStatus() bool { if o != nil && o.Status != nil { return true } return false } func (o RequestTarget) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Target != nil { toSerialize["target"] = o.Target } if o.Status != nil { toSerialize["status"] = o.Status } return json.Marshal(toSerialize) } type NullableRequestTarget struct { value *RequestTarget isSet bool } func (v NullableRequestTarget) Get() *RequestTarget { return v.value } func (v *NullableRequestTarget) Set(val *RequestTarget) { v.value = val v.isSet = true } func (v NullableRequestTarget) IsSet() bool { return v.isSet } func (v *NullableRequestTarget) Unset() { v.value = nil v.isSet = false } func NewNullableRequestTarget(val *RequestTarget) *NullableRequestTarget { return &NullableRequestTarget{value: val, isSet: true} } func (v NullableRequestTarget) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableRequestTarget) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_requests.go000066400000000000000000000201621465267054300232600ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Requests struct for Requests type Requests struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Request `json:"items,omitempty"` // The offset, specified in the request (if not is specified, 0 is used by default). Offset *float32 `json:"offset"` // The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). Limit *float32 `json:"limit"` Links *PaginationLinks `json:"_links"` } // NewRequests instantiates a new Requests object // This constructor will assign default values to properties that have it defined, // 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 NewRequests(offset float32, limit float32, links PaginationLinks) *Requests { this := Requests{} this.Offset = &offset this.Limit = &limit this.Links = &links return &this } // NewRequestsWithDefaults instantiates a new Requests object // This 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 NewRequestsWithDefaults() *Requests { this := Requests{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Requests) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Requests) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Requests) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Requests) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Requests) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Requests) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Requests) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Requests) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Requests) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Requests) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Requests) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Requests) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Requests) GetItems() *[]Request { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Requests) GetItemsOk() (*[]Request, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Requests) SetItems(v []Request) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Requests) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *Requests) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Requests) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *Requests) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *Requests) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *Requests) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Requests) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *Requests) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *Requests) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *Requests) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Requests) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *Requests) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *Requests) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o Requests) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableRequests struct { value *Requests isSet bool } func (v NullableRequests) Get() *Requests { return v.value } func (v *NullableRequests) Set(val *Requests) { v.value = val v.isSet = true } func (v NullableRequests) IsSet() bool { return v.isSet } func (v *NullableRequests) Unset() { v.value = nil v.isSet = false } func NewNullableRequests(val *Requests) *NullableRequests { return &NullableRequests{value: val, isSet: true} } func (v NullableRequests) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableRequests) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_resource.go000066400000000000000000000165051465267054300232420ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Resource datacenter resource representation type Resource struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of the resource. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *ResourceProperties `json:"properties,omitempty"` Entities *ResourceEntities `json:"entities,omitempty"` } // NewResource instantiates a new Resource object // This constructor will assign default values to properties that have it defined, // 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 NewResource() *Resource { this := Resource{} return &this } // NewResourceWithDefaults instantiates a new Resource object // This 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 NewResourceWithDefaults() *Resource { this := Resource{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Resource) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Resource) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Resource) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Resource) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Resource) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Resource) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Resource) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Resource) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Resource) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Resource) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Resource) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Resource) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Resource) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Resource) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Resource) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Resource) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Resource) GetProperties() *ResourceProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Resource) GetPropertiesOk() (*ResourceProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Resource) SetProperties(v ResourceProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Resource) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *Resource) GetEntities() *ResourceEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Resource) GetEntitiesOk() (*ResourceEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *Resource) SetEntities(v ResourceEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *Resource) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o Resource) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableResource struct { value *Resource isSet bool } func (v NullableResource) Get() *Resource { return v.value } func (v *NullableResource) Set(val *Resource) { v.value = val v.isSet = true } func (v NullableResource) IsSet() bool { return v.isSet } func (v *NullableResource) Unset() { v.value = nil v.isSet = false } func NewNullableResource(val *Resource) *NullableResource { return &NullableResource{value: val, isSet: true} } func (v NullableResource) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableResource) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_resource_entities.go000066400000000000000000000062341465267054300251440ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ResourceEntities struct for ResourceEntities type ResourceEntities struct { Groups *ResourceGroups `json:"groups,omitempty"` } // NewResourceEntities instantiates a new ResourceEntities object // This constructor will assign default values to properties that have it defined, // 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 NewResourceEntities() *ResourceEntities { this := ResourceEntities{} return &this } // NewResourceEntitiesWithDefaults instantiates a new ResourceEntities object // This 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 NewResourceEntitiesWithDefaults() *ResourceEntities { this := ResourceEntities{} return &this } // GetGroups returns the Groups field value // If the value is explicit nil, nil is returned func (o *ResourceEntities) GetGroups() *ResourceGroups { if o == nil { return nil } return o.Groups } // GetGroupsOk returns a tuple with the Groups field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceEntities) GetGroupsOk() (*ResourceGroups, bool) { if o == nil { return nil, false } return o.Groups, true } // SetGroups sets field value func (o *ResourceEntities) SetGroups(v ResourceGroups) { o.Groups = &v } // HasGroups returns a boolean if a field has been set. func (o *ResourceEntities) HasGroups() bool { if o != nil && o.Groups != nil { return true } return false } func (o ResourceEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Groups != nil { toSerialize["groups"] = o.Groups } return json.Marshal(toSerialize) } type NullableResourceEntities struct { value *ResourceEntities isSet bool } func (v NullableResourceEntities) Get() *ResourceEntities { return v.value } func (v *NullableResourceEntities) Set(val *ResourceEntities) { v.value = val v.isSet = true } func (v NullableResourceEntities) IsSet() bool { return v.isSet } func (v *NullableResourceEntities) Unset() { v.value = nil v.isSet = false } func NewNullableResourceEntities(val *ResourceEntities) *NullableResourceEntities { return &NullableResourceEntities{value: val, isSet: true} } func (v NullableResourceEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableResourceEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_resource_groups.go000066400000000000000000000131521465267054300246340ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ResourceGroups Resources assigned to this group. type ResourceGroups struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of the resource. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Resource `json:"items,omitempty"` } // NewResourceGroups instantiates a new ResourceGroups object // This constructor will assign default values to properties that have it defined, // 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 NewResourceGroups() *ResourceGroups { this := ResourceGroups{} return &this } // NewResourceGroupsWithDefaults instantiates a new ResourceGroups object // This 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 NewResourceGroupsWithDefaults() *ResourceGroups { this := ResourceGroups{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *ResourceGroups) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceGroups) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *ResourceGroups) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *ResourceGroups) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ResourceGroups) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceGroups) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ResourceGroups) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ResourceGroups) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *ResourceGroups) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceGroups) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *ResourceGroups) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *ResourceGroups) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *ResourceGroups) GetItems() *[]Resource { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceGroups) GetItemsOk() (*[]Resource, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *ResourceGroups) SetItems(v []Resource) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *ResourceGroups) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o ResourceGroups) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableResourceGroups struct { value *ResourceGroups isSet bool } func (v NullableResourceGroups) Get() *ResourceGroups { return v.value } func (v *NullableResourceGroups) Set(val *ResourceGroups) { v.value = val v.isSet = true } func (v NullableResourceGroups) IsSet() bool { return v.isSet } func (v *NullableResourceGroups) Unset() { v.value = nil v.isSet = false } func NewNullableResourceGroups(val *ResourceGroups) *NullableResourceGroups { return &NullableResourceGroups{value: val, isSet: true} } func (v NullableResourceGroups) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableResourceGroups) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_resource_limits.go000066400000000000000000000701061465267054300246200ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ResourceLimits struct for ResourceLimits type ResourceLimits struct { // The maximum number of CPU cores per server. CoresPerServer *int32 `json:"coresPerServer"` // The maximum number of CPU cores per contract. CoresPerContract *int32 `json:"coresPerContract"` // The number of CPU cores provisioned. CoresProvisioned *int32 `json:"coresProvisioned"` // The maximum amount of RAM (in MB) that can be provisioned for a particular server under this contract. RamPerServer *int32 `json:"ramPerServer"` // The maximum amount of RAM (in MB) that can be provisioned under this contract. RamPerContract *int32 `json:"ramPerContract"` // The amount of RAM (in MB) provisioned under this contract. RamProvisioned *int32 `json:"ramProvisioned"` // The maximum size (in MB) of an idividual hard disk volume. HddLimitPerVolume *int64 `json:"hddLimitPerVolume"` // The maximum amount of disk space (in MB) that can be provided under this contract. HddLimitPerContract *int64 `json:"hddLimitPerContract"` // The amount of hard disk space (in MB) that is currently provisioned. HddVolumeProvisioned *int64 `json:"hddVolumeProvisioned"` // The maximum size (in MB) of an individual solid state disk volume. SsdLimitPerVolume *int64 `json:"ssdLimitPerVolume"` // The maximum amount of solid state disk space (in MB) that can be provisioned under this contract. SsdLimitPerContract *int64 `json:"ssdLimitPerContract"` // The amount of solid state disk space (in MB) that is currently provisioned. SsdVolumeProvisioned *int64 `json:"ssdVolumeProvisioned"` // The amount of DAS disk space (in MB) in a Cube server that is currently provisioned. DasVolumeProvisioned *int64 `json:"dasVolumeProvisioned"` // The maximum number of static public IP addresses that can be reserved by this customer across contracts. ReservableIps *int32 `json:"reservableIps"` // The maximum number of static public IP addresses that can be reserved for this contract. ReservedIpsOnContract *int32 `json:"reservedIpsOnContract"` // The number of static public IP addresses in use. ReservedIpsInUse *int32 `json:"reservedIpsInUse"` // The maximum number of Kubernetes clusters that can be created under this contract. K8sClusterLimitTotal *int32 `json:"k8sClusterLimitTotal"` // The amount of Kubernetes clusters that is currently provisioned. K8sClustersProvisioned *int32 `json:"k8sClustersProvisioned"` // The NLB total limit. NlbLimitTotal *int32 `json:"nlbLimitTotal"` // The NLBs provisioned. NlbProvisioned *int32 `json:"nlbProvisioned"` // The NAT Gateway total limit. NatGatewayLimitTotal *int32 `json:"natGatewayLimitTotal"` // The NAT Gateways provisioned. NatGatewayProvisioned *int32 `json:"natGatewayProvisioned"` } // NewResourceLimits instantiates a new ResourceLimits object // This constructor will assign default values to properties that have it defined, // 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 NewResourceLimits(coresPerServer int32, coresPerContract int32, coresProvisioned int32, ramPerServer int32, ramPerContract int32, ramProvisioned int32, hddLimitPerVolume int64, hddLimitPerContract int64, hddVolumeProvisioned int64, ssdLimitPerVolume int64, ssdLimitPerContract int64, ssdVolumeProvisioned int64, dasVolumeProvisioned int64, reservableIps int32, reservedIpsOnContract int32, reservedIpsInUse int32, k8sClusterLimitTotal int32, k8sClustersProvisioned int32, nlbLimitTotal int32, nlbProvisioned int32, natGatewayLimitTotal int32, natGatewayProvisioned int32) *ResourceLimits { this := ResourceLimits{} this.CoresPerServer = &coresPerServer this.CoresPerContract = &coresPerContract this.CoresProvisioned = &coresProvisioned this.RamPerServer = &ramPerServer this.RamPerContract = &ramPerContract this.RamProvisioned = &ramProvisioned this.HddLimitPerVolume = &hddLimitPerVolume this.HddLimitPerContract = &hddLimitPerContract this.HddVolumeProvisioned = &hddVolumeProvisioned this.SsdLimitPerVolume = &ssdLimitPerVolume this.SsdLimitPerContract = &ssdLimitPerContract this.SsdVolumeProvisioned = &ssdVolumeProvisioned this.DasVolumeProvisioned = &dasVolumeProvisioned this.ReservableIps = &reservableIps this.ReservedIpsOnContract = &reservedIpsOnContract this.ReservedIpsInUse = &reservedIpsInUse this.K8sClusterLimitTotal = &k8sClusterLimitTotal this.K8sClustersProvisioned = &k8sClustersProvisioned this.NlbLimitTotal = &nlbLimitTotal this.NlbProvisioned = &nlbProvisioned this.NatGatewayLimitTotal = &natGatewayLimitTotal this.NatGatewayProvisioned = &natGatewayProvisioned return &this } // NewResourceLimitsWithDefaults instantiates a new ResourceLimits object // This 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 NewResourceLimitsWithDefaults() *ResourceLimits { this := ResourceLimits{} return &this } // GetCoresPerServer returns the CoresPerServer field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetCoresPerServer() *int32 { if o == nil { return nil } return o.CoresPerServer } // GetCoresPerServerOk returns a tuple with the CoresPerServer field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetCoresPerServerOk() (*int32, bool) { if o == nil { return nil, false } return o.CoresPerServer, true } // SetCoresPerServer sets field value func (o *ResourceLimits) SetCoresPerServer(v int32) { o.CoresPerServer = &v } // HasCoresPerServer returns a boolean if a field has been set. func (o *ResourceLimits) HasCoresPerServer() bool { if o != nil && o.CoresPerServer != nil { return true } return false } // GetCoresPerContract returns the CoresPerContract field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetCoresPerContract() *int32 { if o == nil { return nil } return o.CoresPerContract } // GetCoresPerContractOk returns a tuple with the CoresPerContract field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetCoresPerContractOk() (*int32, bool) { if o == nil { return nil, false } return o.CoresPerContract, true } // SetCoresPerContract sets field value func (o *ResourceLimits) SetCoresPerContract(v int32) { o.CoresPerContract = &v } // HasCoresPerContract returns a boolean if a field has been set. func (o *ResourceLimits) HasCoresPerContract() bool { if o != nil && o.CoresPerContract != nil { return true } return false } // GetCoresProvisioned returns the CoresProvisioned field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetCoresProvisioned() *int32 { if o == nil { return nil } return o.CoresProvisioned } // GetCoresProvisionedOk returns a tuple with the CoresProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetCoresProvisionedOk() (*int32, bool) { if o == nil { return nil, false } return o.CoresProvisioned, true } // SetCoresProvisioned sets field value func (o *ResourceLimits) SetCoresProvisioned(v int32) { o.CoresProvisioned = &v } // HasCoresProvisioned returns a boolean if a field has been set. func (o *ResourceLimits) HasCoresProvisioned() bool { if o != nil && o.CoresProvisioned != nil { return true } return false } // GetRamPerServer returns the RamPerServer field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetRamPerServer() *int32 { if o == nil { return nil } return o.RamPerServer } // GetRamPerServerOk returns a tuple with the RamPerServer field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetRamPerServerOk() (*int32, bool) { if o == nil { return nil, false } return o.RamPerServer, true } // SetRamPerServer sets field value func (o *ResourceLimits) SetRamPerServer(v int32) { o.RamPerServer = &v } // HasRamPerServer returns a boolean if a field has been set. func (o *ResourceLimits) HasRamPerServer() bool { if o != nil && o.RamPerServer != nil { return true } return false } // GetRamPerContract returns the RamPerContract field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetRamPerContract() *int32 { if o == nil { return nil } return o.RamPerContract } // GetRamPerContractOk returns a tuple with the RamPerContract field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetRamPerContractOk() (*int32, bool) { if o == nil { return nil, false } return o.RamPerContract, true } // SetRamPerContract sets field value func (o *ResourceLimits) SetRamPerContract(v int32) { o.RamPerContract = &v } // HasRamPerContract returns a boolean if a field has been set. func (o *ResourceLimits) HasRamPerContract() bool { if o != nil && o.RamPerContract != nil { return true } return false } // GetRamProvisioned returns the RamProvisioned field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetRamProvisioned() *int32 { if o == nil { return nil } return o.RamProvisioned } // GetRamProvisionedOk returns a tuple with the RamProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetRamProvisionedOk() (*int32, bool) { if o == nil { return nil, false } return o.RamProvisioned, true } // SetRamProvisioned sets field value func (o *ResourceLimits) SetRamProvisioned(v int32) { o.RamProvisioned = &v } // HasRamProvisioned returns a boolean if a field has been set. func (o *ResourceLimits) HasRamProvisioned() bool { if o != nil && o.RamProvisioned != nil { return true } return false } // GetHddLimitPerVolume returns the HddLimitPerVolume field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetHddLimitPerVolume() *int64 { if o == nil { return nil } return o.HddLimitPerVolume } // GetHddLimitPerVolumeOk returns a tuple with the HddLimitPerVolume field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetHddLimitPerVolumeOk() (*int64, bool) { if o == nil { return nil, false } return o.HddLimitPerVolume, true } // SetHddLimitPerVolume sets field value func (o *ResourceLimits) SetHddLimitPerVolume(v int64) { o.HddLimitPerVolume = &v } // HasHddLimitPerVolume returns a boolean if a field has been set. func (o *ResourceLimits) HasHddLimitPerVolume() bool { if o != nil && o.HddLimitPerVolume != nil { return true } return false } // GetHddLimitPerContract returns the HddLimitPerContract field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetHddLimitPerContract() *int64 { if o == nil { return nil } return o.HddLimitPerContract } // GetHddLimitPerContractOk returns a tuple with the HddLimitPerContract field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetHddLimitPerContractOk() (*int64, bool) { if o == nil { return nil, false } return o.HddLimitPerContract, true } // SetHddLimitPerContract sets field value func (o *ResourceLimits) SetHddLimitPerContract(v int64) { o.HddLimitPerContract = &v } // HasHddLimitPerContract returns a boolean if a field has been set. func (o *ResourceLimits) HasHddLimitPerContract() bool { if o != nil && o.HddLimitPerContract != nil { return true } return false } // GetHddVolumeProvisioned returns the HddVolumeProvisioned field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetHddVolumeProvisioned() *int64 { if o == nil { return nil } return o.HddVolumeProvisioned } // GetHddVolumeProvisionedOk returns a tuple with the HddVolumeProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetHddVolumeProvisionedOk() (*int64, bool) { if o == nil { return nil, false } return o.HddVolumeProvisioned, true } // SetHddVolumeProvisioned sets field value func (o *ResourceLimits) SetHddVolumeProvisioned(v int64) { o.HddVolumeProvisioned = &v } // HasHddVolumeProvisioned returns a boolean if a field has been set. func (o *ResourceLimits) HasHddVolumeProvisioned() bool { if o != nil && o.HddVolumeProvisioned != nil { return true } return false } // GetSsdLimitPerVolume returns the SsdLimitPerVolume field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetSsdLimitPerVolume() *int64 { if o == nil { return nil } return o.SsdLimitPerVolume } // GetSsdLimitPerVolumeOk returns a tuple with the SsdLimitPerVolume field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetSsdLimitPerVolumeOk() (*int64, bool) { if o == nil { return nil, false } return o.SsdLimitPerVolume, true } // SetSsdLimitPerVolume sets field value func (o *ResourceLimits) SetSsdLimitPerVolume(v int64) { o.SsdLimitPerVolume = &v } // HasSsdLimitPerVolume returns a boolean if a field has been set. func (o *ResourceLimits) HasSsdLimitPerVolume() bool { if o != nil && o.SsdLimitPerVolume != nil { return true } return false } // GetSsdLimitPerContract returns the SsdLimitPerContract field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetSsdLimitPerContract() *int64 { if o == nil { return nil } return o.SsdLimitPerContract } // GetSsdLimitPerContractOk returns a tuple with the SsdLimitPerContract field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetSsdLimitPerContractOk() (*int64, bool) { if o == nil { return nil, false } return o.SsdLimitPerContract, true } // SetSsdLimitPerContract sets field value func (o *ResourceLimits) SetSsdLimitPerContract(v int64) { o.SsdLimitPerContract = &v } // HasSsdLimitPerContract returns a boolean if a field has been set. func (o *ResourceLimits) HasSsdLimitPerContract() bool { if o != nil && o.SsdLimitPerContract != nil { return true } return false } // GetSsdVolumeProvisioned returns the SsdVolumeProvisioned field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetSsdVolumeProvisioned() *int64 { if o == nil { return nil } return o.SsdVolumeProvisioned } // GetSsdVolumeProvisionedOk returns a tuple with the SsdVolumeProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetSsdVolumeProvisionedOk() (*int64, bool) { if o == nil { return nil, false } return o.SsdVolumeProvisioned, true } // SetSsdVolumeProvisioned sets field value func (o *ResourceLimits) SetSsdVolumeProvisioned(v int64) { o.SsdVolumeProvisioned = &v } // HasSsdVolumeProvisioned returns a boolean if a field has been set. func (o *ResourceLimits) HasSsdVolumeProvisioned() bool { if o != nil && o.SsdVolumeProvisioned != nil { return true } return false } // GetDasVolumeProvisioned returns the DasVolumeProvisioned field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetDasVolumeProvisioned() *int64 { if o == nil { return nil } return o.DasVolumeProvisioned } // GetDasVolumeProvisionedOk returns a tuple with the DasVolumeProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetDasVolumeProvisionedOk() (*int64, bool) { if o == nil { return nil, false } return o.DasVolumeProvisioned, true } // SetDasVolumeProvisioned sets field value func (o *ResourceLimits) SetDasVolumeProvisioned(v int64) { o.DasVolumeProvisioned = &v } // HasDasVolumeProvisioned returns a boolean if a field has been set. func (o *ResourceLimits) HasDasVolumeProvisioned() bool { if o != nil && o.DasVolumeProvisioned != nil { return true } return false } // GetReservableIps returns the ReservableIps field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetReservableIps() *int32 { if o == nil { return nil } return o.ReservableIps } // GetReservableIpsOk returns a tuple with the ReservableIps field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetReservableIpsOk() (*int32, bool) { if o == nil { return nil, false } return o.ReservableIps, true } // SetReservableIps sets field value func (o *ResourceLimits) SetReservableIps(v int32) { o.ReservableIps = &v } // HasReservableIps returns a boolean if a field has been set. func (o *ResourceLimits) HasReservableIps() bool { if o != nil && o.ReservableIps != nil { return true } return false } // GetReservedIpsOnContract returns the ReservedIpsOnContract field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetReservedIpsOnContract() *int32 { if o == nil { return nil } return o.ReservedIpsOnContract } // GetReservedIpsOnContractOk returns a tuple with the ReservedIpsOnContract field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetReservedIpsOnContractOk() (*int32, bool) { if o == nil { return nil, false } return o.ReservedIpsOnContract, true } // SetReservedIpsOnContract sets field value func (o *ResourceLimits) SetReservedIpsOnContract(v int32) { o.ReservedIpsOnContract = &v } // HasReservedIpsOnContract returns a boolean if a field has been set. func (o *ResourceLimits) HasReservedIpsOnContract() bool { if o != nil && o.ReservedIpsOnContract != nil { return true } return false } // GetReservedIpsInUse returns the ReservedIpsInUse field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetReservedIpsInUse() *int32 { if o == nil { return nil } return o.ReservedIpsInUse } // GetReservedIpsInUseOk returns a tuple with the ReservedIpsInUse field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetReservedIpsInUseOk() (*int32, bool) { if o == nil { return nil, false } return o.ReservedIpsInUse, true } // SetReservedIpsInUse sets field value func (o *ResourceLimits) SetReservedIpsInUse(v int32) { o.ReservedIpsInUse = &v } // HasReservedIpsInUse returns a boolean if a field has been set. func (o *ResourceLimits) HasReservedIpsInUse() bool { if o != nil && o.ReservedIpsInUse != nil { return true } return false } // GetK8sClusterLimitTotal returns the K8sClusterLimitTotal field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetK8sClusterLimitTotal() *int32 { if o == nil { return nil } return o.K8sClusterLimitTotal } // GetK8sClusterLimitTotalOk returns a tuple with the K8sClusterLimitTotal field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetK8sClusterLimitTotalOk() (*int32, bool) { if o == nil { return nil, false } return o.K8sClusterLimitTotal, true } // SetK8sClusterLimitTotal sets field value func (o *ResourceLimits) SetK8sClusterLimitTotal(v int32) { o.K8sClusterLimitTotal = &v } // HasK8sClusterLimitTotal returns a boolean if a field has been set. func (o *ResourceLimits) HasK8sClusterLimitTotal() bool { if o != nil && o.K8sClusterLimitTotal != nil { return true } return false } // GetK8sClustersProvisioned returns the K8sClustersProvisioned field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetK8sClustersProvisioned() *int32 { if o == nil { return nil } return o.K8sClustersProvisioned } // GetK8sClustersProvisionedOk returns a tuple with the K8sClustersProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetK8sClustersProvisionedOk() (*int32, bool) { if o == nil { return nil, false } return o.K8sClustersProvisioned, true } // SetK8sClustersProvisioned sets field value func (o *ResourceLimits) SetK8sClustersProvisioned(v int32) { o.K8sClustersProvisioned = &v } // HasK8sClustersProvisioned returns a boolean if a field has been set. func (o *ResourceLimits) HasK8sClustersProvisioned() bool { if o != nil && o.K8sClustersProvisioned != nil { return true } return false } // GetNlbLimitTotal returns the NlbLimitTotal field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetNlbLimitTotal() *int32 { if o == nil { return nil } return o.NlbLimitTotal } // GetNlbLimitTotalOk returns a tuple with the NlbLimitTotal field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetNlbLimitTotalOk() (*int32, bool) { if o == nil { return nil, false } return o.NlbLimitTotal, true } // SetNlbLimitTotal sets field value func (o *ResourceLimits) SetNlbLimitTotal(v int32) { o.NlbLimitTotal = &v } // HasNlbLimitTotal returns a boolean if a field has been set. func (o *ResourceLimits) HasNlbLimitTotal() bool { if o != nil && o.NlbLimitTotal != nil { return true } return false } // GetNlbProvisioned returns the NlbProvisioned field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetNlbProvisioned() *int32 { if o == nil { return nil } return o.NlbProvisioned } // GetNlbProvisionedOk returns a tuple with the NlbProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetNlbProvisionedOk() (*int32, bool) { if o == nil { return nil, false } return o.NlbProvisioned, true } // SetNlbProvisioned sets field value func (o *ResourceLimits) SetNlbProvisioned(v int32) { o.NlbProvisioned = &v } // HasNlbProvisioned returns a boolean if a field has been set. func (o *ResourceLimits) HasNlbProvisioned() bool { if o != nil && o.NlbProvisioned != nil { return true } return false } // GetNatGatewayLimitTotal returns the NatGatewayLimitTotal field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetNatGatewayLimitTotal() *int32 { if o == nil { return nil } return o.NatGatewayLimitTotal } // GetNatGatewayLimitTotalOk returns a tuple with the NatGatewayLimitTotal field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetNatGatewayLimitTotalOk() (*int32, bool) { if o == nil { return nil, false } return o.NatGatewayLimitTotal, true } // SetNatGatewayLimitTotal sets field value func (o *ResourceLimits) SetNatGatewayLimitTotal(v int32) { o.NatGatewayLimitTotal = &v } // HasNatGatewayLimitTotal returns a boolean if a field has been set. func (o *ResourceLimits) HasNatGatewayLimitTotal() bool { if o != nil && o.NatGatewayLimitTotal != nil { return true } return false } // GetNatGatewayProvisioned returns the NatGatewayProvisioned field value // If the value is explicit nil, nil is returned func (o *ResourceLimits) GetNatGatewayProvisioned() *int32 { if o == nil { return nil } return o.NatGatewayProvisioned } // GetNatGatewayProvisionedOk returns a tuple with the NatGatewayProvisioned field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceLimits) GetNatGatewayProvisionedOk() (*int32, bool) { if o == nil { return nil, false } return o.NatGatewayProvisioned, true } // SetNatGatewayProvisioned sets field value func (o *ResourceLimits) SetNatGatewayProvisioned(v int32) { o.NatGatewayProvisioned = &v } // HasNatGatewayProvisioned returns a boolean if a field has been set. func (o *ResourceLimits) HasNatGatewayProvisioned() bool { if o != nil && o.NatGatewayProvisioned != nil { return true } return false } func (o ResourceLimits) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.CoresPerServer != nil { toSerialize["coresPerServer"] = o.CoresPerServer } if o.CoresPerContract != nil { toSerialize["coresPerContract"] = o.CoresPerContract } if o.CoresProvisioned != nil { toSerialize["coresProvisioned"] = o.CoresProvisioned } if o.RamPerServer != nil { toSerialize["ramPerServer"] = o.RamPerServer } if o.RamPerContract != nil { toSerialize["ramPerContract"] = o.RamPerContract } if o.RamProvisioned != nil { toSerialize["ramProvisioned"] = o.RamProvisioned } if o.HddLimitPerVolume != nil { toSerialize["hddLimitPerVolume"] = o.HddLimitPerVolume } if o.HddLimitPerContract != nil { toSerialize["hddLimitPerContract"] = o.HddLimitPerContract } if o.HddVolumeProvisioned != nil { toSerialize["hddVolumeProvisioned"] = o.HddVolumeProvisioned } if o.SsdLimitPerVolume != nil { toSerialize["ssdLimitPerVolume"] = o.SsdLimitPerVolume } if o.SsdLimitPerContract != nil { toSerialize["ssdLimitPerContract"] = o.SsdLimitPerContract } if o.SsdVolumeProvisioned != nil { toSerialize["ssdVolumeProvisioned"] = o.SsdVolumeProvisioned } if o.DasVolumeProvisioned != nil { toSerialize["dasVolumeProvisioned"] = o.DasVolumeProvisioned } if o.ReservableIps != nil { toSerialize["reservableIps"] = o.ReservableIps } if o.ReservedIpsOnContract != nil { toSerialize["reservedIpsOnContract"] = o.ReservedIpsOnContract } if o.ReservedIpsInUse != nil { toSerialize["reservedIpsInUse"] = o.ReservedIpsInUse } if o.K8sClusterLimitTotal != nil { toSerialize["k8sClusterLimitTotal"] = o.K8sClusterLimitTotal } if o.K8sClustersProvisioned != nil { toSerialize["k8sClustersProvisioned"] = o.K8sClustersProvisioned } if o.NlbLimitTotal != nil { toSerialize["nlbLimitTotal"] = o.NlbLimitTotal } if o.NlbProvisioned != nil { toSerialize["nlbProvisioned"] = o.NlbProvisioned } if o.NatGatewayLimitTotal != nil { toSerialize["natGatewayLimitTotal"] = o.NatGatewayLimitTotal } if o.NatGatewayProvisioned != nil { toSerialize["natGatewayProvisioned"] = o.NatGatewayProvisioned } return json.Marshal(toSerialize) } type NullableResourceLimits struct { value *ResourceLimits isSet bool } func (v NullableResourceLimits) Get() *ResourceLimits { return v.value } func (v *NullableResourceLimits) Set(val *ResourceLimits) { v.value = val v.isSet = true } func (v NullableResourceLimits) IsSet() bool { return v.isSet } func (v *NullableResourceLimits) Unset() { v.value = nil v.isSet = false } func NewNullableResourceLimits(val *ResourceLimits) *NullableResourceLimits { return &NullableResourceLimits{value: val, isSet: true} } func (v NullableResourceLimits) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableResourceLimits) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_resource_properties.go000066400000000000000000000110631465267054300255100ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ResourceProperties struct for ResourceProperties type ResourceProperties struct { // The name of the resource. Name *string `json:"name,omitempty"` // Boolean value representing if the resource is multi factor protected or not e.g. using two factor protection. Currently only data centers and snapshots are allowed to be multi factor protected, The value of attribute if null is intentional and it means that the resource doesn't support multi factor protection at all. SecAuthProtection *bool `json:"secAuthProtection,omitempty"` } // NewResourceProperties instantiates a new ResourceProperties object // This constructor will assign default values to properties that have it defined, // 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 NewResourceProperties() *ResourceProperties { this := ResourceProperties{} return &this } // NewResourcePropertiesWithDefaults instantiates a new ResourceProperties object // This 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 NewResourcePropertiesWithDefaults() *ResourceProperties { this := ResourceProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *ResourceProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *ResourceProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *ResourceProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetSecAuthProtection returns the SecAuthProtection field value // If the value is explicit nil, nil is returned func (o *ResourceProperties) GetSecAuthProtection() *bool { if o == nil { return nil } return o.SecAuthProtection } // GetSecAuthProtectionOk returns a tuple with the SecAuthProtection field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceProperties) GetSecAuthProtectionOk() (*bool, bool) { if o == nil { return nil, false } return o.SecAuthProtection, true } // SetSecAuthProtection sets field value func (o *ResourceProperties) SetSecAuthProtection(v bool) { o.SecAuthProtection = &v } // HasSecAuthProtection returns a boolean if a field has been set. func (o *ResourceProperties) HasSecAuthProtection() bool { if o != nil && o.SecAuthProtection != nil { return true } return false } func (o ResourceProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.SecAuthProtection != nil { toSerialize["secAuthProtection"] = o.SecAuthProtection } return json.Marshal(toSerialize) } type NullableResourceProperties struct { value *ResourceProperties isSet bool } func (v NullableResourceProperties) Get() *ResourceProperties { return v.value } func (v *NullableResourceProperties) Set(val *ResourceProperties) { v.value = val v.isSet = true } func (v NullableResourceProperties) IsSet() bool { return v.isSet } func (v *NullableResourceProperties) Unset() { v.value = nil v.isSet = false } func NewNullableResourceProperties(val *ResourceProperties) *NullableResourceProperties { return &NullableResourceProperties{value: val, isSet: true} } func (v NullableResourceProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableResourceProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_resource_reference.go000066400000000000000000000115631465267054300252570ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ResourceReference struct for ResourceReference type ResourceReference struct { // The resource's unique identifier. Id *string `json:"id"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` } // NewResourceReference instantiates a new ResourceReference object // This constructor will assign default values to properties that have it defined, // 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 NewResourceReference(id string) *ResourceReference { this := ResourceReference{} this.Id = &id return &this } // NewResourceReferenceWithDefaults instantiates a new ResourceReference object // This 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 NewResourceReferenceWithDefaults() *ResourceReference { this := ResourceReference{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *ResourceReference) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceReference) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *ResourceReference) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *ResourceReference) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ResourceReference) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceReference) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ResourceReference) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ResourceReference) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *ResourceReference) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourceReference) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *ResourceReference) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *ResourceReference) HasHref() bool { if o != nil && o.Href != nil { return true } return false } func (o ResourceReference) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } return json.Marshal(toSerialize) } type NullableResourceReference struct { value *ResourceReference isSet bool } func (v NullableResourceReference) Get() *ResourceReference { return v.value } func (v *NullableResourceReference) Set(val *ResourceReference) { v.value = val v.isSet = true } func (v NullableResourceReference) IsSet() bool { return v.isSet } func (v *NullableResourceReference) Unset() { v.value = nil v.isSet = false } func NewNullableResourceReference(val *ResourceReference) *NullableResourceReference { return &NullableResourceReference{value: val, isSet: true} } func (v NullableResourceReference) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableResourceReference) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_resources.go000066400000000000000000000126271465267054300234260ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Resources Collection to represent the resource. type Resources struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of the resource. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Resource `json:"items,omitempty"` } // NewResources instantiates a new Resources object // This constructor will assign default values to properties that have it defined, // 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 NewResources() *Resources { this := Resources{} return &this } // NewResourcesWithDefaults instantiates a new Resources object // This 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 NewResourcesWithDefaults() *Resources { this := Resources{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Resources) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Resources) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Resources) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Resources) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Resources) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Resources) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Resources) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Resources) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Resources) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Resources) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Resources) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Resources) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Resources) GetItems() *[]Resource { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Resources) GetItemsOk() (*[]Resource, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Resources) SetItems(v []Resource) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Resources) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o Resources) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableResources struct { value *Resources isSet bool } func (v NullableResources) Get() *Resources { return v.value } func (v *NullableResources) Set(val *Resources) { v.value = val v.isSet = true } func (v NullableResources) IsSet() bool { return v.isSet } func (v *NullableResources) Unset() { v.value = nil v.isSet = false } func NewNullableResources(val *Resources) *NullableResources { return &NullableResources{value: val, isSet: true} } func (v NullableResources) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableResources) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_resources_users.go000066400000000000000000000131431465267054300246410ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ResourcesUsers Resources owned by a user. type ResourcesUsers struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of the resource. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Resource `json:"items,omitempty"` } // NewResourcesUsers instantiates a new ResourcesUsers object // This constructor will assign default values to properties that have it defined, // 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 NewResourcesUsers() *ResourcesUsers { this := ResourcesUsers{} return &this } // NewResourcesUsersWithDefaults instantiates a new ResourcesUsers object // This 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 NewResourcesUsersWithDefaults() *ResourcesUsers { this := ResourcesUsers{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *ResourcesUsers) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourcesUsers) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *ResourcesUsers) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *ResourcesUsers) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ResourcesUsers) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourcesUsers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ResourcesUsers) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ResourcesUsers) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *ResourcesUsers) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourcesUsers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *ResourcesUsers) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *ResourcesUsers) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *ResourcesUsers) GetItems() *[]Resource { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ResourcesUsers) GetItemsOk() (*[]Resource, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *ResourcesUsers) SetItems(v []Resource) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *ResourcesUsers) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o ResourcesUsers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableResourcesUsers struct { value *ResourcesUsers isSet bool } func (v NullableResourcesUsers) Get() *ResourcesUsers { return v.value } func (v *NullableResourcesUsers) Set(val *ResourcesUsers) { v.value = val v.isSet = true } func (v NullableResourcesUsers) IsSet() bool { return v.isSet } func (v *NullableResourcesUsers) Unset() { v.value = nil v.isSet = false } func NewNullableResourcesUsers(val *ResourcesUsers) *NullableResourcesUsers { return &NullableResourcesUsers{value: val, isSet: true} } func (v NullableResourcesUsers) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableResourcesUsers) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_s3_bucket.go000066400000000000000000000056121465267054300232720ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // S3Bucket struct for S3Bucket type S3Bucket struct { // The name of the S3 bucket. Name *string `json:"name"` } // NewS3Bucket instantiates a new S3Bucket object // This constructor will assign default values to properties that have it defined, // 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 NewS3Bucket(name string) *S3Bucket { this := S3Bucket{} this.Name = &name return &this } // NewS3BucketWithDefaults instantiates a new S3Bucket object // This 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 NewS3BucketWithDefaults() *S3Bucket { this := S3Bucket{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *S3Bucket) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3Bucket) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *S3Bucket) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *S3Bucket) HasName() bool { if o != nil && o.Name != nil { return true } return false } func (o S3Bucket) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } return json.Marshal(toSerialize) } type NullableS3Bucket struct { value *S3Bucket isSet bool } func (v NullableS3Bucket) Get() *S3Bucket { return v.value } func (v *NullableS3Bucket) Set(val *S3Bucket) { v.value = val v.isSet = true } func (v NullableS3Bucket) IsSet() bool { return v.isSet } func (v *NullableS3Bucket) Unset() { v.value = nil v.isSet = false } func NewNullableS3Bucket(val *S3Bucket) *NullableS3Bucket { return &NullableS3Bucket{value: val, isSet: true} } func (v NullableS3Bucket) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableS3Bucket) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_s3_key.go000066400000000000000000000143471465267054300226120ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // S3Key struct for S3Key type S3Key struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of the resource. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *S3KeyMetadata `json:"metadata,omitempty"` Properties *S3KeyProperties `json:"properties"` } // NewS3Key instantiates a new S3Key object // This constructor will assign default values to properties that have it defined, // 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 NewS3Key(properties S3KeyProperties) *S3Key { this := S3Key{} this.Properties = &properties return &this } // NewS3KeyWithDefaults instantiates a new S3Key object // This 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 NewS3KeyWithDefaults() *S3Key { this := S3Key{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *S3Key) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3Key) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *S3Key) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *S3Key) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *S3Key) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3Key) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *S3Key) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *S3Key) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *S3Key) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3Key) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *S3Key) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *S3Key) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *S3Key) GetMetadata() *S3KeyMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3Key) GetMetadataOk() (*S3KeyMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *S3Key) SetMetadata(v S3KeyMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *S3Key) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *S3Key) GetProperties() *S3KeyProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3Key) GetPropertiesOk() (*S3KeyProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *S3Key) SetProperties(v S3KeyProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *S3Key) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o S3Key) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableS3Key struct { value *S3Key isSet bool } func (v NullableS3Key) Get() *S3Key { return v.value } func (v *NullableS3Key) Set(val *S3Key) { v.value = val v.isSet = true } func (v NullableS3Key) IsSet() bool { return v.isSet } func (v *NullableS3Key) Unset() { v.value = nil v.isSet = false } func NewNullableS3Key(val *S3Key) *NullableS3Key { return &NullableS3Key{value: val, isSet: true} } func (v NullableS3Key) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableS3Key) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_s3_key_metadata.go000066400000000000000000000232601465267054300244440ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" "time" ) // S3KeyMetadata struct for S3KeyMetadata type S3KeyMetadata struct { // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. Etag *string `json:"etag,omitempty"` // The time when the S3 key was created. CreatedDate *IonosTime // Unique name of the identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The unique ID of the user who created the S3 key. CreatedByUserId *string `json:"createdByUserId,omitempty"` // The last time the S3 key was modified. LastModifiedDate *IonosTime // Unique name of the identity that last modified the S3 key. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The unique ID of the user who last modified the S3 key. LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` } // NewS3KeyMetadata instantiates a new S3KeyMetadata object // This constructor will assign default values to properties that have it defined, // 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 NewS3KeyMetadata() *S3KeyMetadata { this := S3KeyMetadata{} return &this } // NewS3KeyMetadataWithDefaults instantiates a new S3KeyMetadata object // This 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 NewS3KeyMetadataWithDefaults() *S3KeyMetadata { this := S3KeyMetadata{} return &this } // GetEtag returns the Etag field value // If the value is explicit nil, nil is returned func (o *S3KeyMetadata) GetEtag() *string { if o == nil { return nil } return o.Etag } // GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3KeyMetadata) GetEtagOk() (*string, bool) { if o == nil { return nil, false } return o.Etag, true } // SetEtag sets field value func (o *S3KeyMetadata) SetEtag(v string) { o.Etag = &v } // HasEtag returns a boolean if a field has been set. func (o *S3KeyMetadata) HasEtag() bool { if o != nil && o.Etag != nil { return true } return false } // GetCreatedDate returns the CreatedDate field value // If the value is explicit nil, nil is returned func (o *S3KeyMetadata) GetCreatedDate() *time.Time { if o == nil { return nil } if o.CreatedDate == nil { return nil } return &o.CreatedDate.Time } // GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3KeyMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.CreatedDate == nil { return nil, false } return &o.CreatedDate.Time, true } // SetCreatedDate sets field value func (o *S3KeyMetadata) SetCreatedDate(v time.Time) { o.CreatedDate = &IonosTime{v} } // HasCreatedDate returns a boolean if a field has been set. func (o *S3KeyMetadata) HasCreatedDate() bool { if o != nil && o.CreatedDate != nil { return true } return false } // GetCreatedBy returns the CreatedBy field value // If the value is explicit nil, nil is returned func (o *S3KeyMetadata) GetCreatedBy() *string { if o == nil { return nil } return o.CreatedBy } // GetCreatedByOk returns a tuple with the CreatedBy field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3KeyMetadata) GetCreatedByOk() (*string, bool) { if o == nil { return nil, false } return o.CreatedBy, true } // SetCreatedBy sets field value func (o *S3KeyMetadata) SetCreatedBy(v string) { o.CreatedBy = &v } // HasCreatedBy returns a boolean if a field has been set. func (o *S3KeyMetadata) HasCreatedBy() bool { if o != nil && o.CreatedBy != nil { return true } return false } // GetCreatedByUserId returns the CreatedByUserId field value // If the value is explicit nil, nil is returned func (o *S3KeyMetadata) GetCreatedByUserId() *string { if o == nil { return nil } return o.CreatedByUserId } // GetCreatedByUserIdOk returns a tuple with the CreatedByUserId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3KeyMetadata) GetCreatedByUserIdOk() (*string, bool) { if o == nil { return nil, false } return o.CreatedByUserId, true } // SetCreatedByUserId sets field value func (o *S3KeyMetadata) SetCreatedByUserId(v string) { o.CreatedByUserId = &v } // HasCreatedByUserId returns a boolean if a field has been set. func (o *S3KeyMetadata) HasCreatedByUserId() bool { if o != nil && o.CreatedByUserId != nil { return true } return false } // GetLastModifiedDate returns the LastModifiedDate field value // If the value is explicit nil, nil is returned func (o *S3KeyMetadata) GetLastModifiedDate() *time.Time { if o == nil { return nil } if o.LastModifiedDate == nil { return nil } return &o.LastModifiedDate.Time } // GetLastModifiedDateOk returns a tuple with the LastModifiedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3KeyMetadata) GetLastModifiedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.LastModifiedDate == nil { return nil, false } return &o.LastModifiedDate.Time, true } // SetLastModifiedDate sets field value func (o *S3KeyMetadata) SetLastModifiedDate(v time.Time) { o.LastModifiedDate = &IonosTime{v} } // HasLastModifiedDate returns a boolean if a field has been set. func (o *S3KeyMetadata) HasLastModifiedDate() bool { if o != nil && o.LastModifiedDate != nil { return true } return false } // GetLastModifiedBy returns the LastModifiedBy field value // If the value is explicit nil, nil is returned func (o *S3KeyMetadata) GetLastModifiedBy() *string { if o == nil { return nil } return o.LastModifiedBy } // GetLastModifiedByOk returns a tuple with the LastModifiedBy field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3KeyMetadata) GetLastModifiedByOk() (*string, bool) { if o == nil { return nil, false } return o.LastModifiedBy, true } // SetLastModifiedBy sets field value func (o *S3KeyMetadata) SetLastModifiedBy(v string) { o.LastModifiedBy = &v } // HasLastModifiedBy returns a boolean if a field has been set. func (o *S3KeyMetadata) HasLastModifiedBy() bool { if o != nil && o.LastModifiedBy != nil { return true } return false } // GetLastModifiedByUserId returns the LastModifiedByUserId field value // If the value is explicit nil, nil is returned func (o *S3KeyMetadata) GetLastModifiedByUserId() *string { if o == nil { return nil } return o.LastModifiedByUserId } // GetLastModifiedByUserIdOk returns a tuple with the LastModifiedByUserId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3KeyMetadata) GetLastModifiedByUserIdOk() (*string, bool) { if o == nil { return nil, false } return o.LastModifiedByUserId, true } // SetLastModifiedByUserId sets field value func (o *S3KeyMetadata) SetLastModifiedByUserId(v string) { o.LastModifiedByUserId = &v } // HasLastModifiedByUserId returns a boolean if a field has been set. func (o *S3KeyMetadata) HasLastModifiedByUserId() bool { if o != nil && o.LastModifiedByUserId != nil { return true } return false } func (o S3KeyMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Etag != nil { toSerialize["etag"] = o.Etag } if o.CreatedDate != nil { toSerialize["createdDate"] = o.CreatedDate } if o.CreatedBy != nil { toSerialize["createdBy"] = o.CreatedBy } if o.CreatedByUserId != nil { toSerialize["createdByUserId"] = o.CreatedByUserId } if o.LastModifiedDate != nil { toSerialize["lastModifiedDate"] = o.LastModifiedDate } if o.LastModifiedBy != nil { toSerialize["lastModifiedBy"] = o.LastModifiedBy } if o.LastModifiedByUserId != nil { toSerialize["lastModifiedByUserId"] = o.LastModifiedByUserId } return json.Marshal(toSerialize) } type NullableS3KeyMetadata struct { value *S3KeyMetadata isSet bool } func (v NullableS3KeyMetadata) Get() *S3KeyMetadata { return v.value } func (v *NullableS3KeyMetadata) Set(val *S3KeyMetadata) { v.value = val v.isSet = true } func (v NullableS3KeyMetadata) IsSet() bool { return v.isSet } func (v *NullableS3KeyMetadata) Unset() { v.value = nil v.isSet = false } func NewNullableS3KeyMetadata(val *S3KeyMetadata) *NullableS3KeyMetadata { return &NullableS3KeyMetadata{value: val, isSet: true} } func (v NullableS3KeyMetadata) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableS3KeyMetadata) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_s3_key_properties.go000066400000000000000000000100701465267054300250530ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // S3KeyProperties struct for S3KeyProperties type S3KeyProperties struct { // Secret of the S3 key. SecretKey *string `json:"secretKey,omitempty"` // Denotes weather the S3 key is active. Active *bool `json:"active,omitempty"` } // NewS3KeyProperties instantiates a new S3KeyProperties object // This constructor will assign default values to properties that have it defined, // 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 NewS3KeyProperties() *S3KeyProperties { this := S3KeyProperties{} return &this } // NewS3KeyPropertiesWithDefaults instantiates a new S3KeyProperties object // This 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 NewS3KeyPropertiesWithDefaults() *S3KeyProperties { this := S3KeyProperties{} return &this } // GetSecretKey returns the SecretKey field value // If the value is explicit nil, nil is returned func (o *S3KeyProperties) GetSecretKey() *string { if o == nil { return nil } return o.SecretKey } // GetSecretKeyOk returns a tuple with the SecretKey field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3KeyProperties) GetSecretKeyOk() (*string, bool) { if o == nil { return nil, false } return o.SecretKey, true } // SetSecretKey sets field value func (o *S3KeyProperties) SetSecretKey(v string) { o.SecretKey = &v } // HasSecretKey returns a boolean if a field has been set. func (o *S3KeyProperties) HasSecretKey() bool { if o != nil && o.SecretKey != nil { return true } return false } // GetActive returns the Active field value // If the value is explicit nil, nil is returned func (o *S3KeyProperties) GetActive() *bool { if o == nil { return nil } return o.Active } // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3KeyProperties) GetActiveOk() (*bool, bool) { if o == nil { return nil, false } return o.Active, true } // SetActive sets field value func (o *S3KeyProperties) SetActive(v bool) { o.Active = &v } // HasActive returns a boolean if a field has been set. func (o *S3KeyProperties) HasActive() bool { if o != nil && o.Active != nil { return true } return false } func (o S3KeyProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.SecretKey != nil { toSerialize["secretKey"] = o.SecretKey } if o.Active != nil { toSerialize["active"] = o.Active } return json.Marshal(toSerialize) } type NullableS3KeyProperties struct { value *S3KeyProperties isSet bool } func (v NullableS3KeyProperties) Get() *S3KeyProperties { return v.value } func (v *NullableS3KeyProperties) Set(val *S3KeyProperties) { v.value = val v.isSet = true } func (v NullableS3KeyProperties) IsSet() bool { return v.isSet } func (v *NullableS3KeyProperties) Unset() { v.value = nil v.isSet = false } func NewNullableS3KeyProperties(val *S3KeyProperties) *NullableS3KeyProperties { return &NullableS3KeyProperties{value: val, isSet: true} } func (v NullableS3KeyProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableS3KeyProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_s3_keys.go000066400000000000000000000123661465267054300227740ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // S3Keys struct for S3Keys type S3Keys struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of the resource. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]S3Key `json:"items,omitempty"` } // NewS3Keys instantiates a new S3Keys object // This constructor will assign default values to properties that have it defined, // 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 NewS3Keys() *S3Keys { this := S3Keys{} return &this } // NewS3KeysWithDefaults instantiates a new S3Keys object // This 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 NewS3KeysWithDefaults() *S3Keys { this := S3Keys{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *S3Keys) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3Keys) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *S3Keys) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *S3Keys) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *S3Keys) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3Keys) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *S3Keys) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *S3Keys) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *S3Keys) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3Keys) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *S3Keys) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *S3Keys) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *S3Keys) GetItems() *[]S3Key { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3Keys) GetItemsOk() (*[]S3Key, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *S3Keys) SetItems(v []S3Key) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *S3Keys) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o S3Keys) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableS3Keys struct { value *S3Keys isSet bool } func (v NullableS3Keys) Get() *S3Keys { return v.value } func (v *NullableS3Keys) Set(val *S3Keys) { v.value = val v.isSet = true } func (v NullableS3Keys) IsSet() bool { return v.isSet } func (v *NullableS3Keys) Unset() { v.value = nil v.isSet = false } func NewNullableS3Keys(val *S3Keys) *NullableS3Keys { return &NullableS3Keys{value: val, isSet: true} } func (v NullableS3Keys) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableS3Keys) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_s3_object_storage_sso.go000066400000000000000000000063511465267054300256740ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // S3ObjectStorageSSO struct for S3ObjectStorageSSO type S3ObjectStorageSSO struct { // The S3 object storage single sign on url SsoUrl *string `json:"ssoUrl,omitempty"` } // NewS3ObjectStorageSSO instantiates a new S3ObjectStorageSSO object // This constructor will assign default values to properties that have it defined, // 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 NewS3ObjectStorageSSO() *S3ObjectStorageSSO { this := S3ObjectStorageSSO{} return &this } // NewS3ObjectStorageSSOWithDefaults instantiates a new S3ObjectStorageSSO object // This 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 NewS3ObjectStorageSSOWithDefaults() *S3ObjectStorageSSO { this := S3ObjectStorageSSO{} return &this } // GetSsoUrl returns the SsoUrl field value // If the value is explicit nil, nil is returned func (o *S3ObjectStorageSSO) GetSsoUrl() *string { if o == nil { return nil } return o.SsoUrl } // GetSsoUrlOk returns a tuple with the SsoUrl field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *S3ObjectStorageSSO) GetSsoUrlOk() (*string, bool) { if o == nil { return nil, false } return o.SsoUrl, true } // SetSsoUrl sets field value func (o *S3ObjectStorageSSO) SetSsoUrl(v string) { o.SsoUrl = &v } // HasSsoUrl returns a boolean if a field has been set. func (o *S3ObjectStorageSSO) HasSsoUrl() bool { if o != nil && o.SsoUrl != nil { return true } return false } func (o S3ObjectStorageSSO) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.SsoUrl != nil { toSerialize["ssoUrl"] = o.SsoUrl } return json.Marshal(toSerialize) } type NullableS3ObjectStorageSSO struct { value *S3ObjectStorageSSO isSet bool } func (v NullableS3ObjectStorageSSO) Get() *S3ObjectStorageSSO { return v.value } func (v *NullableS3ObjectStorageSSO) Set(val *S3ObjectStorageSSO) { v.value = val v.isSet = true } func (v NullableS3ObjectStorageSSO) IsSet() bool { return v.isSet } func (v *NullableS3ObjectStorageSSO) Unset() { v.value = nil v.isSet = false } func NewNullableS3ObjectStorageSSO(val *S3ObjectStorageSSO) *NullableS3ObjectStorageSSO { return &NullableS3ObjectStorageSSO{value: val, isSet: true} } func (v NullableS3ObjectStorageSSO) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableS3ObjectStorageSSO) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_server.go000066400000000000000000000164031465267054300227160ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Server struct for Server type Server struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *ServerProperties `json:"properties"` Entities *ServerEntities `json:"entities,omitempty"` } // NewServer instantiates a new Server object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewServer(properties ServerProperties) *Server { this := Server{} this.Properties = &properties return &this } // NewServerWithDefaults instantiates a new Server object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewServerWithDefaults() *Server { this := Server{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Server) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Server) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Server) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Server) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Server) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Server) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Server) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Server) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Server) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Server) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Server) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Server) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Server) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Server) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Server) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Server) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Server) GetProperties() *ServerProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Server) GetPropertiesOk() (*ServerProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Server) SetProperties(v ServerProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Server) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *Server) GetEntities() *ServerEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Server) GetEntitiesOk() (*ServerEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *Server) SetEntities(v ServerEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *Server) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o Server) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableServer struct { value *Server isSet bool } func (v NullableServer) Get() *Server { return v.value } func (v *NullableServer) Set(val *Server) { v.value = val v.isSet = true } func (v NullableServer) IsSet() bool { return v.isSet } func (v *NullableServer) Unset() { v.value = nil v.isSet = false } func NewNullableServer(val *Server) *NullableServer { return &NullableServer{value: val, isSet: true} } func (v NullableServer) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_server_entities.go000066400000000000000000000114431465267054300246210ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ServerEntities struct for ServerEntities type ServerEntities struct { Cdroms *Cdroms `json:"cdroms,omitempty"` Volumes *AttachedVolumes `json:"volumes,omitempty"` Nics *Nics `json:"nics,omitempty"` } // NewServerEntities instantiates a new ServerEntities object // This constructor will assign default values to properties that have it defined, // 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 NewServerEntities() *ServerEntities { this := ServerEntities{} return &this } // NewServerEntitiesWithDefaults instantiates a new ServerEntities object // This 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 NewServerEntitiesWithDefaults() *ServerEntities { this := ServerEntities{} return &this } // GetCdroms returns the Cdroms field value // If the value is explicit nil, nil is returned func (o *ServerEntities) GetCdroms() *Cdroms { if o == nil { return nil } return o.Cdroms } // GetCdromsOk returns a tuple with the Cdroms field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerEntities) GetCdromsOk() (*Cdroms, bool) { if o == nil { return nil, false } return o.Cdroms, true } // SetCdroms sets field value func (o *ServerEntities) SetCdroms(v Cdroms) { o.Cdroms = &v } // HasCdroms returns a boolean if a field has been set. func (o *ServerEntities) HasCdroms() bool { if o != nil && o.Cdroms != nil { return true } return false } // GetVolumes returns the Volumes field value // If the value is explicit nil, nil is returned func (o *ServerEntities) GetVolumes() *AttachedVolumes { if o == nil { return nil } return o.Volumes } // GetVolumesOk returns a tuple with the Volumes field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerEntities) GetVolumesOk() (*AttachedVolumes, bool) { if o == nil { return nil, false } return o.Volumes, true } // SetVolumes sets field value func (o *ServerEntities) SetVolumes(v AttachedVolumes) { o.Volumes = &v } // HasVolumes returns a boolean if a field has been set. func (o *ServerEntities) HasVolumes() bool { if o != nil && o.Volumes != nil { return true } return false } // GetNics returns the Nics field value // If the value is explicit nil, nil is returned func (o *ServerEntities) GetNics() *Nics { if o == nil { return nil } return o.Nics } // GetNicsOk returns a tuple with the Nics field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerEntities) GetNicsOk() (*Nics, bool) { if o == nil { return nil, false } return o.Nics, true } // SetNics sets field value func (o *ServerEntities) SetNics(v Nics) { o.Nics = &v } // HasNics returns a boolean if a field has been set. func (o *ServerEntities) HasNics() bool { if o != nil && o.Nics != nil { return true } return false } func (o ServerEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Cdroms != nil { toSerialize["cdroms"] = o.Cdroms } if o.Volumes != nil { toSerialize["volumes"] = o.Volumes } if o.Nics != nil { toSerialize["nics"] = o.Nics } return json.Marshal(toSerialize) } type NullableServerEntities struct { value *ServerEntities isSet bool } func (v NullableServerEntities) Get() *ServerEntities { return v.value } func (v *NullableServerEntities) Set(val *ServerEntities) { v.value = val v.isSet = true } func (v NullableServerEntities) IsSet() bool { return v.isSet } func (v *NullableServerEntities) Unset() { v.value = nil v.isSet = false } func NewNullableServerEntities(val *ServerEntities) *NullableServerEntities { return &NullableServerEntities{value: val, isSet: true} } func (v NullableServerEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableServerEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_server_properties.go000066400000000000000000000324231465267054300251720ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // ServerProperties struct for ServerProperties type ServerProperties struct { // The ID of the template for creating a CUBE server; the available templates for CUBE servers can be found on the templates resource. TemplateUuid *string `json:"templateUuid,omitempty"` // The name of the resource. Name *string `json:"name,omitempty"` // The hostname of the resource. Allowed characters are a-z, 0-9 and - (minus). Hostname should not start with minus and should not be longer than 63 characters. Hostname *string `json:"hostname,omitempty"` // The total number of cores for the enterprise server. Cores *int32 `json:"cores,omitempty"` // The memory size for the enterprise server in MB, such as 2048. Size must be specified in multiples of 256 MB with a minimum of 256 MB; however, if you set ramHotPlug to TRUE then you must use a minimum of 1024 MB. If you set the RAM size more than 240GB, then ramHotPlug will be set to FALSE and can not be set to TRUE unless RAM size not set to less than 240GB. Ram *int32 `json:"ram,omitempty"` // The availability zone in which the server should be provisioned. AvailabilityZone *string `json:"availabilityZone,omitempty"` // Status of the virtual machine. VmState *string `json:"vmState,omitempty"` BootCdrom *ResourceReference `json:"bootCdrom,omitempty"` BootVolume *ResourceReference `json:"bootVolume,omitempty"` // CPU architecture on which server gets provisioned; not all CPU architectures are available in all datacenter regions; available CPU architectures can be retrieved from the datacenter resource; must not be provided for CUBE and VCPU servers. CpuFamily *string `json:"cpuFamily,omitempty"` // Server type: CUBE, ENTERPRISE or VCPU. Type *string `json:"type,omitempty"` } // NewServerProperties instantiates a new ServerProperties object // This constructor will assign default values to properties that have it defined, // 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 NewServerProperties() *ServerProperties { this := ServerProperties{} return &this } // NewServerPropertiesWithDefaults instantiates a new ServerProperties object // This 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 NewServerPropertiesWithDefaults() *ServerProperties { this := ServerProperties{} return &this } // GetTemplateUuid returns the TemplateUuid field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetTemplateUuid() *string { if o == nil { return nil } return o.TemplateUuid } // GetTemplateUuidOk returns a tuple with the TemplateUuid field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetTemplateUuidOk() (*string, bool) { if o == nil { return nil, false } return o.TemplateUuid, true } // SetTemplateUuid sets field value func (o *ServerProperties) SetTemplateUuid(v string) { o.TemplateUuid = &v } // HasTemplateUuid returns a boolean if a field has been set. func (o *ServerProperties) HasTemplateUuid() bool { if o != nil && o.TemplateUuid != nil { return true } return false } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *ServerProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *ServerProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetHostname returns the Hostname field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetHostname() *string { if o == nil { return nil } return o.Hostname } // GetHostnameOk returns a tuple with the Hostname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetHostnameOk() (*string, bool) { if o == nil { return nil, false } return o.Hostname, true } // SetHostname sets field value func (o *ServerProperties) SetHostname(v string) { o.Hostname = &v } // HasHostname returns a boolean if a field has been set. func (o *ServerProperties) HasHostname() bool { if o != nil && o.Hostname != nil { return true } return false } // GetCores returns the Cores field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetCores() *int32 { if o == nil { return nil } return o.Cores } // GetCoresOk returns a tuple with the Cores field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetCoresOk() (*int32, bool) { if o == nil { return nil, false } return o.Cores, true } // SetCores sets field value func (o *ServerProperties) SetCores(v int32) { o.Cores = &v } // HasCores returns a boolean if a field has been set. func (o *ServerProperties) HasCores() bool { if o != nil && o.Cores != nil { return true } return false } // GetRam returns the Ram field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetRam() *int32 { if o == nil { return nil } return o.Ram } // GetRamOk returns a tuple with the Ram field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetRamOk() (*int32, bool) { if o == nil { return nil, false } return o.Ram, true } // SetRam sets field value func (o *ServerProperties) SetRam(v int32) { o.Ram = &v } // HasRam returns a boolean if a field has been set. func (o *ServerProperties) HasRam() bool { if o != nil && o.Ram != nil { return true } return false } // GetAvailabilityZone returns the AvailabilityZone field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetAvailabilityZone() *string { if o == nil { return nil } return o.AvailabilityZone } // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetAvailabilityZoneOk() (*string, bool) { if o == nil { return nil, false } return o.AvailabilityZone, true } // SetAvailabilityZone sets field value func (o *ServerProperties) SetAvailabilityZone(v string) { o.AvailabilityZone = &v } // HasAvailabilityZone returns a boolean if a field has been set. func (o *ServerProperties) HasAvailabilityZone() bool { if o != nil && o.AvailabilityZone != nil { return true } return false } // GetVmState returns the VmState field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetVmState() *string { if o == nil { return nil } return o.VmState } // GetVmStateOk returns a tuple with the VmState field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetVmStateOk() (*string, bool) { if o == nil { return nil, false } return o.VmState, true } // SetVmState sets field value func (o *ServerProperties) SetVmState(v string) { o.VmState = &v } // HasVmState returns a boolean if a field has been set. func (o *ServerProperties) HasVmState() bool { if o != nil && o.VmState != nil { return true } return false } // GetBootCdrom returns the BootCdrom field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetBootCdrom() *ResourceReference { if o == nil { return nil } return o.BootCdrom } // GetBootCdromOk returns a tuple with the BootCdrom field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetBootCdromOk() (*ResourceReference, bool) { if o == nil { return nil, false } return o.BootCdrom, true } // SetBootCdrom sets field value func (o *ServerProperties) SetBootCdrom(v ResourceReference) { o.BootCdrom = &v } // HasBootCdrom returns a boolean if a field has been set. func (o *ServerProperties) HasBootCdrom() bool { if o != nil && o.BootCdrom != nil { return true } return false } // GetBootVolume returns the BootVolume field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetBootVolume() *ResourceReference { if o == nil { return nil } return o.BootVolume } // GetBootVolumeOk returns a tuple with the BootVolume field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetBootVolumeOk() (*ResourceReference, bool) { if o == nil { return nil, false } return o.BootVolume, true } // SetBootVolume sets field value func (o *ServerProperties) SetBootVolume(v ResourceReference) { o.BootVolume = &v } // HasBootVolume returns a boolean if a field has been set. func (o *ServerProperties) HasBootVolume() bool { if o != nil && o.BootVolume != nil { return true } return false } // GetCpuFamily returns the CpuFamily field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetCpuFamily() *string { if o == nil { return nil } return o.CpuFamily } // GetCpuFamilyOk returns a tuple with the CpuFamily field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetCpuFamilyOk() (*string, bool) { if o == nil { return nil, false } return o.CpuFamily, true } // SetCpuFamily sets field value func (o *ServerProperties) SetCpuFamily(v string) { o.CpuFamily = &v } // HasCpuFamily returns a boolean if a field has been set. func (o *ServerProperties) HasCpuFamily() bool { if o != nil && o.CpuFamily != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *ServerProperties) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ServerProperties) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *ServerProperties) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *ServerProperties) HasType() bool { if o != nil && o.Type != nil { return true } return false } func (o ServerProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.TemplateUuid != nil { toSerialize["templateUuid"] = o.TemplateUuid } if o.Name != nil { toSerialize["name"] = o.Name } if o.Hostname != nil { toSerialize["hostname"] = o.Hostname } if o.Cores != nil { toSerialize["cores"] = o.Cores } if o.Ram != nil { toSerialize["ram"] = o.Ram } if o.AvailabilityZone != nil { toSerialize["availabilityZone"] = o.AvailabilityZone } if o.VmState != nil { toSerialize["vmState"] = o.VmState } if o.BootCdrom != nil { toSerialize["bootCdrom"] = o.BootCdrom } if o.BootVolume != nil { toSerialize["bootVolume"] = o.BootVolume } if o.CpuFamily != nil { toSerialize["cpuFamily"] = o.CpuFamily } if o.Type != nil { toSerialize["type"] = o.Type } return json.Marshal(toSerialize) } type NullableServerProperties struct { value *ServerProperties isSet bool } func (v NullableServerProperties) Get() *ServerProperties { return v.value } func (v *NullableServerProperties) Set(val *ServerProperties) { v.value = val v.isSet = true } func (v NullableServerProperties) IsSet() bool { return v.isSet } func (v *NullableServerProperties) Unset() { v.value = nil v.isSet = false } func NewNullableServerProperties(val *ServerProperties) *NullableServerProperties { return &NullableServerProperties{value: val, isSet: true} } func (v NullableServerProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableServerProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_servers.go000066400000000000000000000175661465267054300231140ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Servers struct for Servers type Servers struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Server `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewServers instantiates a new Servers object // This constructor will assign default values to properties that have it defined, // 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 NewServers() *Servers { this := Servers{} return &this } // NewServersWithDefaults instantiates a new Servers object // This 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 NewServersWithDefaults() *Servers { this := Servers{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Servers) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Servers) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Servers) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Servers) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Servers) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Servers) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Servers) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Servers) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Servers) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Servers) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Servers) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Servers) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Servers) GetItems() *[]Server { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Servers) GetItemsOk() (*[]Server, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Servers) SetItems(v []Server) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Servers) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *Servers) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Servers) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *Servers) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *Servers) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *Servers) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Servers) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *Servers) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *Servers) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *Servers) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Servers) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *Servers) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *Servers) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o Servers) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableServers struct { value *Servers isSet bool } func (v NullableServers) Get() *Servers { return v.value } func (v *NullableServers) Set(val *Servers) { v.value = val v.isSet = true } func (v NullableServers) IsSet() bool { return v.isSet } func (v *NullableServers) Unset() { v.value = nil v.isSet = false } func NewNullableServers(val *Servers) *NullableServers { return &NullableServers{value: val, isSet: true} } func (v NullableServers) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableServers) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_snapshot.go000066400000000000000000000147251465267054300232540ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Snapshot struct for Snapshot type Snapshot struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *SnapshotProperties `json:"properties"` } // NewSnapshot instantiates a new Snapshot object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewSnapshot(properties SnapshotProperties) *Snapshot { this := Snapshot{} this.Properties = &properties return &this } // NewSnapshotWithDefaults instantiates a new Snapshot object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewSnapshotWithDefaults() *Snapshot { this := Snapshot{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Snapshot) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Snapshot) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Snapshot) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Snapshot) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Snapshot) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Snapshot) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Snapshot) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Snapshot) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Snapshot) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Snapshot) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Snapshot) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Snapshot) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Snapshot) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Snapshot) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Snapshot) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Snapshot) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Snapshot) GetProperties() *SnapshotProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Snapshot) GetPropertiesOk() (*SnapshotProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Snapshot) SetProperties(v SnapshotProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Snapshot) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o Snapshot) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableSnapshot struct { value *Snapshot isSet bool } func (v NullableSnapshot) Get() *Snapshot { return v.value } func (v *NullableSnapshot) Set(val *Snapshot) { v.value = val v.isSet = true } func (v NullableSnapshot) IsSet() bool { return v.isSet } func (v *NullableSnapshot) Unset() { v.value = nil v.isSet = false } func NewNullableSnapshot(val *Snapshot) *NullableSnapshot { return &NullableSnapshot{value: val, isSet: true} } func (v NullableSnapshot) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableSnapshot) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_snapshot_properties.go000066400000000000000000000500071465267054300255210ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // SnapshotProperties struct for SnapshotProperties type SnapshotProperties struct { // The name of the resource. Name *string `json:"name,omitempty"` // Human-readable description. Description *string `json:"description,omitempty"` // Location of that image/snapshot. Location *string `json:"location,omitempty"` // The size of the image in GB. Size *float32 `json:"size,omitempty"` // Boolean value representing if the snapshot requires extra protection, such as two-step verification. SecAuthProtection *bool `json:"secAuthProtection,omitempty"` // Hot-plug capable CPU (no reboot required). CpuHotPlug *bool `json:"cpuHotPlug,omitempty"` // Hot-unplug capable CPU (no reboot required). CpuHotUnplug *bool `json:"cpuHotUnplug,omitempty"` // Hot-plug capable RAM (no reboot required). RamHotPlug *bool `json:"ramHotPlug,omitempty"` // Hot-unplug capable RAM (no reboot required). RamHotUnplug *bool `json:"ramHotUnplug,omitempty"` // Hot-plug capable NIC (no reboot required). NicHotPlug *bool `json:"nicHotPlug,omitempty"` // Hot-unplug capable NIC (no reboot required). NicHotUnplug *bool `json:"nicHotUnplug,omitempty"` // Hot-plug capable Virt-IO drive (no reboot required). DiscVirtioHotPlug *bool `json:"discVirtioHotPlug,omitempty"` // Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. DiscVirtioHotUnplug *bool `json:"discVirtioHotUnplug,omitempty"` // Hot-plug capable SCSI drive (no reboot required). DiscScsiHotPlug *bool `json:"discScsiHotPlug,omitempty"` // If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior ExposeSerial *bool `json:"exposeSerial,omitempty"` // Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines. DiscScsiHotUnplug *bool `json:"discScsiHotUnplug,omitempty"` // OS type of this snapshot LicenceType *string `json:"licenceType,omitempty"` } // NewSnapshotProperties instantiates a new SnapshotProperties object // This constructor will assign default values to properties that have it defined, // 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 NewSnapshotProperties() *SnapshotProperties { this := SnapshotProperties{} var exposeSerial bool = false this.ExposeSerial = &exposeSerial return &this } // NewSnapshotPropertiesWithDefaults instantiates a new SnapshotProperties object // This 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 NewSnapshotPropertiesWithDefaults() *SnapshotProperties { this := SnapshotProperties{} var exposeSerial bool = false this.ExposeSerial = &exposeSerial return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *SnapshotProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *SnapshotProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetDescription returns the Description field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetDescription() *string { if o == nil { return nil } return o.Description } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetDescriptionOk() (*string, bool) { if o == nil { return nil, false } return o.Description, true } // SetDescription sets field value func (o *SnapshotProperties) SetDescription(v string) { o.Description = &v } // HasDescription returns a boolean if a field has been set. func (o *SnapshotProperties) HasDescription() bool { if o != nil && o.Description != nil { return true } return false } // GetLocation returns the Location field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetLocation() *string { if o == nil { return nil } return o.Location } // GetLocationOk returns a tuple with the Location field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetLocationOk() (*string, bool) { if o == nil { return nil, false } return o.Location, true } // SetLocation sets field value func (o *SnapshotProperties) SetLocation(v string) { o.Location = &v } // HasLocation returns a boolean if a field has been set. func (o *SnapshotProperties) HasLocation() bool { if o != nil && o.Location != nil { return true } return false } // GetSize returns the Size field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetSize() *float32 { if o == nil { return nil } return o.Size } // GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetSizeOk() (*float32, bool) { if o == nil { return nil, false } return o.Size, true } // SetSize sets field value func (o *SnapshotProperties) SetSize(v float32) { o.Size = &v } // HasSize returns a boolean if a field has been set. func (o *SnapshotProperties) HasSize() bool { if o != nil && o.Size != nil { return true } return false } // GetSecAuthProtection returns the SecAuthProtection field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetSecAuthProtection() *bool { if o == nil { return nil } return o.SecAuthProtection } // GetSecAuthProtectionOk returns a tuple with the SecAuthProtection field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetSecAuthProtectionOk() (*bool, bool) { if o == nil { return nil, false } return o.SecAuthProtection, true } // SetSecAuthProtection sets field value func (o *SnapshotProperties) SetSecAuthProtection(v bool) { o.SecAuthProtection = &v } // HasSecAuthProtection returns a boolean if a field has been set. func (o *SnapshotProperties) HasSecAuthProtection() bool { if o != nil && o.SecAuthProtection != nil { return true } return false } // GetCpuHotPlug returns the CpuHotPlug field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetCpuHotPlug() *bool { if o == nil { return nil } return o.CpuHotPlug } // GetCpuHotPlugOk returns a tuple with the CpuHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetCpuHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.CpuHotPlug, true } // SetCpuHotPlug sets field value func (o *SnapshotProperties) SetCpuHotPlug(v bool) { o.CpuHotPlug = &v } // HasCpuHotPlug returns a boolean if a field has been set. func (o *SnapshotProperties) HasCpuHotPlug() bool { if o != nil && o.CpuHotPlug != nil { return true } return false } // GetCpuHotUnplug returns the CpuHotUnplug field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetCpuHotUnplug() *bool { if o == nil { return nil } return o.CpuHotUnplug } // GetCpuHotUnplugOk returns a tuple with the CpuHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetCpuHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.CpuHotUnplug, true } // SetCpuHotUnplug sets field value func (o *SnapshotProperties) SetCpuHotUnplug(v bool) { o.CpuHotUnplug = &v } // HasCpuHotUnplug returns a boolean if a field has been set. func (o *SnapshotProperties) HasCpuHotUnplug() bool { if o != nil && o.CpuHotUnplug != nil { return true } return false } // GetRamHotPlug returns the RamHotPlug field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetRamHotPlug() *bool { if o == nil { return nil } return o.RamHotPlug } // GetRamHotPlugOk returns a tuple with the RamHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetRamHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.RamHotPlug, true } // SetRamHotPlug sets field value func (o *SnapshotProperties) SetRamHotPlug(v bool) { o.RamHotPlug = &v } // HasRamHotPlug returns a boolean if a field has been set. func (o *SnapshotProperties) HasRamHotPlug() bool { if o != nil && o.RamHotPlug != nil { return true } return false } // GetRamHotUnplug returns the RamHotUnplug field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetRamHotUnplug() *bool { if o == nil { return nil } return o.RamHotUnplug } // GetRamHotUnplugOk returns a tuple with the RamHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetRamHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.RamHotUnplug, true } // SetRamHotUnplug sets field value func (o *SnapshotProperties) SetRamHotUnplug(v bool) { o.RamHotUnplug = &v } // HasRamHotUnplug returns a boolean if a field has been set. func (o *SnapshotProperties) HasRamHotUnplug() bool { if o != nil && o.RamHotUnplug != nil { return true } return false } // GetNicHotPlug returns the NicHotPlug field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetNicHotPlug() *bool { if o == nil { return nil } return o.NicHotPlug } // GetNicHotPlugOk returns a tuple with the NicHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetNicHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.NicHotPlug, true } // SetNicHotPlug sets field value func (o *SnapshotProperties) SetNicHotPlug(v bool) { o.NicHotPlug = &v } // HasNicHotPlug returns a boolean if a field has been set. func (o *SnapshotProperties) HasNicHotPlug() bool { if o != nil && o.NicHotPlug != nil { return true } return false } // GetNicHotUnplug returns the NicHotUnplug field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetNicHotUnplug() *bool { if o == nil { return nil } return o.NicHotUnplug } // GetNicHotUnplugOk returns a tuple with the NicHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetNicHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.NicHotUnplug, true } // SetNicHotUnplug sets field value func (o *SnapshotProperties) SetNicHotUnplug(v bool) { o.NicHotUnplug = &v } // HasNicHotUnplug returns a boolean if a field has been set. func (o *SnapshotProperties) HasNicHotUnplug() bool { if o != nil && o.NicHotUnplug != nil { return true } return false } // GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetDiscVirtioHotPlug() *bool { if o == nil { return nil } return o.DiscVirtioHotPlug } // GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.DiscVirtioHotPlug, true } // SetDiscVirtioHotPlug sets field value func (o *SnapshotProperties) SetDiscVirtioHotPlug(v bool) { o.DiscVirtioHotPlug = &v } // HasDiscVirtioHotPlug returns a boolean if a field has been set. func (o *SnapshotProperties) HasDiscVirtioHotPlug() bool { if o != nil && o.DiscVirtioHotPlug != nil { return true } return false } // GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetDiscVirtioHotUnplug() *bool { if o == nil { return nil } return o.DiscVirtioHotUnplug } // GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.DiscVirtioHotUnplug, true } // SetDiscVirtioHotUnplug sets field value func (o *SnapshotProperties) SetDiscVirtioHotUnplug(v bool) { o.DiscVirtioHotUnplug = &v } // HasDiscVirtioHotUnplug returns a boolean if a field has been set. func (o *SnapshotProperties) HasDiscVirtioHotUnplug() bool { if o != nil && o.DiscVirtioHotUnplug != nil { return true } return false } // GetDiscScsiHotPlug returns the DiscScsiHotPlug field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetDiscScsiHotPlug() *bool { if o == nil { return nil } return o.DiscScsiHotPlug } // GetDiscScsiHotPlugOk returns a tuple with the DiscScsiHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetDiscScsiHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.DiscScsiHotPlug, true } // SetDiscScsiHotPlug sets field value func (o *SnapshotProperties) SetDiscScsiHotPlug(v bool) { o.DiscScsiHotPlug = &v } // HasDiscScsiHotPlug returns a boolean if a field has been set. func (o *SnapshotProperties) HasDiscScsiHotPlug() bool { if o != nil && o.DiscScsiHotPlug != nil { return true } return false } // GetExposeSerial returns the ExposeSerial field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetExposeSerial() *bool { if o == nil { return nil } return o.ExposeSerial } // GetExposeSerialOk returns a tuple with the ExposeSerial field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetExposeSerialOk() (*bool, bool) { if o == nil { return nil, false } return o.ExposeSerial, true } // SetExposeSerial sets field value func (o *SnapshotProperties) SetExposeSerial(v bool) { o.ExposeSerial = &v } // HasExposeSerial returns a boolean if a field has been set. func (o *SnapshotProperties) HasExposeSerial() bool { if o != nil && o.ExposeSerial != nil { return true } return false } // GetDiscScsiHotUnplug returns the DiscScsiHotUnplug field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetDiscScsiHotUnplug() *bool { if o == nil { return nil } return o.DiscScsiHotUnplug } // GetDiscScsiHotUnplugOk returns a tuple with the DiscScsiHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetDiscScsiHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.DiscScsiHotUnplug, true } // SetDiscScsiHotUnplug sets field value func (o *SnapshotProperties) SetDiscScsiHotUnplug(v bool) { o.DiscScsiHotUnplug = &v } // HasDiscScsiHotUnplug returns a boolean if a field has been set. func (o *SnapshotProperties) HasDiscScsiHotUnplug() bool { if o != nil && o.DiscScsiHotUnplug != nil { return true } return false } // GetLicenceType returns the LicenceType field value // If the value is explicit nil, nil is returned func (o *SnapshotProperties) GetLicenceType() *string { if o == nil { return nil } return o.LicenceType } // GetLicenceTypeOk returns a tuple with the LicenceType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SnapshotProperties) GetLicenceTypeOk() (*string, bool) { if o == nil { return nil, false } return o.LicenceType, true } // SetLicenceType sets field value func (o *SnapshotProperties) SetLicenceType(v string) { o.LicenceType = &v } // HasLicenceType returns a boolean if a field has been set. func (o *SnapshotProperties) HasLicenceType() bool { if o != nil && o.LicenceType != nil { return true } return false } func (o SnapshotProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Description != nil { toSerialize["description"] = o.Description } if o.Location != nil { toSerialize["location"] = o.Location } if o.Size != nil { toSerialize["size"] = o.Size } if o.SecAuthProtection != nil { toSerialize["secAuthProtection"] = o.SecAuthProtection } if o.CpuHotPlug != nil { toSerialize["cpuHotPlug"] = o.CpuHotPlug } if o.CpuHotUnplug != nil { toSerialize["cpuHotUnplug"] = o.CpuHotUnplug } if o.RamHotPlug != nil { toSerialize["ramHotPlug"] = o.RamHotPlug } if o.RamHotUnplug != nil { toSerialize["ramHotUnplug"] = o.RamHotUnplug } if o.NicHotPlug != nil { toSerialize["nicHotPlug"] = o.NicHotPlug } if o.NicHotUnplug != nil { toSerialize["nicHotUnplug"] = o.NicHotUnplug } if o.DiscVirtioHotPlug != nil { toSerialize["discVirtioHotPlug"] = o.DiscVirtioHotPlug } if o.DiscVirtioHotUnplug != nil { toSerialize["discVirtioHotUnplug"] = o.DiscVirtioHotUnplug } if o.DiscScsiHotPlug != nil { toSerialize["discScsiHotPlug"] = o.DiscScsiHotPlug } if o.ExposeSerial != nil { toSerialize["exposeSerial"] = o.ExposeSerial } if o.DiscScsiHotUnplug != nil { toSerialize["discScsiHotUnplug"] = o.DiscScsiHotUnplug } if o.LicenceType != nil { toSerialize["licenceType"] = o.LicenceType } return json.Marshal(toSerialize) } type NullableSnapshotProperties struct { value *SnapshotProperties isSet bool } func (v NullableSnapshotProperties) Get() *SnapshotProperties { return v.value } func (v *NullableSnapshotProperties) Set(val *SnapshotProperties) { v.value = val v.isSet = true } func (v NullableSnapshotProperties) IsSet() bool { return v.isSet } func (v *NullableSnapshotProperties) Unset() { v.value = nil v.isSet = false } func NewNullableSnapshotProperties(val *SnapshotProperties) *NullableSnapshotProperties { return &NullableSnapshotProperties{value: val, isSet: true} } func (v NullableSnapshotProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableSnapshotProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_snapshots.go000066400000000000000000000126261465267054300234350ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Snapshots struct for Snapshots type Snapshots struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Snapshot `json:"items,omitempty"` } // NewSnapshots instantiates a new Snapshots object // This constructor will assign default values to properties that have it defined, // 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 NewSnapshots() *Snapshots { this := Snapshots{} return &this } // NewSnapshotsWithDefaults instantiates a new Snapshots object // This 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 NewSnapshotsWithDefaults() *Snapshots { this := Snapshots{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Snapshots) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Snapshots) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Snapshots) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Snapshots) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Snapshots) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Snapshots) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Snapshots) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Snapshots) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Snapshots) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Snapshots) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Snapshots) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Snapshots) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Snapshots) GetItems() *[]Snapshot { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Snapshots) GetItemsOk() (*[]Snapshot, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Snapshots) SetItems(v []Snapshot) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Snapshots) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o Snapshots) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableSnapshots struct { value *Snapshots isSet bool } func (v NullableSnapshots) Get() *Snapshots { return v.value } func (v *NullableSnapshots) Set(val *Snapshots) { v.value = val v.isSet = true } func (v NullableSnapshots) IsSet() bool { return v.isSet } func (v *NullableSnapshots) Unset() { v.value = nil v.isSet = false } func NewNullableSnapshots(val *Snapshots) *NullableSnapshots { return &NullableSnapshots{value: val, isSet: true} } func (v NullableSnapshots) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableSnapshots) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_target_group.go000066400000000000000000000151651465267054300241160ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // TargetGroup struct for TargetGroup type TargetGroup struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *TargetGroupProperties `json:"properties"` } // NewTargetGroup instantiates a new TargetGroup object // This constructor will assign default values to properties that have it defined, // 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 NewTargetGroup(properties TargetGroupProperties) *TargetGroup { this := TargetGroup{} this.Properties = &properties return &this } // NewTargetGroupWithDefaults instantiates a new TargetGroup object // This 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 NewTargetGroupWithDefaults() *TargetGroup { this := TargetGroup{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *TargetGroup) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroup) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *TargetGroup) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *TargetGroup) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *TargetGroup) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroup) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *TargetGroup) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *TargetGroup) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *TargetGroup) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroup) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *TargetGroup) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *TargetGroup) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *TargetGroup) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroup) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *TargetGroup) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *TargetGroup) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *TargetGroup) GetProperties() *TargetGroupProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroup) GetPropertiesOk() (*TargetGroupProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *TargetGroup) SetProperties(v TargetGroupProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *TargetGroup) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o TargetGroup) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableTargetGroup struct { value *TargetGroup isSet bool } func (v NullableTargetGroup) Get() *TargetGroup { return v.value } func (v *NullableTargetGroup) Set(val *TargetGroup) { v.value = val v.isSet = true } func (v NullableTargetGroup) IsSet() bool { return v.isSet } func (v *NullableTargetGroup) Unset() { v.value = nil v.isSet = false } func NewNullableTargetGroup(val *TargetGroup) *NullableTargetGroup { return &NullableTargetGroup{value: val, isSet: true} } func (v NullableTargetGroup) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTargetGroup) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_target_group_health_check.go000066400000000000000000000134021465267054300265700ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // TargetGroupHealthCheck struct for TargetGroupHealthCheck type TargetGroupHealthCheck struct { // The maximum time in milliseconds is to wait for a target to respond to a check. For target VMs with a 'Check Interval' set, the smaller of the two values is used once the TCP connection is established. CheckTimeout *int32 `json:"checkTimeout,omitempty"` // The interval in milliseconds between consecutive health checks; the default value is '2000'. CheckInterval *int32 `json:"checkInterval,omitempty"` // The maximum number of attempts to reconnect to a target after a connection failure. The valid range is '0 to 65535'; the default value is '3'. Retries *int32 `json:"retries,omitempty"` } // NewTargetGroupHealthCheck instantiates a new TargetGroupHealthCheck object // This constructor will assign default values to properties that have it defined, // 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 NewTargetGroupHealthCheck() *TargetGroupHealthCheck { this := TargetGroupHealthCheck{} return &this } // NewTargetGroupHealthCheckWithDefaults instantiates a new TargetGroupHealthCheck object // This 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 NewTargetGroupHealthCheckWithDefaults() *TargetGroupHealthCheck { this := TargetGroupHealthCheck{} return &this } // GetCheckTimeout returns the CheckTimeout field value // If the value is explicit nil, nil is returned func (o *TargetGroupHealthCheck) GetCheckTimeout() *int32 { if o == nil { return nil } return o.CheckTimeout } // GetCheckTimeoutOk returns a tuple with the CheckTimeout field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupHealthCheck) GetCheckTimeoutOk() (*int32, bool) { if o == nil { return nil, false } return o.CheckTimeout, true } // SetCheckTimeout sets field value func (o *TargetGroupHealthCheck) SetCheckTimeout(v int32) { o.CheckTimeout = &v } // HasCheckTimeout returns a boolean if a field has been set. func (o *TargetGroupHealthCheck) HasCheckTimeout() bool { if o != nil && o.CheckTimeout != nil { return true } return false } // GetCheckInterval returns the CheckInterval field value // If the value is explicit nil, nil is returned func (o *TargetGroupHealthCheck) GetCheckInterval() *int32 { if o == nil { return nil } return o.CheckInterval } // GetCheckIntervalOk returns a tuple with the CheckInterval field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupHealthCheck) GetCheckIntervalOk() (*int32, bool) { if o == nil { return nil, false } return o.CheckInterval, true } // SetCheckInterval sets field value func (o *TargetGroupHealthCheck) SetCheckInterval(v int32) { o.CheckInterval = &v } // HasCheckInterval returns a boolean if a field has been set. func (o *TargetGroupHealthCheck) HasCheckInterval() bool { if o != nil && o.CheckInterval != nil { return true } return false } // GetRetries returns the Retries field value // If the value is explicit nil, nil is returned func (o *TargetGroupHealthCheck) GetRetries() *int32 { if o == nil { return nil } return o.Retries } // GetRetriesOk returns a tuple with the Retries field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupHealthCheck) GetRetriesOk() (*int32, bool) { if o == nil { return nil, false } return o.Retries, true } // SetRetries sets field value func (o *TargetGroupHealthCheck) SetRetries(v int32) { o.Retries = &v } // HasRetries returns a boolean if a field has been set. func (o *TargetGroupHealthCheck) HasRetries() bool { if o != nil && o.Retries != nil { return true } return false } func (o TargetGroupHealthCheck) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.CheckTimeout != nil { toSerialize["checkTimeout"] = o.CheckTimeout } if o.CheckInterval != nil { toSerialize["checkInterval"] = o.CheckInterval } if o.Retries != nil { toSerialize["retries"] = o.Retries } return json.Marshal(toSerialize) } type NullableTargetGroupHealthCheck struct { value *TargetGroupHealthCheck isSet bool } func (v NullableTargetGroupHealthCheck) Get() *TargetGroupHealthCheck { return v.value } func (v *NullableTargetGroupHealthCheck) Set(val *TargetGroupHealthCheck) { v.value = val v.isSet = true } func (v NullableTargetGroupHealthCheck) IsSet() bool { return v.isSet } func (v *NullableTargetGroupHealthCheck) Unset() { v.value = nil v.isSet = false } func NewNullableTargetGroupHealthCheck(val *TargetGroupHealthCheck) *NullableTargetGroupHealthCheck { return &NullableTargetGroupHealthCheck{value: val, isSet: true} } func (v NullableTargetGroupHealthCheck) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTargetGroupHealthCheck) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_target_group_http_health_check.go000066400000000000000000000211261465267054300276310ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // TargetGroupHttpHealthCheck struct for TargetGroupHttpHealthCheck type TargetGroupHttpHealthCheck struct { // The destination URL for HTTP the health check; the default is '/'. Path *string `json:"path,omitempty"` // The method used for the health check request. Method *string `json:"method,omitempty"` // Specify the target's response type to match ALB's request. MatchType *string `json:"matchType"` // The response returned by the request. It can be a status code or a response body depending on the definition of 'matchType'. Response *string `json:"response"` // Specifies whether to use a regular expression to parse the response body; the default value is 'FALSE'. By using regular expressions, you can flexibly customize the expected response from a healthy server. Regex *bool `json:"regex,omitempty"` // Specifies whether to negate an individual entry; the default value is 'FALSE'. Negate *bool `json:"negate,omitempty"` } // NewTargetGroupHttpHealthCheck instantiates a new TargetGroupHttpHealthCheck object // This constructor will assign default values to properties that have it defined, // 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 NewTargetGroupHttpHealthCheck(matchType string, response string) *TargetGroupHttpHealthCheck { this := TargetGroupHttpHealthCheck{} this.MatchType = &matchType this.Response = &response return &this } // NewTargetGroupHttpHealthCheckWithDefaults instantiates a new TargetGroupHttpHealthCheck object // This 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 NewTargetGroupHttpHealthCheckWithDefaults() *TargetGroupHttpHealthCheck { this := TargetGroupHttpHealthCheck{} return &this } // GetPath returns the Path field value // If the value is explicit nil, nil is returned func (o *TargetGroupHttpHealthCheck) GetPath() *string { if o == nil { return nil } return o.Path } // GetPathOk returns a tuple with the Path field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupHttpHealthCheck) GetPathOk() (*string, bool) { if o == nil { return nil, false } return o.Path, true } // SetPath sets field value func (o *TargetGroupHttpHealthCheck) SetPath(v string) { o.Path = &v } // HasPath returns a boolean if a field has been set. func (o *TargetGroupHttpHealthCheck) HasPath() bool { if o != nil && o.Path != nil { return true } return false } // GetMethod returns the Method field value // If the value is explicit nil, nil is returned func (o *TargetGroupHttpHealthCheck) GetMethod() *string { if o == nil { return nil } return o.Method } // GetMethodOk returns a tuple with the Method field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupHttpHealthCheck) GetMethodOk() (*string, bool) { if o == nil { return nil, false } return o.Method, true } // SetMethod sets field value func (o *TargetGroupHttpHealthCheck) SetMethod(v string) { o.Method = &v } // HasMethod returns a boolean if a field has been set. func (o *TargetGroupHttpHealthCheck) HasMethod() bool { if o != nil && o.Method != nil { return true } return false } // GetMatchType returns the MatchType field value // If the value is explicit nil, nil is returned func (o *TargetGroupHttpHealthCheck) GetMatchType() *string { if o == nil { return nil } return o.MatchType } // GetMatchTypeOk returns a tuple with the MatchType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupHttpHealthCheck) GetMatchTypeOk() (*string, bool) { if o == nil { return nil, false } return o.MatchType, true } // SetMatchType sets field value func (o *TargetGroupHttpHealthCheck) SetMatchType(v string) { o.MatchType = &v } // HasMatchType returns a boolean if a field has been set. func (o *TargetGroupHttpHealthCheck) HasMatchType() bool { if o != nil && o.MatchType != nil { return true } return false } // GetResponse returns the Response field value // If the value is explicit nil, nil is returned func (o *TargetGroupHttpHealthCheck) GetResponse() *string { if o == nil { return nil } return o.Response } // GetResponseOk returns a tuple with the Response field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupHttpHealthCheck) GetResponseOk() (*string, bool) { if o == nil { return nil, false } return o.Response, true } // SetResponse sets field value func (o *TargetGroupHttpHealthCheck) SetResponse(v string) { o.Response = &v } // HasResponse returns a boolean if a field has been set. func (o *TargetGroupHttpHealthCheck) HasResponse() bool { if o != nil && o.Response != nil { return true } return false } // GetRegex returns the Regex field value // If the value is explicit nil, nil is returned func (o *TargetGroupHttpHealthCheck) GetRegex() *bool { if o == nil { return nil } return o.Regex } // GetRegexOk returns a tuple with the Regex field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupHttpHealthCheck) GetRegexOk() (*bool, bool) { if o == nil { return nil, false } return o.Regex, true } // SetRegex sets field value func (o *TargetGroupHttpHealthCheck) SetRegex(v bool) { o.Regex = &v } // HasRegex returns a boolean if a field has been set. func (o *TargetGroupHttpHealthCheck) HasRegex() bool { if o != nil && o.Regex != nil { return true } return false } // GetNegate returns the Negate field value // If the value is explicit nil, nil is returned func (o *TargetGroupHttpHealthCheck) GetNegate() *bool { if o == nil { return nil } return o.Negate } // GetNegateOk returns a tuple with the Negate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupHttpHealthCheck) GetNegateOk() (*bool, bool) { if o == nil { return nil, false } return o.Negate, true } // SetNegate sets field value func (o *TargetGroupHttpHealthCheck) SetNegate(v bool) { o.Negate = &v } // HasNegate returns a boolean if a field has been set. func (o *TargetGroupHttpHealthCheck) HasNegate() bool { if o != nil && o.Negate != nil { return true } return false } func (o TargetGroupHttpHealthCheck) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Path != nil { toSerialize["path"] = o.Path } if o.Method != nil { toSerialize["method"] = o.Method } if o.MatchType != nil { toSerialize["matchType"] = o.MatchType } if o.Response != nil { toSerialize["response"] = o.Response } if o.Regex != nil { toSerialize["regex"] = o.Regex } if o.Negate != nil { toSerialize["negate"] = o.Negate } return json.Marshal(toSerialize) } type NullableTargetGroupHttpHealthCheck struct { value *TargetGroupHttpHealthCheck isSet bool } func (v NullableTargetGroupHttpHealthCheck) Get() *TargetGroupHttpHealthCheck { return v.value } func (v *NullableTargetGroupHttpHealthCheck) Set(val *TargetGroupHttpHealthCheck) { v.value = val v.isSet = true } func (v NullableTargetGroupHttpHealthCheck) IsSet() bool { return v.isSet } func (v *NullableTargetGroupHttpHealthCheck) Unset() { v.value = nil v.isSet = false } func NewNullableTargetGroupHttpHealthCheck(val *TargetGroupHttpHealthCheck) *NullableTargetGroupHttpHealthCheck { return &NullableTargetGroupHttpHealthCheck{value: val, isSet: true} } func (v NullableTargetGroupHttpHealthCheck) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTargetGroupHttpHealthCheck) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_target_group_properties.go000066400000000000000000000240271465267054300263670ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // TargetGroupProperties struct for TargetGroupProperties type TargetGroupProperties struct { // The target group name. Name *string `json:"name"` // The balancing algorithm. A balancing algorithm consists of predefined rules with the logic that a load balancer uses to distribute network traffic between servers. - **Round Robin**: Targets are served alternately according to their weighting. - **Least Connection**: The target with the least active connection is served. - **Random**: The targets are served based on a consistent pseudorandom algorithm. - **Source IP**: It is ensured that the same client IP address reaches the same target. Algorithm *string `json:"algorithm"` // The forwarding protocol. Only the value 'HTTP' is allowed. Protocol *string `json:"protocol"` // The forwarding protocol version. Value is ignored when protocol is not 'HTTP'. ProtocolVersion *string `json:"protocolVersion,omitempty"` // Array of items in the collection. Targets *[]TargetGroupTarget `json:"targets,omitempty"` HealthCheck *TargetGroupHealthCheck `json:"healthCheck,omitempty"` HttpHealthCheck *TargetGroupHttpHealthCheck `json:"httpHealthCheck,omitempty"` } // NewTargetGroupProperties instantiates a new TargetGroupProperties object // This constructor will assign default values to properties that have it defined, // 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 NewTargetGroupProperties(name string, algorithm string, protocol string) *TargetGroupProperties { this := TargetGroupProperties{} this.Name = &name this.Algorithm = &algorithm this.Protocol = &protocol return &this } // NewTargetGroupPropertiesWithDefaults instantiates a new TargetGroupProperties object // This 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 NewTargetGroupPropertiesWithDefaults() *TargetGroupProperties { this := TargetGroupProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *TargetGroupProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *TargetGroupProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *TargetGroupProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetAlgorithm returns the Algorithm field value // If the value is explicit nil, nil is returned func (o *TargetGroupProperties) GetAlgorithm() *string { if o == nil { return nil } return o.Algorithm } // GetAlgorithmOk returns a tuple with the Algorithm field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupProperties) GetAlgorithmOk() (*string, bool) { if o == nil { return nil, false } return o.Algorithm, true } // SetAlgorithm sets field value func (o *TargetGroupProperties) SetAlgorithm(v string) { o.Algorithm = &v } // HasAlgorithm returns a boolean if a field has been set. func (o *TargetGroupProperties) HasAlgorithm() bool { if o != nil && o.Algorithm != nil { return true } return false } // GetProtocol returns the Protocol field value // If the value is explicit nil, nil is returned func (o *TargetGroupProperties) GetProtocol() *string { if o == nil { return nil } return o.Protocol } // GetProtocolOk returns a tuple with the Protocol field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupProperties) GetProtocolOk() (*string, bool) { if o == nil { return nil, false } return o.Protocol, true } // SetProtocol sets field value func (o *TargetGroupProperties) SetProtocol(v string) { o.Protocol = &v } // HasProtocol returns a boolean if a field has been set. func (o *TargetGroupProperties) HasProtocol() bool { if o != nil && o.Protocol != nil { return true } return false } // GetProtocolVersion returns the ProtocolVersion field value // If the value is explicit nil, nil is returned func (o *TargetGroupProperties) GetProtocolVersion() *string { if o == nil { return nil } return o.ProtocolVersion } // GetProtocolVersionOk returns a tuple with the ProtocolVersion field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupProperties) GetProtocolVersionOk() (*string, bool) { if o == nil { return nil, false } return o.ProtocolVersion, true } // SetProtocolVersion sets field value func (o *TargetGroupProperties) SetProtocolVersion(v string) { o.ProtocolVersion = &v } // HasProtocolVersion returns a boolean if a field has been set. func (o *TargetGroupProperties) HasProtocolVersion() bool { if o != nil && o.ProtocolVersion != nil { return true } return false } // GetTargets returns the Targets field value // If the value is explicit nil, nil is returned func (o *TargetGroupProperties) GetTargets() *[]TargetGroupTarget { if o == nil { return nil } return o.Targets } // GetTargetsOk returns a tuple with the Targets field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupProperties) GetTargetsOk() (*[]TargetGroupTarget, bool) { if o == nil { return nil, false } return o.Targets, true } // SetTargets sets field value func (o *TargetGroupProperties) SetTargets(v []TargetGroupTarget) { o.Targets = &v } // HasTargets returns a boolean if a field has been set. func (o *TargetGroupProperties) HasTargets() bool { if o != nil && o.Targets != nil { return true } return false } // GetHealthCheck returns the HealthCheck field value // If the value is explicit nil, nil is returned func (o *TargetGroupProperties) GetHealthCheck() *TargetGroupHealthCheck { if o == nil { return nil } return o.HealthCheck } // GetHealthCheckOk returns a tuple with the HealthCheck field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupProperties) GetHealthCheckOk() (*TargetGroupHealthCheck, bool) { if o == nil { return nil, false } return o.HealthCheck, true } // SetHealthCheck sets field value func (o *TargetGroupProperties) SetHealthCheck(v TargetGroupHealthCheck) { o.HealthCheck = &v } // HasHealthCheck returns a boolean if a field has been set. func (o *TargetGroupProperties) HasHealthCheck() bool { if o != nil && o.HealthCheck != nil { return true } return false } // GetHttpHealthCheck returns the HttpHealthCheck field value // If the value is explicit nil, nil is returned func (o *TargetGroupProperties) GetHttpHealthCheck() *TargetGroupHttpHealthCheck { if o == nil { return nil } return o.HttpHealthCheck } // GetHttpHealthCheckOk returns a tuple with the HttpHealthCheck field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupProperties) GetHttpHealthCheckOk() (*TargetGroupHttpHealthCheck, bool) { if o == nil { return nil, false } return o.HttpHealthCheck, true } // SetHttpHealthCheck sets field value func (o *TargetGroupProperties) SetHttpHealthCheck(v TargetGroupHttpHealthCheck) { o.HttpHealthCheck = &v } // HasHttpHealthCheck returns a boolean if a field has been set. func (o *TargetGroupProperties) HasHttpHealthCheck() bool { if o != nil && o.HttpHealthCheck != nil { return true } return false } func (o TargetGroupProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Algorithm != nil { toSerialize["algorithm"] = o.Algorithm } if o.Protocol != nil { toSerialize["protocol"] = o.Protocol } if o.ProtocolVersion != nil { toSerialize["protocolVersion"] = o.ProtocolVersion } if o.Targets != nil { toSerialize["targets"] = o.Targets } if o.HealthCheck != nil { toSerialize["healthCheck"] = o.HealthCheck } if o.HttpHealthCheck != nil { toSerialize["httpHealthCheck"] = o.HttpHealthCheck } return json.Marshal(toSerialize) } type NullableTargetGroupProperties struct { value *TargetGroupProperties isSet bool } func (v NullableTargetGroupProperties) Get() *TargetGroupProperties { return v.value } func (v *NullableTargetGroupProperties) Set(val *TargetGroupProperties) { v.value = val v.isSet = true } func (v NullableTargetGroupProperties) IsSet() bool { return v.isSet } func (v *NullableTargetGroupProperties) Unset() { v.value = nil v.isSet = false } func NewNullableTargetGroupProperties(val *TargetGroupProperties) *NullableTargetGroupProperties { return &NullableTargetGroupProperties{value: val, isSet: true} } func (v NullableTargetGroupProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTargetGroupProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_target_group_put.go000066400000000000000000000134461465267054300250060ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // TargetGroupPut struct for TargetGroupPut type TargetGroupPut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Properties *TargetGroupProperties `json:"properties"` } // NewTargetGroupPut instantiates a new TargetGroupPut object // This constructor will assign default values to properties that have it defined, // 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 NewTargetGroupPut(properties TargetGroupProperties) *TargetGroupPut { this := TargetGroupPut{} this.Properties = &properties return &this } // NewTargetGroupPutWithDefaults instantiates a new TargetGroupPut object // This 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 NewTargetGroupPutWithDefaults() *TargetGroupPut { this := TargetGroupPut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *TargetGroupPut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *TargetGroupPut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *TargetGroupPut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *TargetGroupPut) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupPut) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *TargetGroupPut) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *TargetGroupPut) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *TargetGroupPut) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupPut) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *TargetGroupPut) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *TargetGroupPut) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *TargetGroupPut) GetProperties() *TargetGroupProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupPut) GetPropertiesOk() (*TargetGroupProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *TargetGroupPut) SetProperties(v TargetGroupProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *TargetGroupPut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o TargetGroupPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableTargetGroupPut struct { value *TargetGroupPut isSet bool } func (v NullableTargetGroupPut) Get() *TargetGroupPut { return v.value } func (v *NullableTargetGroupPut) Set(val *TargetGroupPut) { v.value = val v.isSet = true } func (v NullableTargetGroupPut) IsSet() bool { return v.isSet } func (v *NullableTargetGroupPut) Unset() { v.value = nil v.isSet = false } func NewNullableTargetGroupPut(val *TargetGroupPut) *NullableTargetGroupPut { return &NullableTargetGroupPut{value: val, isSet: true} } func (v NullableTargetGroupPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTargetGroupPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_target_group_target.go000066400000000000000000000220301465267054300254510ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // TargetGroupTarget struct for TargetGroupTarget type TargetGroupTarget struct { // The IP address of the balanced target. Ip *string `json:"ip"` // The port of the balanced target service; the valid range is 1 to 65535. Port *int32 `json:"port"` // The traffic is distributed proportionally to target weight, which is the ratio of the total weight of all targets. A target with higher weight receives a larger share of traffic. The valid range is from 0 to 256; the default value is '1'. Targets with a weight of '0' do not participate in load balancing but still accept persistent connections. We recommend using values in the middle range to leave room for later adjustments. Weight *int32 `json:"weight"` // Proxy protocol version. ProxyProtocol *string `json:"proxyProtocol,omitempty"` // When the health check is enabled, the target is available only when it accepts regular TCP or HTTP connection attempts for state checking. The state check consists of one connection attempt with the target's address and port. The default value is 'TRUE'. HealthCheckEnabled *bool `json:"healthCheckEnabled,omitempty"` // When the maintenance mode is enabled, the target is prevented from receiving traffic; the default value is 'FALSE'. MaintenanceEnabled *bool `json:"maintenanceEnabled,omitempty"` } // NewTargetGroupTarget instantiates a new TargetGroupTarget object // This constructor will assign default values to properties that have it defined, // 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 NewTargetGroupTarget(ip string, port int32, weight int32) *TargetGroupTarget { this := TargetGroupTarget{} this.Ip = &ip this.Port = &port this.Weight = &weight var proxyProtocol string = "none" this.ProxyProtocol = &proxyProtocol return &this } // NewTargetGroupTargetWithDefaults instantiates a new TargetGroupTarget object // This 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 NewTargetGroupTargetWithDefaults() *TargetGroupTarget { this := TargetGroupTarget{} var proxyProtocol string = "none" this.ProxyProtocol = &proxyProtocol return &this } // GetIp returns the Ip field value // If the value is explicit nil, nil is returned func (o *TargetGroupTarget) GetIp() *string { if o == nil { return nil } return o.Ip } // GetIpOk returns a tuple with the Ip field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupTarget) GetIpOk() (*string, bool) { if o == nil { return nil, false } return o.Ip, true } // SetIp sets field value func (o *TargetGroupTarget) SetIp(v string) { o.Ip = &v } // HasIp returns a boolean if a field has been set. func (o *TargetGroupTarget) HasIp() bool { if o != nil && o.Ip != nil { return true } return false } // GetPort returns the Port field value // If the value is explicit nil, nil is returned func (o *TargetGroupTarget) GetPort() *int32 { if o == nil { return nil } return o.Port } // GetPortOk returns a tuple with the Port field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupTarget) GetPortOk() (*int32, bool) { if o == nil { return nil, false } return o.Port, true } // SetPort sets field value func (o *TargetGroupTarget) SetPort(v int32) { o.Port = &v } // HasPort returns a boolean if a field has been set. func (o *TargetGroupTarget) HasPort() bool { if o != nil && o.Port != nil { return true } return false } // GetWeight returns the Weight field value // If the value is explicit nil, nil is returned func (o *TargetGroupTarget) GetWeight() *int32 { if o == nil { return nil } return o.Weight } // GetWeightOk returns a tuple with the Weight field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupTarget) GetWeightOk() (*int32, bool) { if o == nil { return nil, false } return o.Weight, true } // SetWeight sets field value func (o *TargetGroupTarget) SetWeight(v int32) { o.Weight = &v } // HasWeight returns a boolean if a field has been set. func (o *TargetGroupTarget) HasWeight() bool { if o != nil && o.Weight != nil { return true } return false } // GetProxyProtocol returns the ProxyProtocol field value // If the value is explicit nil, nil is returned func (o *TargetGroupTarget) GetProxyProtocol() *string { if o == nil { return nil } return o.ProxyProtocol } // GetProxyProtocolOk returns a tuple with the ProxyProtocol field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupTarget) GetProxyProtocolOk() (*string, bool) { if o == nil { return nil, false } return o.ProxyProtocol, true } // SetProxyProtocol sets field value func (o *TargetGroupTarget) SetProxyProtocol(v string) { o.ProxyProtocol = &v } // HasProxyProtocol returns a boolean if a field has been set. func (o *TargetGroupTarget) HasProxyProtocol() bool { if o != nil && o.ProxyProtocol != nil { return true } return false } // GetHealthCheckEnabled returns the HealthCheckEnabled field value // If the value is explicit nil, nil is returned func (o *TargetGroupTarget) GetHealthCheckEnabled() *bool { if o == nil { return nil } return o.HealthCheckEnabled } // GetHealthCheckEnabledOk returns a tuple with the HealthCheckEnabled field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupTarget) GetHealthCheckEnabledOk() (*bool, bool) { if o == nil { return nil, false } return o.HealthCheckEnabled, true } // SetHealthCheckEnabled sets field value func (o *TargetGroupTarget) SetHealthCheckEnabled(v bool) { o.HealthCheckEnabled = &v } // HasHealthCheckEnabled returns a boolean if a field has been set. func (o *TargetGroupTarget) HasHealthCheckEnabled() bool { if o != nil && o.HealthCheckEnabled != nil { return true } return false } // GetMaintenanceEnabled returns the MaintenanceEnabled field value // If the value is explicit nil, nil is returned func (o *TargetGroupTarget) GetMaintenanceEnabled() *bool { if o == nil { return nil } return o.MaintenanceEnabled } // GetMaintenanceEnabledOk returns a tuple with the MaintenanceEnabled field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroupTarget) GetMaintenanceEnabledOk() (*bool, bool) { if o == nil { return nil, false } return o.MaintenanceEnabled, true } // SetMaintenanceEnabled sets field value func (o *TargetGroupTarget) SetMaintenanceEnabled(v bool) { o.MaintenanceEnabled = &v } // HasMaintenanceEnabled returns a boolean if a field has been set. func (o *TargetGroupTarget) HasMaintenanceEnabled() bool { if o != nil && o.MaintenanceEnabled != nil { return true } return false } func (o TargetGroupTarget) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Ip != nil { toSerialize["ip"] = o.Ip } if o.Port != nil { toSerialize["port"] = o.Port } if o.Weight != nil { toSerialize["weight"] = o.Weight } if o.ProxyProtocol != nil { toSerialize["proxyProtocol"] = o.ProxyProtocol } if o.HealthCheckEnabled != nil { toSerialize["healthCheckEnabled"] = o.HealthCheckEnabled } if o.MaintenanceEnabled != nil { toSerialize["maintenanceEnabled"] = o.MaintenanceEnabled } return json.Marshal(toSerialize) } type NullableTargetGroupTarget struct { value *TargetGroupTarget isSet bool } func (v NullableTargetGroupTarget) Get() *TargetGroupTarget { return v.value } func (v *NullableTargetGroupTarget) Set(val *TargetGroupTarget) { v.value = val v.isSet = true } func (v NullableTargetGroupTarget) IsSet() bool { return v.isSet } func (v *NullableTargetGroupTarget) Unset() { v.value = nil v.isSet = false } func NewNullableTargetGroupTarget(val *TargetGroupTarget) *NullableTargetGroupTarget { return &NullableTargetGroupTarget{value: val, isSet: true} } func (v NullableTargetGroupTarget) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTargetGroupTarget) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_target_groups.go000066400000000000000000000204161465267054300242740ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // TargetGroups struct for TargetGroups type TargetGroups struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]TargetGroup `json:"items,omitempty"` // The offset, specified in the request (if not is specified, 0 is used by default). Offset *float32 `json:"offset,omitempty"` // The limit, specified in the request (if not specified, the endpoint's default pagination limit is used). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewTargetGroups instantiates a new TargetGroups object // This constructor will assign default values to properties that have it defined, // 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 NewTargetGroups() *TargetGroups { this := TargetGroups{} return &this } // NewTargetGroupsWithDefaults instantiates a new TargetGroups object // This 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 NewTargetGroupsWithDefaults() *TargetGroups { this := TargetGroups{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *TargetGroups) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroups) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *TargetGroups) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *TargetGroups) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *TargetGroups) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroups) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *TargetGroups) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *TargetGroups) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *TargetGroups) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroups) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *TargetGroups) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *TargetGroups) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *TargetGroups) GetItems() *[]TargetGroup { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroups) GetItemsOk() (*[]TargetGroup, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *TargetGroups) SetItems(v []TargetGroup) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *TargetGroups) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *TargetGroups) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroups) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *TargetGroups) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *TargetGroups) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *TargetGroups) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroups) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *TargetGroups) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *TargetGroups) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *TargetGroups) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetGroups) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *TargetGroups) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *TargetGroups) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o TargetGroups) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableTargetGroups struct { value *TargetGroups isSet bool } func (v NullableTargetGroups) Get() *TargetGroups { return v.value } func (v *NullableTargetGroups) Set(val *TargetGroups) { v.value = val v.isSet = true } func (v NullableTargetGroups) IsSet() bool { return v.isSet } func (v *NullableTargetGroups) Unset() { v.value = nil v.isSet = false } func NewNullableTargetGroups(val *TargetGroups) *NullableTargetGroups { return &NullableTargetGroups{value: val, isSet: true} } func (v NullableTargetGroups) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTargetGroups) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_target_port_range.go000066400000000000000000000077611465267054300251250ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // TargetPortRange struct for TargetPortRange type TargetPortRange struct { // Target port range start associated with the NAT Gateway rule. Start *int32 `json:"start,omitempty"` // Target port range end associated with the NAT Gateway rule. End *int32 `json:"end,omitempty"` } // NewTargetPortRange instantiates a new TargetPortRange object // This constructor will assign default values to properties that have it defined, // 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 NewTargetPortRange() *TargetPortRange { this := TargetPortRange{} return &this } // NewTargetPortRangeWithDefaults instantiates a new TargetPortRange object // This 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 NewTargetPortRangeWithDefaults() *TargetPortRange { this := TargetPortRange{} return &this } // GetStart returns the Start field value // If the value is explicit nil, nil is returned func (o *TargetPortRange) GetStart() *int32 { if o == nil { return nil } return o.Start } // GetStartOk returns a tuple with the Start field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetPortRange) GetStartOk() (*int32, bool) { if o == nil { return nil, false } return o.Start, true } // SetStart sets field value func (o *TargetPortRange) SetStart(v int32) { o.Start = &v } // HasStart returns a boolean if a field has been set. func (o *TargetPortRange) HasStart() bool { if o != nil && o.Start != nil { return true } return false } // GetEnd returns the End field value // If the value is explicit nil, nil is returned func (o *TargetPortRange) GetEnd() *int32 { if o == nil { return nil } return o.End } // GetEndOk returns a tuple with the End field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TargetPortRange) GetEndOk() (*int32, bool) { if o == nil { return nil, false } return o.End, true } // SetEnd sets field value func (o *TargetPortRange) SetEnd(v int32) { o.End = &v } // HasEnd returns a boolean if a field has been set. func (o *TargetPortRange) HasEnd() bool { if o != nil && o.End != nil { return true } return false } func (o TargetPortRange) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Start != nil { toSerialize["start"] = o.Start } if o.End != nil { toSerialize["end"] = o.End } return json.Marshal(toSerialize) } type NullableTargetPortRange struct { value *TargetPortRange isSet bool } func (v NullableTargetPortRange) Get() *TargetPortRange { return v.value } func (v *NullableTargetPortRange) Set(val *TargetPortRange) { v.value = val v.isSet = true } func (v NullableTargetPortRange) IsSet() bool { return v.isSet } func (v *NullableTargetPortRange) Unset() { v.value = nil v.isSet = false } func NewNullableTargetPortRange(val *TargetPortRange) *NullableTargetPortRange { return &NullableTargetPortRange{value: val, isSet: true} } func (v NullableTargetPortRange) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTargetPortRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_template.go000066400000000000000000000147311465267054300232250ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Template struct for Template type Template struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *TemplateProperties `json:"properties"` } // NewTemplate instantiates a new Template object // This constructor will assign default values to properties that have it defined, // 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 NewTemplate(properties TemplateProperties) *Template { this := Template{} this.Properties = &properties return &this } // NewTemplateWithDefaults instantiates a new Template object // This 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 NewTemplateWithDefaults() *Template { this := Template{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Template) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Template) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Template) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Template) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Template) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Template) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Template) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Template) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Template) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Template) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Template) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Template) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Template) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Template) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Template) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Template) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Template) GetProperties() *TemplateProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Template) GetPropertiesOk() (*TemplateProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Template) SetProperties(v TemplateProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Template) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o Template) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableTemplate struct { value *Template isSet bool } func (v NullableTemplate) Get() *Template { return v.value } func (v *NullableTemplate) Set(val *Template) { v.value = val v.isSet = true } func (v NullableTemplate) IsSet() bool { return v.isSet } func (v *NullableTemplate) Unset() { v.value = nil v.isSet = false } func NewNullableTemplate(val *Template) *NullableTemplate { return &NullableTemplate{value: val, isSet: true} } func (v NullableTemplate) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTemplate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_template_properties.go000066400000000000000000000137411465267054300255010ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // TemplateProperties struct for TemplateProperties type TemplateProperties struct { // The resource name. Name *string `json:"name"` // The CPU cores count. Cores *float32 `json:"cores"` // The RAM size in MB. Ram *float32 `json:"ram"` // The storage size in GB. StorageSize *float32 `json:"storageSize"` } // NewTemplateProperties instantiates a new TemplateProperties object // This constructor will assign default values to properties that have it defined, // 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 NewTemplateProperties(name string, cores float32, ram float32, storageSize float32) *TemplateProperties { this := TemplateProperties{} this.Name = &name this.Cores = &cores this.Ram = &ram this.StorageSize = &storageSize return &this } // NewTemplatePropertiesWithDefaults instantiates a new TemplateProperties object // This 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 NewTemplatePropertiesWithDefaults() *TemplateProperties { this := TemplateProperties{} return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *TemplateProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TemplateProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *TemplateProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *TemplateProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetCores returns the Cores field value // If the value is explicit nil, nil is returned func (o *TemplateProperties) GetCores() *float32 { if o == nil { return nil } return o.Cores } // GetCoresOk returns a tuple with the Cores field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TemplateProperties) GetCoresOk() (*float32, bool) { if o == nil { return nil, false } return o.Cores, true } // SetCores sets field value func (o *TemplateProperties) SetCores(v float32) { o.Cores = &v } // HasCores returns a boolean if a field has been set. func (o *TemplateProperties) HasCores() bool { if o != nil && o.Cores != nil { return true } return false } // GetRam returns the Ram field value // If the value is explicit nil, nil is returned func (o *TemplateProperties) GetRam() *float32 { if o == nil { return nil } return o.Ram } // GetRamOk returns a tuple with the Ram field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TemplateProperties) GetRamOk() (*float32, bool) { if o == nil { return nil, false } return o.Ram, true } // SetRam sets field value func (o *TemplateProperties) SetRam(v float32) { o.Ram = &v } // HasRam returns a boolean if a field has been set. func (o *TemplateProperties) HasRam() bool { if o != nil && o.Ram != nil { return true } return false } // GetStorageSize returns the StorageSize field value // If the value is explicit nil, nil is returned func (o *TemplateProperties) GetStorageSize() *float32 { if o == nil { return nil } return o.StorageSize } // GetStorageSizeOk returns a tuple with the StorageSize field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *TemplateProperties) GetStorageSizeOk() (*float32, bool) { if o == nil { return nil, false } return o.StorageSize, true } // SetStorageSize sets field value func (o *TemplateProperties) SetStorageSize(v float32) { o.StorageSize = &v } // HasStorageSize returns a boolean if a field has been set. func (o *TemplateProperties) HasStorageSize() bool { if o != nil && o.StorageSize != nil { return true } return false } func (o TemplateProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Cores != nil { toSerialize["cores"] = o.Cores } if o.Ram != nil { toSerialize["ram"] = o.Ram } if o.StorageSize != nil { toSerialize["storageSize"] = o.StorageSize } return json.Marshal(toSerialize) } type NullableTemplateProperties struct { value *TemplateProperties isSet bool } func (v NullableTemplateProperties) Get() *TemplateProperties { return v.value } func (v *NullableTemplateProperties) Set(val *TemplateProperties) { v.value = val v.isSet = true } func (v NullableTemplateProperties) IsSet() bool { return v.isSet } func (v *NullableTemplateProperties) Unset() { v.value = nil v.isSet = false } func NewNullableTemplateProperties(val *TemplateProperties) *NullableTemplateProperties { return &NullableTemplateProperties{value: val, isSet: true} } func (v NullableTemplateProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTemplateProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_templates.go000066400000000000000000000126321465267054300234060ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Templates struct for Templates type Templates struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Template `json:"items,omitempty"` } // NewTemplates instantiates a new Templates object // This constructor will assign default values to properties that have it defined, // 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 NewTemplates() *Templates { this := Templates{} return &this } // NewTemplatesWithDefaults instantiates a new Templates object // This 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 NewTemplatesWithDefaults() *Templates { this := Templates{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Templates) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Templates) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Templates) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Templates) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Templates) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Templates) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Templates) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Templates) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Templates) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Templates) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Templates) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Templates) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Templates) GetItems() *[]Template { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Templates) GetItemsOk() (*[]Template, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Templates) SetItems(v []Template) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Templates) HasItems() bool { if o != nil && o.Items != nil { return true } return false } func (o Templates) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } return json.Marshal(toSerialize) } type NullableTemplates struct { value *Templates isSet bool } func (v NullableTemplates) Get() *Templates { return v.value } func (v *NullableTemplates) Set(val *Templates) { v.value = val v.isSet = true } func (v NullableTemplates) IsSet() bool { return v.isSet } func (v *NullableTemplates) Unset() { v.value = nil v.isSet = false } func NewNullableTemplates(val *Templates) *NullableTemplates { return &NullableTemplates{value: val, isSet: true} } func (v NullableTemplates) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTemplates) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_token.go000066400000000000000000000054511465267054300225310ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Token struct for Token type Token struct { // The jwToken for the server. Token *string `json:"token,omitempty"` } // NewToken instantiates a new Token object // This constructor will assign default values to properties that have it defined, // 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 NewToken() *Token { this := Token{} return &this } // NewTokenWithDefaults instantiates a new Token object // This 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 NewTokenWithDefaults() *Token { this := Token{} return &this } // GetToken returns the Token field value // If the value is explicit nil, nil is returned func (o *Token) GetToken() *string { if o == nil { return nil } return o.Token } // GetTokenOk returns a tuple with the Token field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Token) GetTokenOk() (*string, bool) { if o == nil { return nil, false } return o.Token, true } // SetToken sets field value func (o *Token) SetToken(v string) { o.Token = &v } // HasToken returns a boolean if a field has been set. func (o *Token) HasToken() bool { if o != nil && o.Token != nil { return true } return false } func (o Token) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Token != nil { toSerialize["token"] = o.Token } return json.Marshal(toSerialize) } type NullableToken struct { value *Token isSet bool } func (v NullableToken) Get() *Token { return v.value } func (v *NullableToken) Set(val *Token) { v.value = val v.isSet = true } func (v NullableToken) IsSet() bool { return v.isSet } func (v *NullableToken) Unset() { v.value = nil v.isSet = false } func NewNullableToken(val *Token) *NullableToken { return &NullableToken{value: val, isSet: true} } func (v NullableToken) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableToken) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_type.go000066400000000000000000000067531465267054300224000ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" "fmt" ) // Type the model 'Type' type Type string // List of Type const ( DATACENTER Type = "datacenter" SERVER Type = "server" VOLUME Type = "volume" NIC Type = "nic" LOADBALANCER Type = "loadbalancer" LOCATION Type = "location" FIREWALL_RULE Type = "firewall-rule" FLOW_LOG Type = "flow-log" IMAGE Type = "image" SNAPSHOT Type = "snapshot" LAN Type = "lan" IPBLOCK Type = "ipblock" PCC Type = "pcc" CONTRACT Type = "contract" USER Type = "user" GROUP Type = "group" COLLECTION Type = "collection" RESOURCE Type = "resource" REQUEST Type = "request" REQUEST_STATUS Type = "request-status" S3KEY Type = "s3key" BACKUPUNIT Type = "backupunit" LABEL Type = "label" K8S Type = "k8s" NODEPOOL Type = "nodepool" TEMPLATE Type = "template" NETWORKLOADBALANCER Type = "networkloadbalancer" FORWARDING_RULE Type = "forwarding-rule" NATGATEWAY Type = "natgateway" NATGATEWAY_RULE Type = "natgateway-rule" NODE Type = "node" APPLICATIONLOADBALANCER Type = "applicationloadbalancer" TARGET_GROUP Type = "target-group" ) func (v *Type) UnmarshalJSON(src []byte) error { var value string err := json.Unmarshal(src, &value) if err != nil { return err } enumTypeValue := Type(value) for _, existing := range []Type{"datacenter", "server", "volume", "nic", "loadbalancer", "location", "firewall-rule", "flow-log", "image", "snapshot", "lan", "ipblock", "pcc", "contract", "user", "group", "collection", "resource", "request", "request-status", "s3key", "backupunit", "label", "k8s", "nodepool", "template", "networkloadbalancer", "forwarding-rule", "natgateway", "natgateway-rule", "node", "applicationloadbalancer", "target-group"} { if existing == enumTypeValue { *v = enumTypeValue return nil } } return fmt.Errorf("%+v is not a valid Type", value) } // Ptr returns reference to Type value func (v Type) Ptr() *Type { return &v } type NullableType struct { value *Type isSet bool } func (v NullableType) Get() *Type { return v.value } func (v *NullableType) Set(val *Type) { v.value = val v.isSet = true } func (v NullableType) IsSet() bool { return v.isSet } func (v *NullableType) Unset() { v.value = nil v.isSet = false } func NewNullableType(val *Type) *NullableType { return &NullableType{value: val, isSet: true} } func (v NullableType) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_user.go000066400000000000000000000160751465267054300223730ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // User struct for User type User struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *UserMetadata `json:"metadata,omitempty"` Properties *UserProperties `json:"properties"` Entities *UsersEntities `json:"entities,omitempty"` } // NewUser instantiates a new User object // This constructor will assign default values to properties that have it defined, // 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 NewUser(properties UserProperties) *User { this := User{} this.Properties = &properties return &this } // NewUserWithDefaults instantiates a new User object // This 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 NewUserWithDefaults() *User { this := User{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *User) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *User) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *User) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *User) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *User) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *User) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *User) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *User) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *User) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *User) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *User) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *User) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *User) GetMetadata() *UserMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *User) GetMetadataOk() (*UserMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *User) SetMetadata(v UserMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *User) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *User) GetProperties() *UserProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *User) GetPropertiesOk() (*UserProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *User) SetProperties(v UserProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *User) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } // GetEntities returns the Entities field value // If the value is explicit nil, nil is returned func (o *User) GetEntities() *UsersEntities { if o == nil { return nil } return o.Entities } // GetEntitiesOk returns a tuple with the Entities field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *User) GetEntitiesOk() (*UsersEntities, bool) { if o == nil { return nil, false } return o.Entities, true } // SetEntities sets field value func (o *User) SetEntities(v UsersEntities) { o.Entities = &v } // HasEntities returns a boolean if a field has been set. func (o *User) HasEntities() bool { if o != nil && o.Entities != nil { return true } return false } func (o User) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } if o.Entities != nil { toSerialize["entities"] = o.Entities } return json.Marshal(toSerialize) } type NullableUser struct { value *User isSet bool } func (v NullableUser) Get() *User { return v.value } func (v *NullableUser) Set(val *User) { v.value = val v.isSet = true } func (v NullableUser) IsSet() bool { return v.isSet } func (v *NullableUser) Unset() { v.value = nil v.isSet = false } func NewNullableUser(val *User) *NullableUser { return &NullableUser{value: val, isSet: true} } func (v NullableUser) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUser) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_user_metadata.go000066400000000000000000000124101465267054300242200ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" "time" ) // UserMetadata struct for UserMetadata type UserMetadata struct { // Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter. Etag *string `json:"etag,omitempty"` // The time the user was created. CreatedDate *IonosTime // The time of the last login by the user. LastLogin *IonosTime } // NewUserMetadata instantiates a new UserMetadata object // This constructor will assign default values to properties that have it defined, // 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 NewUserMetadata() *UserMetadata { this := UserMetadata{} return &this } // NewUserMetadataWithDefaults instantiates a new UserMetadata object // This 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 NewUserMetadataWithDefaults() *UserMetadata { this := UserMetadata{} return &this } // GetEtag returns the Etag field value // If the value is explicit nil, nil is returned func (o *UserMetadata) GetEtag() *string { if o == nil { return nil } return o.Etag } // GetEtagOk returns a tuple with the Etag field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserMetadata) GetEtagOk() (*string, bool) { if o == nil { return nil, false } return o.Etag, true } // SetEtag sets field value func (o *UserMetadata) SetEtag(v string) { o.Etag = &v } // HasEtag returns a boolean if a field has been set. func (o *UserMetadata) HasEtag() bool { if o != nil && o.Etag != nil { return true } return false } // GetCreatedDate returns the CreatedDate field value // If the value is explicit nil, nil is returned func (o *UserMetadata) GetCreatedDate() *time.Time { if o == nil { return nil } if o.CreatedDate == nil { return nil } return &o.CreatedDate.Time } // GetCreatedDateOk returns a tuple with the CreatedDate field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserMetadata) GetCreatedDateOk() (*time.Time, bool) { if o == nil { return nil, false } if o.CreatedDate == nil { return nil, false } return &o.CreatedDate.Time, true } // SetCreatedDate sets field value func (o *UserMetadata) SetCreatedDate(v time.Time) { o.CreatedDate = &IonosTime{v} } // HasCreatedDate returns a boolean if a field has been set. func (o *UserMetadata) HasCreatedDate() bool { if o != nil && o.CreatedDate != nil { return true } return false } // GetLastLogin returns the LastLogin field value // If the value is explicit nil, nil is returned func (o *UserMetadata) GetLastLogin() *time.Time { if o == nil { return nil } if o.LastLogin == nil { return nil } return &o.LastLogin.Time } // GetLastLoginOk returns a tuple with the LastLogin field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserMetadata) GetLastLoginOk() (*time.Time, bool) { if o == nil { return nil, false } if o.LastLogin == nil { return nil, false } return &o.LastLogin.Time, true } // SetLastLogin sets field value func (o *UserMetadata) SetLastLogin(v time.Time) { o.LastLogin = &IonosTime{v} } // HasLastLogin returns a boolean if a field has been set. func (o *UserMetadata) HasLastLogin() bool { if o != nil && o.LastLogin != nil { return true } return false } func (o UserMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Etag != nil { toSerialize["etag"] = o.Etag } if o.CreatedDate != nil { toSerialize["createdDate"] = o.CreatedDate } if o.LastLogin != nil { toSerialize["lastLogin"] = o.LastLogin } return json.Marshal(toSerialize) } type NullableUserMetadata struct { value *UserMetadata isSet bool } func (v NullableUserMetadata) Get() *UserMetadata { return v.value } func (v *NullableUserMetadata) Set(val *UserMetadata) { v.value = val v.isSet = true } func (v NullableUserMetadata) IsSet() bool { return v.isSet } func (v *NullableUserMetadata) Unset() { v.value = nil v.isSet = false } func NewNullableUserMetadata(val *UserMetadata) *NullableUserMetadata { return &NullableUserMetadata{value: val, isSet: true} } func (v NullableUserMetadata) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUserMetadata) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_user_post.go000066400000000000000000000060531465267054300234330ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // UserPost struct for UserPost type UserPost struct { Properties *UserPropertiesPost `json:"properties"` } // NewUserPost instantiates a new UserPost object // This constructor will assign default values to properties that have it defined, // 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 NewUserPost(properties UserPropertiesPost) *UserPost { this := UserPost{} this.Properties = &properties return &this } // NewUserPostWithDefaults instantiates a new UserPost object // This 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 NewUserPostWithDefaults() *UserPost { this := UserPost{} return &this } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *UserPost) GetProperties() *UserPropertiesPost { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPost) GetPropertiesOk() (*UserPropertiesPost, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *UserPost) SetProperties(v UserPropertiesPost) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *UserPost) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o UserPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableUserPost struct { value *UserPost isSet bool } func (v NullableUserPost) Get() *UserPost { return v.value } func (v *NullableUserPost) Set(val *UserPost) { v.value = val v.isSet = true } func (v NullableUserPost) IsSet() bool { return v.isSet } func (v *NullableUserPost) Unset() { v.value = nil v.isSet = false } func NewNullableUserPost(val *UserPost) *NullableUserPost { return &NullableUserPost{value: val, isSet: true} } func (v NullableUserPost) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUserPost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_user_properties.go000066400000000000000000000237311465267054300246440ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // UserProperties struct for UserProperties type UserProperties struct { // The first name of the user. Firstname *string `json:"firstname,omitempty"` // The last name of the user. Lastname *string `json:"lastname,omitempty"` // The email address of the user. Email *string `json:"email,omitempty"` // Indicates if the user has admin rights. Administrator *bool `json:"administrator,omitempty"` // Indicates if secure authentication should be forced on the user. ForceSecAuth *bool `json:"forceSecAuth,omitempty"` // Indicates if secure authentication is active for the user. SecAuthActive *bool `json:"secAuthActive,omitempty"` // Canonical (S3) ID of the user for a given identity. S3CanonicalUserId *string `json:"s3CanonicalUserId,omitempty"` // Indicates if the user is active. Active *bool `json:"active,omitempty"` } // NewUserProperties instantiates a new UserProperties object // This constructor will assign default values to properties that have it defined, // 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 NewUserProperties() *UserProperties { this := UserProperties{} return &this } // NewUserPropertiesWithDefaults instantiates a new UserProperties object // This 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 NewUserPropertiesWithDefaults() *UserProperties { this := UserProperties{} return &this } // GetFirstname returns the Firstname field value // If the value is explicit nil, nil is returned func (o *UserProperties) GetFirstname() *string { if o == nil { return nil } return o.Firstname } // GetFirstnameOk returns a tuple with the Firstname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserProperties) GetFirstnameOk() (*string, bool) { if o == nil { return nil, false } return o.Firstname, true } // SetFirstname sets field value func (o *UserProperties) SetFirstname(v string) { o.Firstname = &v } // HasFirstname returns a boolean if a field has been set. func (o *UserProperties) HasFirstname() bool { if o != nil && o.Firstname != nil { return true } return false } // GetLastname returns the Lastname field value // If the value is explicit nil, nil is returned func (o *UserProperties) GetLastname() *string { if o == nil { return nil } return o.Lastname } // GetLastnameOk returns a tuple with the Lastname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserProperties) GetLastnameOk() (*string, bool) { if o == nil { return nil, false } return o.Lastname, true } // SetLastname sets field value func (o *UserProperties) SetLastname(v string) { o.Lastname = &v } // HasLastname returns a boolean if a field has been set. func (o *UserProperties) HasLastname() bool { if o != nil && o.Lastname != nil { return true } return false } // GetEmail returns the Email field value // If the value is explicit nil, nil is returned func (o *UserProperties) GetEmail() *string { if o == nil { return nil } return o.Email } // GetEmailOk returns a tuple with the Email field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserProperties) GetEmailOk() (*string, bool) { if o == nil { return nil, false } return o.Email, true } // SetEmail sets field value func (o *UserProperties) SetEmail(v string) { o.Email = &v } // HasEmail returns a boolean if a field has been set. func (o *UserProperties) HasEmail() bool { if o != nil && o.Email != nil { return true } return false } // GetAdministrator returns the Administrator field value // If the value is explicit nil, nil is returned func (o *UserProperties) GetAdministrator() *bool { if o == nil { return nil } return o.Administrator } // GetAdministratorOk returns a tuple with the Administrator field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserProperties) GetAdministratorOk() (*bool, bool) { if o == nil { return nil, false } return o.Administrator, true } // SetAdministrator sets field value func (o *UserProperties) SetAdministrator(v bool) { o.Administrator = &v } // HasAdministrator returns a boolean if a field has been set. func (o *UserProperties) HasAdministrator() bool { if o != nil && o.Administrator != nil { return true } return false } // GetForceSecAuth returns the ForceSecAuth field value // If the value is explicit nil, nil is returned func (o *UserProperties) GetForceSecAuth() *bool { if o == nil { return nil } return o.ForceSecAuth } // GetForceSecAuthOk returns a tuple with the ForceSecAuth field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserProperties) GetForceSecAuthOk() (*bool, bool) { if o == nil { return nil, false } return o.ForceSecAuth, true } // SetForceSecAuth sets field value func (o *UserProperties) SetForceSecAuth(v bool) { o.ForceSecAuth = &v } // HasForceSecAuth returns a boolean if a field has been set. func (o *UserProperties) HasForceSecAuth() bool { if o != nil && o.ForceSecAuth != nil { return true } return false } // GetSecAuthActive returns the SecAuthActive field value // If the value is explicit nil, nil is returned func (o *UserProperties) GetSecAuthActive() *bool { if o == nil { return nil } return o.SecAuthActive } // GetSecAuthActiveOk returns a tuple with the SecAuthActive field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserProperties) GetSecAuthActiveOk() (*bool, bool) { if o == nil { return nil, false } return o.SecAuthActive, true } // SetSecAuthActive sets field value func (o *UserProperties) SetSecAuthActive(v bool) { o.SecAuthActive = &v } // HasSecAuthActive returns a boolean if a field has been set. func (o *UserProperties) HasSecAuthActive() bool { if o != nil && o.SecAuthActive != nil { return true } return false } // GetS3CanonicalUserId returns the S3CanonicalUserId field value // If the value is explicit nil, nil is returned func (o *UserProperties) GetS3CanonicalUserId() *string { if o == nil { return nil } return o.S3CanonicalUserId } // GetS3CanonicalUserIdOk returns a tuple with the S3CanonicalUserId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserProperties) GetS3CanonicalUserIdOk() (*string, bool) { if o == nil { return nil, false } return o.S3CanonicalUserId, true } // SetS3CanonicalUserId sets field value func (o *UserProperties) SetS3CanonicalUserId(v string) { o.S3CanonicalUserId = &v } // HasS3CanonicalUserId returns a boolean if a field has been set. func (o *UserProperties) HasS3CanonicalUserId() bool { if o != nil && o.S3CanonicalUserId != nil { return true } return false } // GetActive returns the Active field value // If the value is explicit nil, nil is returned func (o *UserProperties) GetActive() *bool { if o == nil { return nil } return o.Active } // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserProperties) GetActiveOk() (*bool, bool) { if o == nil { return nil, false } return o.Active, true } // SetActive sets field value func (o *UserProperties) SetActive(v bool) { o.Active = &v } // HasActive returns a boolean if a field has been set. func (o *UserProperties) HasActive() bool { if o != nil && o.Active != nil { return true } return false } func (o UserProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Firstname != nil { toSerialize["firstname"] = o.Firstname } if o.Lastname != nil { toSerialize["lastname"] = o.Lastname } if o.Email != nil { toSerialize["email"] = o.Email } if o.Administrator != nil { toSerialize["administrator"] = o.Administrator } if o.ForceSecAuth != nil { toSerialize["forceSecAuth"] = o.ForceSecAuth } if o.SecAuthActive != nil { toSerialize["secAuthActive"] = o.SecAuthActive } if o.S3CanonicalUserId != nil { toSerialize["s3CanonicalUserId"] = o.S3CanonicalUserId } if o.Active != nil { toSerialize["active"] = o.Active } return json.Marshal(toSerialize) } type NullableUserProperties struct { value *UserProperties isSet bool } func (v NullableUserProperties) Get() *UserProperties { return v.value } func (v *NullableUserProperties) Set(val *UserProperties) { v.value = val v.isSet = true } func (v NullableUserProperties) IsSet() bool { return v.isSet } func (v *NullableUserProperties) Unset() { v.value = nil v.isSet = false } func NewNullableUserProperties(val *UserProperties) *NullableUserProperties { return &NullableUserProperties{value: val, isSet: true} } func (v NullableUserProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUserProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_user_properties_post.go000066400000000000000000000237711465267054300257150ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // UserPropertiesPost struct for UserPropertiesPost type UserPropertiesPost struct { // The first name of the user. Firstname *string `json:"firstname,omitempty"` // The last name of the user. Lastname *string `json:"lastname,omitempty"` // The email address of the user. Email *string `json:"email,omitempty"` // Indicates if the user has admin rights. Administrator *bool `json:"administrator,omitempty"` // Indicates if secure authentication should be forced on the user. ForceSecAuth *bool `json:"forceSecAuth,omitempty"` // Indicates if secure authentication is active for the user. SecAuthActive *bool `json:"secAuthActive,omitempty"` // User password. Password *string `json:"password,omitempty"` // Indicates if the user is active. Active *bool `json:"active,omitempty"` } // NewUserPropertiesPost instantiates a new UserPropertiesPost object // This constructor will assign default values to properties that have it defined, // 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 NewUserPropertiesPost() *UserPropertiesPost { this := UserPropertiesPost{} return &this } // NewUserPropertiesPostWithDefaults instantiates a new UserPropertiesPost object // This 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 NewUserPropertiesPostWithDefaults() *UserPropertiesPost { this := UserPropertiesPost{} return &this } // GetFirstname returns the Firstname field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetFirstname() *string { if o == nil { return nil } return o.Firstname } // GetFirstnameOk returns a tuple with the Firstname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPost) GetFirstnameOk() (*string, bool) { if o == nil { return nil, false } return o.Firstname, true } // SetFirstname sets field value func (o *UserPropertiesPost) SetFirstname(v string) { o.Firstname = &v } // HasFirstname returns a boolean if a field has been set. func (o *UserPropertiesPost) HasFirstname() bool { if o != nil && o.Firstname != nil { return true } return false } // GetLastname returns the Lastname field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetLastname() *string { if o == nil { return nil } return o.Lastname } // GetLastnameOk returns a tuple with the Lastname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPost) GetLastnameOk() (*string, bool) { if o == nil { return nil, false } return o.Lastname, true } // SetLastname sets field value func (o *UserPropertiesPost) SetLastname(v string) { o.Lastname = &v } // HasLastname returns a boolean if a field has been set. func (o *UserPropertiesPost) HasLastname() bool { if o != nil && o.Lastname != nil { return true } return false } // GetEmail returns the Email field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetEmail() *string { if o == nil { return nil } return o.Email } // GetEmailOk returns a tuple with the Email field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPost) GetEmailOk() (*string, bool) { if o == nil { return nil, false } return o.Email, true } // SetEmail sets field value func (o *UserPropertiesPost) SetEmail(v string) { o.Email = &v } // HasEmail returns a boolean if a field has been set. func (o *UserPropertiesPost) HasEmail() bool { if o != nil && o.Email != nil { return true } return false } // GetAdministrator returns the Administrator field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetAdministrator() *bool { if o == nil { return nil } return o.Administrator } // GetAdministratorOk returns a tuple with the Administrator field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPost) GetAdministratorOk() (*bool, bool) { if o == nil { return nil, false } return o.Administrator, true } // SetAdministrator sets field value func (o *UserPropertiesPost) SetAdministrator(v bool) { o.Administrator = &v } // HasAdministrator returns a boolean if a field has been set. func (o *UserPropertiesPost) HasAdministrator() bool { if o != nil && o.Administrator != nil { return true } return false } // GetForceSecAuth returns the ForceSecAuth field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetForceSecAuth() *bool { if o == nil { return nil } return o.ForceSecAuth } // GetForceSecAuthOk returns a tuple with the ForceSecAuth field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPost) GetForceSecAuthOk() (*bool, bool) { if o == nil { return nil, false } return o.ForceSecAuth, true } // SetForceSecAuth sets field value func (o *UserPropertiesPost) SetForceSecAuth(v bool) { o.ForceSecAuth = &v } // HasForceSecAuth returns a boolean if a field has been set. func (o *UserPropertiesPost) HasForceSecAuth() bool { if o != nil && o.ForceSecAuth != nil { return true } return false } // GetSecAuthActive returns the SecAuthActive field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetSecAuthActive() *bool { if o == nil { return nil } return o.SecAuthActive } // GetSecAuthActiveOk returns a tuple with the SecAuthActive field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPost) GetSecAuthActiveOk() (*bool, bool) { if o == nil { return nil, false } return o.SecAuthActive, true } // SetSecAuthActive sets field value func (o *UserPropertiesPost) SetSecAuthActive(v bool) { o.SecAuthActive = &v } // HasSecAuthActive returns a boolean if a field has been set. func (o *UserPropertiesPost) HasSecAuthActive() bool { if o != nil && o.SecAuthActive != nil { return true } return false } // GetPassword returns the Password field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetPassword() *string { if o == nil { return nil } return o.Password } // GetPasswordOk returns a tuple with the Password field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPost) GetPasswordOk() (*string, bool) { if o == nil { return nil, false } return o.Password, true } // SetPassword sets field value func (o *UserPropertiesPost) SetPassword(v string) { o.Password = &v } // HasPassword returns a boolean if a field has been set. func (o *UserPropertiesPost) HasPassword() bool { if o != nil && o.Password != nil { return true } return false } // GetActive returns the Active field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPost) GetActive() *bool { if o == nil { return nil } return o.Active } // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPost) GetActiveOk() (*bool, bool) { if o == nil { return nil, false } return o.Active, true } // SetActive sets field value func (o *UserPropertiesPost) SetActive(v bool) { o.Active = &v } // HasActive returns a boolean if a field has been set. func (o *UserPropertiesPost) HasActive() bool { if o != nil && o.Active != nil { return true } return false } func (o UserPropertiesPost) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Firstname != nil { toSerialize["firstname"] = o.Firstname } if o.Lastname != nil { toSerialize["lastname"] = o.Lastname } if o.Email != nil { toSerialize["email"] = o.Email } if o.Administrator != nil { toSerialize["administrator"] = o.Administrator } if o.ForceSecAuth != nil { toSerialize["forceSecAuth"] = o.ForceSecAuth } if o.SecAuthActive != nil { toSerialize["secAuthActive"] = o.SecAuthActive } if o.Password != nil { toSerialize["password"] = o.Password } if o.Active != nil { toSerialize["active"] = o.Active } return json.Marshal(toSerialize) } type NullableUserPropertiesPost struct { value *UserPropertiesPost isSet bool } func (v NullableUserPropertiesPost) Get() *UserPropertiesPost { return v.value } func (v *NullableUserPropertiesPost) Set(val *UserPropertiesPost) { v.value = val v.isSet = true } func (v NullableUserPropertiesPost) IsSet() bool { return v.isSet } func (v *NullableUserPropertiesPost) Unset() { v.value = nil v.isSet = false } func NewNullableUserPropertiesPost(val *UserPropertiesPost) *NullableUserPropertiesPost { return &NullableUserPropertiesPost{value: val, isSet: true} } func (v NullableUserPropertiesPost) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUserPropertiesPost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_user_properties_put.go000066400000000000000000000237031465267054300255330ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // UserPropertiesPut struct for UserPropertiesPut type UserPropertiesPut struct { // The first name of the user. Firstname *string `json:"firstname,omitempty"` // The last name of the user. Lastname *string `json:"lastname,omitempty"` // The email address of the user. Email *string `json:"email,omitempty"` // password of the user Password *string `json:"password,omitempty"` // Indicates if the user has admin rights. Administrator *bool `json:"administrator,omitempty"` // Indicates if secure authentication should be forced on the user. ForceSecAuth *bool `json:"forceSecAuth,omitempty"` // Indicates if secure authentication is active for the user. SecAuthActive *bool `json:"secAuthActive,omitempty"` // Indicates if the user is active. Active *bool `json:"active,omitempty"` } // NewUserPropertiesPut instantiates a new UserPropertiesPut object // This constructor will assign default values to properties that have it defined, // 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 NewUserPropertiesPut() *UserPropertiesPut { this := UserPropertiesPut{} return &this } // NewUserPropertiesPutWithDefaults instantiates a new UserPropertiesPut object // This 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 NewUserPropertiesPutWithDefaults() *UserPropertiesPut { this := UserPropertiesPut{} return &this } // GetFirstname returns the Firstname field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPut) GetFirstname() *string { if o == nil { return nil } return o.Firstname } // GetFirstnameOk returns a tuple with the Firstname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPut) GetFirstnameOk() (*string, bool) { if o == nil { return nil, false } return o.Firstname, true } // SetFirstname sets field value func (o *UserPropertiesPut) SetFirstname(v string) { o.Firstname = &v } // HasFirstname returns a boolean if a field has been set. func (o *UserPropertiesPut) HasFirstname() bool { if o != nil && o.Firstname != nil { return true } return false } // GetLastname returns the Lastname field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPut) GetLastname() *string { if o == nil { return nil } return o.Lastname } // GetLastnameOk returns a tuple with the Lastname field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPut) GetLastnameOk() (*string, bool) { if o == nil { return nil, false } return o.Lastname, true } // SetLastname sets field value func (o *UserPropertiesPut) SetLastname(v string) { o.Lastname = &v } // HasLastname returns a boolean if a field has been set. func (o *UserPropertiesPut) HasLastname() bool { if o != nil && o.Lastname != nil { return true } return false } // GetEmail returns the Email field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPut) GetEmail() *string { if o == nil { return nil } return o.Email } // GetEmailOk returns a tuple with the Email field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPut) GetEmailOk() (*string, bool) { if o == nil { return nil, false } return o.Email, true } // SetEmail sets field value func (o *UserPropertiesPut) SetEmail(v string) { o.Email = &v } // HasEmail returns a boolean if a field has been set. func (o *UserPropertiesPut) HasEmail() bool { if o != nil && o.Email != nil { return true } return false } // GetPassword returns the Password field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPut) GetPassword() *string { if o == nil { return nil } return o.Password } // GetPasswordOk returns a tuple with the Password field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPut) GetPasswordOk() (*string, bool) { if o == nil { return nil, false } return o.Password, true } // SetPassword sets field value func (o *UserPropertiesPut) SetPassword(v string) { o.Password = &v } // HasPassword returns a boolean if a field has been set. func (o *UserPropertiesPut) HasPassword() bool { if o != nil && o.Password != nil { return true } return false } // GetAdministrator returns the Administrator field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPut) GetAdministrator() *bool { if o == nil { return nil } return o.Administrator } // GetAdministratorOk returns a tuple with the Administrator field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPut) GetAdministratorOk() (*bool, bool) { if o == nil { return nil, false } return o.Administrator, true } // SetAdministrator sets field value func (o *UserPropertiesPut) SetAdministrator(v bool) { o.Administrator = &v } // HasAdministrator returns a boolean if a field has been set. func (o *UserPropertiesPut) HasAdministrator() bool { if o != nil && o.Administrator != nil { return true } return false } // GetForceSecAuth returns the ForceSecAuth field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPut) GetForceSecAuth() *bool { if o == nil { return nil } return o.ForceSecAuth } // GetForceSecAuthOk returns a tuple with the ForceSecAuth field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPut) GetForceSecAuthOk() (*bool, bool) { if o == nil { return nil, false } return o.ForceSecAuth, true } // SetForceSecAuth sets field value func (o *UserPropertiesPut) SetForceSecAuth(v bool) { o.ForceSecAuth = &v } // HasForceSecAuth returns a boolean if a field has been set. func (o *UserPropertiesPut) HasForceSecAuth() bool { if o != nil && o.ForceSecAuth != nil { return true } return false } // GetSecAuthActive returns the SecAuthActive field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPut) GetSecAuthActive() *bool { if o == nil { return nil } return o.SecAuthActive } // GetSecAuthActiveOk returns a tuple with the SecAuthActive field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPut) GetSecAuthActiveOk() (*bool, bool) { if o == nil { return nil, false } return o.SecAuthActive, true } // SetSecAuthActive sets field value func (o *UserPropertiesPut) SetSecAuthActive(v bool) { o.SecAuthActive = &v } // HasSecAuthActive returns a boolean if a field has been set. func (o *UserPropertiesPut) HasSecAuthActive() bool { if o != nil && o.SecAuthActive != nil { return true } return false } // GetActive returns the Active field value // If the value is explicit nil, nil is returned func (o *UserPropertiesPut) GetActive() *bool { if o == nil { return nil } return o.Active } // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPropertiesPut) GetActiveOk() (*bool, bool) { if o == nil { return nil, false } return o.Active, true } // SetActive sets field value func (o *UserPropertiesPut) SetActive(v bool) { o.Active = &v } // HasActive returns a boolean if a field has been set. func (o *UserPropertiesPut) HasActive() bool { if o != nil && o.Active != nil { return true } return false } func (o UserPropertiesPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Firstname != nil { toSerialize["firstname"] = o.Firstname } if o.Lastname != nil { toSerialize["lastname"] = o.Lastname } if o.Email != nil { toSerialize["email"] = o.Email } if o.Password != nil { toSerialize["password"] = o.Password } if o.Administrator != nil { toSerialize["administrator"] = o.Administrator } if o.ForceSecAuth != nil { toSerialize["forceSecAuth"] = o.ForceSecAuth } if o.SecAuthActive != nil { toSerialize["secAuthActive"] = o.SecAuthActive } if o.Active != nil { toSerialize["active"] = o.Active } return json.Marshal(toSerialize) } type NullableUserPropertiesPut struct { value *UserPropertiesPut isSet bool } func (v NullableUserPropertiesPut) Get() *UserPropertiesPut { return v.value } func (v *NullableUserPropertiesPut) Set(val *UserPropertiesPut) { v.value = val v.isSet = true } func (v NullableUserPropertiesPut) IsSet() bool { return v.isSet } func (v *NullableUserPropertiesPut) Unset() { v.value = nil v.isSet = false } func NewNullableUserPropertiesPut(val *UserPropertiesPut) *NullableUserPropertiesPut { return &NullableUserPropertiesPut{value: val, isSet: true} } func (v NullableUserPropertiesPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUserPropertiesPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_user_put.go000066400000000000000000000074721465267054300232640ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // UserPut struct for UserPut type UserPut struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` Properties *UserPropertiesPut `json:"properties"` } // NewUserPut instantiates a new UserPut object // This constructor will assign default values to properties that have it defined, // 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 NewUserPut(properties UserPropertiesPut) *UserPut { this := UserPut{} this.Properties = &properties return &this } // NewUserPutWithDefaults instantiates a new UserPut object // This 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 NewUserPutWithDefaults() *UserPut { this := UserPut{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *UserPut) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPut) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *UserPut) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *UserPut) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *UserPut) GetProperties() *UserPropertiesPut { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UserPut) GetPropertiesOk() (*UserPropertiesPut, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *UserPut) SetProperties(v UserPropertiesPut) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *UserPut) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o UserPut) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableUserPut struct { value *UserPut isSet bool } func (v NullableUserPut) Get() *UserPut { return v.value } func (v *NullableUserPut) Set(val *UserPut) { v.value = val v.isSet = true } func (v NullableUserPut) IsSet() bool { return v.isSet } func (v *NullableUserPut) Unset() { v.value = nil v.isSet = false } func NewNullableUserPut(val *UserPut) *NullableUserPut { return &NullableUserPut{value: val, isSet: true} } func (v NullableUserPut) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUserPut) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_users.go000066400000000000000000000173761465267054300225630ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Users struct for Users type Users struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]User `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewUsers instantiates a new Users object // This constructor will assign default values to properties that have it defined, // 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 NewUsers() *Users { this := Users{} return &this } // NewUsersWithDefaults instantiates a new Users object // This 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 NewUsersWithDefaults() *Users { this := Users{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Users) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Users) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Users) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Users) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Users) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Users) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Users) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Users) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Users) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Users) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Users) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Users) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Users) GetItems() *[]User { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Users) GetItemsOk() (*[]User, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Users) SetItems(v []User) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Users) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *Users) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Users) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *Users) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *Users) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *Users) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Users) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *Users) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *Users) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *Users) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Users) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *Users) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *Users) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o Users) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableUsers struct { value *Users isSet bool } func (v NullableUsers) Get() *Users { return v.value } func (v *NullableUsers) Set(val *Users) { v.value = val v.isSet = true } func (v NullableUsers) IsSet() bool { return v.isSet } func (v *NullableUsers) Unset() { v.value = nil v.isSet = false } func NewNullableUsers(val *Users) *NullableUsers { return &NullableUsers{value: val, isSet: true} } func (v NullableUsers) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUsers) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_users_entities.go000066400000000000000000000076131465267054300244600ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // UsersEntities struct for UsersEntities type UsersEntities struct { Owns *ResourcesUsers `json:"owns,omitempty"` Groups *GroupUsers `json:"groups,omitempty"` } // NewUsersEntities instantiates a new UsersEntities object // This constructor will assign default values to properties that have it defined, // 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 NewUsersEntities() *UsersEntities { this := UsersEntities{} return &this } // NewUsersEntitiesWithDefaults instantiates a new UsersEntities object // This 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 NewUsersEntitiesWithDefaults() *UsersEntities { this := UsersEntities{} return &this } // GetOwns returns the Owns field value // If the value is explicit nil, nil is returned func (o *UsersEntities) GetOwns() *ResourcesUsers { if o == nil { return nil } return o.Owns } // GetOwnsOk returns a tuple with the Owns field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UsersEntities) GetOwnsOk() (*ResourcesUsers, bool) { if o == nil { return nil, false } return o.Owns, true } // SetOwns sets field value func (o *UsersEntities) SetOwns(v ResourcesUsers) { o.Owns = &v } // HasOwns returns a boolean if a field has been set. func (o *UsersEntities) HasOwns() bool { if o != nil && o.Owns != nil { return true } return false } // GetGroups returns the Groups field value // If the value is explicit nil, nil is returned func (o *UsersEntities) GetGroups() *GroupUsers { if o == nil { return nil } return o.Groups } // GetGroupsOk returns a tuple with the Groups field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UsersEntities) GetGroupsOk() (*GroupUsers, bool) { if o == nil { return nil, false } return o.Groups, true } // SetGroups sets field value func (o *UsersEntities) SetGroups(v GroupUsers) { o.Groups = &v } // HasGroups returns a boolean if a field has been set. func (o *UsersEntities) HasGroups() bool { if o != nil && o.Groups != nil { return true } return false } func (o UsersEntities) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Owns != nil { toSerialize["owns"] = o.Owns } if o.Groups != nil { toSerialize["groups"] = o.Groups } return json.Marshal(toSerialize) } type NullableUsersEntities struct { value *UsersEntities isSet bool } func (v NullableUsersEntities) Get() *UsersEntities { return v.value } func (v *NullableUsersEntities) Set(val *UsersEntities) { v.value = val v.isSet = true } func (v NullableUsersEntities) IsSet() bool { return v.isSet } func (v *NullableUsersEntities) Unset() { v.value = nil v.isSet = false } func NewNullableUsersEntities(val *UsersEntities) *NullableUsersEntities { return &NullableUsersEntities{value: val, isSet: true} } func (v NullableUsersEntities) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUsersEntities) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_volume.go000066400000000000000000000145611465267054300227220ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Volume struct for Volume type Volume struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // The URL to the object representation (absolute path). Href *string `json:"href,omitempty"` Metadata *DatacenterElementMetadata `json:"metadata,omitempty"` Properties *VolumeProperties `json:"properties"` } // NewVolume instantiates a new Volume object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewVolume(properties VolumeProperties) *Volume { this := Volume{} this.Properties = &properties return &this } // NewVolumeWithDefaults instantiates a new Volume object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewVolumeWithDefaults() *Volume { this := Volume{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Volume) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volume) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Volume) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Volume) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Volume) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volume) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Volume) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Volume) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Volume) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volume) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Volume) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Volume) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetMetadata returns the Metadata field value // If the value is explicit nil, nil is returned func (o *Volume) GetMetadata() *DatacenterElementMetadata { if o == nil { return nil } return o.Metadata } // GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volume) GetMetadataOk() (*DatacenterElementMetadata, bool) { if o == nil { return nil, false } return o.Metadata, true } // SetMetadata sets field value func (o *Volume) SetMetadata(v DatacenterElementMetadata) { o.Metadata = &v } // HasMetadata returns a boolean if a field has been set. func (o *Volume) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // GetProperties returns the Properties field value // If the value is explicit nil, nil is returned func (o *Volume) GetProperties() *VolumeProperties { if o == nil { return nil } return o.Properties } // GetPropertiesOk returns a tuple with the Properties field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volume) GetPropertiesOk() (*VolumeProperties, bool) { if o == nil { return nil, false } return o.Properties, true } // SetProperties sets field value func (o *Volume) SetProperties(v VolumeProperties) { o.Properties = &v } // HasProperties returns a boolean if a field has been set. func (o *Volume) HasProperties() bool { if o != nil && o.Properties != nil { return true } return false } func (o Volume) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Properties != nil { toSerialize["properties"] = o.Properties } return json.Marshal(toSerialize) } type NullableVolume struct { value *Volume isSet bool } func (v NullableVolume) Get() *Volume { return v.value } func (v *NullableVolume) Set(val *Volume) { v.value = val v.isSet = true } func (v NullableVolume) IsSet() bool { return v.isSet } func (v *NullableVolume) Unset() { v.value = nil v.isSet = false } func NewNullableVolume(val *Volume) *NullableVolume { return &NullableVolume{value: val, isSet: true} } func (v NullableVolume) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableVolume) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_volume_properties.go000066400000000000000000000657561465267054300252120ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // VolumeProperties struct for VolumeProperties type VolumeProperties struct { // The name of the resource. Name *string `json:"name,omitempty"` // Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server. Type *string `json:"type,omitempty"` // The size of the volume in GB. Size *float32 `json:"size"` // The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD. AvailabilityZone *string `json:"availabilityZone,omitempty"` // Image or snapshot ID to be used as template for this volume. Image *string `json:"image,omitempty"` // Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9. ImagePassword *string `json:"imagePassword,omitempty"` ImageAlias *string `json:"imageAlias,omitempty"` // Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation. SshKeys *[]string `json:"sshKeys,omitempty"` // The bus type for this volume; default is VIRTIO. Bus *string `json:"bus,omitempty"` // OS type for this volume. LicenceType *string `json:"licenceType,omitempty"` // Hot-plug capable CPU (no reboot required). CpuHotPlug *bool `json:"cpuHotPlug,omitempty"` // Hot-plug capable RAM (no reboot required). RamHotPlug *bool `json:"ramHotPlug,omitempty"` // Hot-plug capable NIC (no reboot required). NicHotPlug *bool `json:"nicHotPlug,omitempty"` // Hot-unplug capable NIC (no reboot required). NicHotUnplug *bool `json:"nicHotUnplug,omitempty"` // Hot-plug capable Virt-IO drive (no reboot required). DiscVirtioHotPlug *bool `json:"discVirtioHotPlug,omitempty"` // Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs. DiscVirtioHotUnplug *bool `json:"discVirtioHotUnplug,omitempty"` // If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial can influence licensed software (e.g. Windows) behavior ExposeSerial *bool `json:"exposeSerial,omitempty"` // The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM. DeviceNumber *int64 `json:"deviceNumber,omitempty"` // The PCI slot number of the storage volume. Null for volumes, not mounted to a VM. PciSlot *int32 `json:"pciSlot,omitempty"` // The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property. BackupunitId *string `json:"backupunitId,omitempty"` // The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property. UserData *string `json:"userData,omitempty"` // The UUID of the attached server. BootServer *string `json:"bootServer,omitempty"` // Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices. // to set this field to `nil` in order to be marshalled, the explicit nil address `Nilstring` can be used, or the setter `SetBootOrderNil` BootOrder *string `json:"bootOrder,omitempty"` } // NewVolumeProperties instantiates a new VolumeProperties object // This constructor will assign default values to properties that have it defined, // 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 NewVolumeProperties(size float32) *VolumeProperties { this := VolumeProperties{} this.Size = &size var exposeSerial bool = false this.ExposeSerial = &exposeSerial var bootOrder = "AUTO" this.BootOrder = &bootOrder return &this } // NewVolumePropertiesWithDefaults instantiates a new VolumeProperties object // This 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 NewVolumePropertiesWithDefaults() *VolumeProperties { this := VolumeProperties{} var exposeSerial bool = false this.ExposeSerial = &exposeSerial var bootOrder = "AUTO" this.BootOrder = &bootOrder return &this } // GetName returns the Name field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetName() *string { if o == nil { return nil } return o.Name } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetNameOk() (*string, bool) { if o == nil { return nil, false } return o.Name, true } // SetName sets field value func (o *VolumeProperties) SetName(v string) { o.Name = &v } // HasName returns a boolean if a field has been set. func (o *VolumeProperties) HasName() bool { if o != nil && o.Name != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetType() *string { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetTypeOk() (*string, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *VolumeProperties) SetType(v string) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *VolumeProperties) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetSize returns the Size field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetSize() *float32 { if o == nil { return nil } return o.Size } // GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetSizeOk() (*float32, bool) { if o == nil { return nil, false } return o.Size, true } // SetSize sets field value func (o *VolumeProperties) SetSize(v float32) { o.Size = &v } // HasSize returns a boolean if a field has been set. func (o *VolumeProperties) HasSize() bool { if o != nil && o.Size != nil { return true } return false } // GetAvailabilityZone returns the AvailabilityZone field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetAvailabilityZone() *string { if o == nil { return nil } return o.AvailabilityZone } // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetAvailabilityZoneOk() (*string, bool) { if o == nil { return nil, false } return o.AvailabilityZone, true } // SetAvailabilityZone sets field value func (o *VolumeProperties) SetAvailabilityZone(v string) { o.AvailabilityZone = &v } // HasAvailabilityZone returns a boolean if a field has been set. func (o *VolumeProperties) HasAvailabilityZone() bool { if o != nil && o.AvailabilityZone != nil { return true } return false } // GetImage returns the Image field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetImage() *string { if o == nil { return nil } return o.Image } // GetImageOk returns a tuple with the Image field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetImageOk() (*string, bool) { if o == nil { return nil, false } return o.Image, true } // SetImage sets field value func (o *VolumeProperties) SetImage(v string) { o.Image = &v } // HasImage returns a boolean if a field has been set. func (o *VolumeProperties) HasImage() bool { if o != nil && o.Image != nil { return true } return false } // GetImagePassword returns the ImagePassword field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetImagePassword() *string { if o == nil { return nil } return o.ImagePassword } // GetImagePasswordOk returns a tuple with the ImagePassword field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetImagePasswordOk() (*string, bool) { if o == nil { return nil, false } return o.ImagePassword, true } // SetImagePassword sets field value func (o *VolumeProperties) SetImagePassword(v string) { o.ImagePassword = &v } // HasImagePassword returns a boolean if a field has been set. func (o *VolumeProperties) HasImagePassword() bool { if o != nil && o.ImagePassword != nil { return true } return false } // GetImageAlias returns the ImageAlias field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetImageAlias() *string { if o == nil { return nil } return o.ImageAlias } // GetImageAliasOk returns a tuple with the ImageAlias field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetImageAliasOk() (*string, bool) { if o == nil { return nil, false } return o.ImageAlias, true } // SetImageAlias sets field value func (o *VolumeProperties) SetImageAlias(v string) { o.ImageAlias = &v } // HasImageAlias returns a boolean if a field has been set. func (o *VolumeProperties) HasImageAlias() bool { if o != nil && o.ImageAlias != nil { return true } return false } // GetSshKeys returns the SshKeys field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetSshKeys() *[]string { if o == nil { return nil } return o.SshKeys } // GetSshKeysOk returns a tuple with the SshKeys field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetSshKeysOk() (*[]string, bool) { if o == nil { return nil, false } return o.SshKeys, true } // SetSshKeys sets field value func (o *VolumeProperties) SetSshKeys(v []string) { o.SshKeys = &v } // HasSshKeys returns a boolean if a field has been set. func (o *VolumeProperties) HasSshKeys() bool { if o != nil && o.SshKeys != nil { return true } return false } // GetBus returns the Bus field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetBus() *string { if o == nil { return nil } return o.Bus } // GetBusOk returns a tuple with the Bus field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetBusOk() (*string, bool) { if o == nil { return nil, false } return o.Bus, true } // SetBus sets field value func (o *VolumeProperties) SetBus(v string) { o.Bus = &v } // HasBus returns a boolean if a field has been set. func (o *VolumeProperties) HasBus() bool { if o != nil && o.Bus != nil { return true } return false } // GetLicenceType returns the LicenceType field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetLicenceType() *string { if o == nil { return nil } return o.LicenceType } // GetLicenceTypeOk returns a tuple with the LicenceType field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetLicenceTypeOk() (*string, bool) { if o == nil { return nil, false } return o.LicenceType, true } // SetLicenceType sets field value func (o *VolumeProperties) SetLicenceType(v string) { o.LicenceType = &v } // HasLicenceType returns a boolean if a field has been set. func (o *VolumeProperties) HasLicenceType() bool { if o != nil && o.LicenceType != nil { return true } return false } // GetCpuHotPlug returns the CpuHotPlug field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetCpuHotPlug() *bool { if o == nil { return nil } return o.CpuHotPlug } // GetCpuHotPlugOk returns a tuple with the CpuHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetCpuHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.CpuHotPlug, true } // SetCpuHotPlug sets field value func (o *VolumeProperties) SetCpuHotPlug(v bool) { o.CpuHotPlug = &v } // HasCpuHotPlug returns a boolean if a field has been set. func (o *VolumeProperties) HasCpuHotPlug() bool { if o != nil && o.CpuHotPlug != nil { return true } return false } // GetRamHotPlug returns the RamHotPlug field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetRamHotPlug() *bool { if o == nil { return nil } return o.RamHotPlug } // GetRamHotPlugOk returns a tuple with the RamHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetRamHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.RamHotPlug, true } // SetRamHotPlug sets field value func (o *VolumeProperties) SetRamHotPlug(v bool) { o.RamHotPlug = &v } // HasRamHotPlug returns a boolean if a field has been set. func (o *VolumeProperties) HasRamHotPlug() bool { if o != nil && o.RamHotPlug != nil { return true } return false } // GetNicHotPlug returns the NicHotPlug field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetNicHotPlug() *bool { if o == nil { return nil } return o.NicHotPlug } // GetNicHotPlugOk returns a tuple with the NicHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetNicHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.NicHotPlug, true } // SetNicHotPlug sets field value func (o *VolumeProperties) SetNicHotPlug(v bool) { o.NicHotPlug = &v } // HasNicHotPlug returns a boolean if a field has been set. func (o *VolumeProperties) HasNicHotPlug() bool { if o != nil && o.NicHotPlug != nil { return true } return false } // GetNicHotUnplug returns the NicHotUnplug field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetNicHotUnplug() *bool { if o == nil { return nil } return o.NicHotUnplug } // GetNicHotUnplugOk returns a tuple with the NicHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetNicHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.NicHotUnplug, true } // SetNicHotUnplug sets field value func (o *VolumeProperties) SetNicHotUnplug(v bool) { o.NicHotUnplug = &v } // HasNicHotUnplug returns a boolean if a field has been set. func (o *VolumeProperties) HasNicHotUnplug() bool { if o != nil && o.NicHotUnplug != nil { return true } return false } // GetDiscVirtioHotPlug returns the DiscVirtioHotPlug field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetDiscVirtioHotPlug() *bool { if o == nil { return nil } return o.DiscVirtioHotPlug } // GetDiscVirtioHotPlugOk returns a tuple with the DiscVirtioHotPlug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetDiscVirtioHotPlugOk() (*bool, bool) { if o == nil { return nil, false } return o.DiscVirtioHotPlug, true } // SetDiscVirtioHotPlug sets field value func (o *VolumeProperties) SetDiscVirtioHotPlug(v bool) { o.DiscVirtioHotPlug = &v } // HasDiscVirtioHotPlug returns a boolean if a field has been set. func (o *VolumeProperties) HasDiscVirtioHotPlug() bool { if o != nil && o.DiscVirtioHotPlug != nil { return true } return false } // GetDiscVirtioHotUnplug returns the DiscVirtioHotUnplug field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetDiscVirtioHotUnplug() *bool { if o == nil { return nil } return o.DiscVirtioHotUnplug } // GetDiscVirtioHotUnplugOk returns a tuple with the DiscVirtioHotUnplug field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetDiscVirtioHotUnplugOk() (*bool, bool) { if o == nil { return nil, false } return o.DiscVirtioHotUnplug, true } // SetDiscVirtioHotUnplug sets field value func (o *VolumeProperties) SetDiscVirtioHotUnplug(v bool) { o.DiscVirtioHotUnplug = &v } // HasDiscVirtioHotUnplug returns a boolean if a field has been set. func (o *VolumeProperties) HasDiscVirtioHotUnplug() bool { if o != nil && o.DiscVirtioHotUnplug != nil { return true } return false } // GetExposeSerial returns the ExposeSerial field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetExposeSerial() *bool { if o == nil { return nil } return o.ExposeSerial } // GetExposeSerialOk returns a tuple with the ExposeSerial field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetExposeSerialOk() (*bool, bool) { if o == nil { return nil, false } return o.ExposeSerial, true } // SetExposeSerial sets field value func (o *VolumeProperties) SetExposeSerial(v bool) { o.ExposeSerial = &v } // HasExposeSerial returns a boolean if a field has been set. func (o *VolumeProperties) HasExposeSerial() bool { if o != nil && o.ExposeSerial != nil { return true } return false } // GetDeviceNumber returns the DeviceNumber field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetDeviceNumber() *int64 { if o == nil { return nil } return o.DeviceNumber } // GetDeviceNumberOk returns a tuple with the DeviceNumber field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetDeviceNumberOk() (*int64, bool) { if o == nil { return nil, false } return o.DeviceNumber, true } // SetDeviceNumber sets field value func (o *VolumeProperties) SetDeviceNumber(v int64) { o.DeviceNumber = &v } // HasDeviceNumber returns a boolean if a field has been set. func (o *VolumeProperties) HasDeviceNumber() bool { if o != nil && o.DeviceNumber != nil { return true } return false } // GetPciSlot returns the PciSlot field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetPciSlot() *int32 { if o == nil { return nil } return o.PciSlot } // GetPciSlotOk returns a tuple with the PciSlot field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetPciSlotOk() (*int32, bool) { if o == nil { return nil, false } return o.PciSlot, true } // SetPciSlot sets field value func (o *VolumeProperties) SetPciSlot(v int32) { o.PciSlot = &v } // HasPciSlot returns a boolean if a field has been set. func (o *VolumeProperties) HasPciSlot() bool { if o != nil && o.PciSlot != nil { return true } return false } // GetBackupunitId returns the BackupunitId field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetBackupunitId() *string { if o == nil { return nil } return o.BackupunitId } // GetBackupunitIdOk returns a tuple with the BackupunitId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetBackupunitIdOk() (*string, bool) { if o == nil { return nil, false } return o.BackupunitId, true } // SetBackupunitId sets field value func (o *VolumeProperties) SetBackupunitId(v string) { o.BackupunitId = &v } // HasBackupunitId returns a boolean if a field has been set. func (o *VolumeProperties) HasBackupunitId() bool { if o != nil && o.BackupunitId != nil { return true } return false } // GetUserData returns the UserData field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetUserData() *string { if o == nil { return nil } return o.UserData } // GetUserDataOk returns a tuple with the UserData field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetUserDataOk() (*string, bool) { if o == nil { return nil, false } return o.UserData, true } // SetUserData sets field value func (o *VolumeProperties) SetUserData(v string) { o.UserData = &v } // HasUserData returns a boolean if a field has been set. func (o *VolumeProperties) HasUserData() bool { if o != nil && o.UserData != nil { return true } return false } // GetBootServer returns the BootServer field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetBootServer() *string { if o == nil { return nil } return o.BootServer } // GetBootServerOk returns a tuple with the BootServer field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetBootServerOk() (*string, bool) { if o == nil { return nil, false } return o.BootServer, true } // SetBootServer sets field value func (o *VolumeProperties) SetBootServer(v string) { o.BootServer = &v } // HasBootServer returns a boolean if a field has been set. func (o *VolumeProperties) HasBootServer() bool { if o != nil && o.BootServer != nil { return true } return false } // GetBootOrder returns the BootOrder field value // If the value is explicit nil, nil is returned func (o *VolumeProperties) GetBootOrder() *string { if o == nil { return nil } return o.BootOrder } // GetBootOrderOk returns a tuple with the BootOrder field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *VolumeProperties) GetBootOrderOk() (*string, bool) { if o == nil { return nil, false } return o.BootOrder, true } // SetBootOrder sets field value func (o *VolumeProperties) SetBootOrder(v string) { o.BootOrder = &v } // sets BootOrder to the explicit address that will be encoded as nil when marshaled func (o *VolumeProperties) SetBootOrderNil() { o.BootOrder = &Nilstring } // HasBootOrder returns a boolean if a field has been set. func (o *VolumeProperties) HasBootOrder() bool { if o != nil && o.BootOrder != nil { return true } return false } func (o VolumeProperties) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Type != nil { toSerialize["type"] = o.Type } if o.Size != nil { toSerialize["size"] = o.Size } if o.AvailabilityZone != nil { toSerialize["availabilityZone"] = o.AvailabilityZone } if o.Image != nil { toSerialize["image"] = o.Image } if o.ImagePassword != nil { toSerialize["imagePassword"] = o.ImagePassword } if o.ImageAlias != nil { toSerialize["imageAlias"] = o.ImageAlias } if o.SshKeys != nil { toSerialize["sshKeys"] = o.SshKeys } if o.Bus != nil { toSerialize["bus"] = o.Bus } if o.LicenceType != nil { toSerialize["licenceType"] = o.LicenceType } if o.CpuHotPlug != nil { toSerialize["cpuHotPlug"] = o.CpuHotPlug } if o.RamHotPlug != nil { toSerialize["ramHotPlug"] = o.RamHotPlug } if o.NicHotPlug != nil { toSerialize["nicHotPlug"] = o.NicHotPlug } if o.NicHotUnplug != nil { toSerialize["nicHotUnplug"] = o.NicHotUnplug } if o.DiscVirtioHotPlug != nil { toSerialize["discVirtioHotPlug"] = o.DiscVirtioHotPlug } if o.DiscVirtioHotUnplug != nil { toSerialize["discVirtioHotUnplug"] = o.DiscVirtioHotUnplug } if o.ExposeSerial != nil { toSerialize["exposeSerial"] = o.ExposeSerial } if o.DeviceNumber != nil { toSerialize["deviceNumber"] = o.DeviceNumber } if o.PciSlot != nil { toSerialize["pciSlot"] = o.PciSlot } if o.BackupunitId != nil { toSerialize["backupunitId"] = o.BackupunitId } if o.UserData != nil { toSerialize["userData"] = o.UserData } if o.BootServer != nil { toSerialize["bootServer"] = o.BootServer } if o.BootOrder == &Nilstring { toSerialize["bootOrder"] = nil } else if o.BootOrder != nil { toSerialize["bootOrder"] = o.BootOrder } return json.Marshal(toSerialize) } type NullableVolumeProperties struct { value *VolumeProperties isSet bool } func (v NullableVolumeProperties) Get() *VolumeProperties { return v.value } func (v *NullableVolumeProperties) Set(val *VolumeProperties) { v.value = val v.isSet = true } func (v NullableVolumeProperties) IsSet() bool { return v.isSet } func (v *NullableVolumeProperties) Unset() { v.value = nil v.isSet = false } func NewNullableVolumeProperties(val *VolumeProperties) *NullableVolumeProperties { return &NullableVolumeProperties{value: val, isSet: true} } func (v NullableVolumeProperties) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableVolumeProperties) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/model_volumes.go000066400000000000000000000175661465267054300231150ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" ) // Volumes struct for Volumes type Volumes struct { // The resource's unique identifier. Id *string `json:"id,omitempty"` // The type of object that has been created. Type *Type `json:"type,omitempty"` // URL to the object representation (absolute path). Href *string `json:"href,omitempty"` // Array of items in the collection. Items *[]Volume `json:"items,omitempty"` // The offset (if specified in the request). Offset *float32 `json:"offset,omitempty"` // The limit (if specified in the request). Limit *float32 `json:"limit,omitempty"` Links *PaginationLinks `json:"_links,omitempty"` } // NewVolumes instantiates a new Volumes object // This constructor will assign default values to properties that have it defined, // 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 NewVolumes() *Volumes { this := Volumes{} return &this } // NewVolumesWithDefaults instantiates a new Volumes object // This 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 NewVolumesWithDefaults() *Volumes { this := Volumes{} return &this } // GetId returns the Id field value // If the value is explicit nil, nil is returned func (o *Volumes) GetId() *string { if o == nil { return nil } return o.Id } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volumes) GetIdOk() (*string, bool) { if o == nil { return nil, false } return o.Id, true } // SetId sets field value func (o *Volumes) SetId(v string) { o.Id = &v } // HasId returns a boolean if a field has been set. func (o *Volumes) HasId() bool { if o != nil && o.Id != nil { return true } return false } // GetType returns the Type field value // If the value is explicit nil, nil is returned func (o *Volumes) GetType() *Type { if o == nil { return nil } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volumes) GetTypeOk() (*Type, bool) { if o == nil { return nil, false } return o.Type, true } // SetType sets field value func (o *Volumes) SetType(v Type) { o.Type = &v } // HasType returns a boolean if a field has been set. func (o *Volumes) HasType() bool { if o != nil && o.Type != nil { return true } return false } // GetHref returns the Href field value // If the value is explicit nil, nil is returned func (o *Volumes) GetHref() *string { if o == nil { return nil } return o.Href } // GetHrefOk returns a tuple with the Href field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volumes) GetHrefOk() (*string, bool) { if o == nil { return nil, false } return o.Href, true } // SetHref sets field value func (o *Volumes) SetHref(v string) { o.Href = &v } // HasHref returns a boolean if a field has been set. func (o *Volumes) HasHref() bool { if o != nil && o.Href != nil { return true } return false } // GetItems returns the Items field value // If the value is explicit nil, nil is returned func (o *Volumes) GetItems() *[]Volume { if o == nil { return nil } return o.Items } // GetItemsOk returns a tuple with the Items field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volumes) GetItemsOk() (*[]Volume, bool) { if o == nil { return nil, false } return o.Items, true } // SetItems sets field value func (o *Volumes) SetItems(v []Volume) { o.Items = &v } // HasItems returns a boolean if a field has been set. func (o *Volumes) HasItems() bool { if o != nil && o.Items != nil { return true } return false } // GetOffset returns the Offset field value // If the value is explicit nil, nil is returned func (o *Volumes) GetOffset() *float32 { if o == nil { return nil } return o.Offset } // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volumes) GetOffsetOk() (*float32, bool) { if o == nil { return nil, false } return o.Offset, true } // SetOffset sets field value func (o *Volumes) SetOffset(v float32) { o.Offset = &v } // HasOffset returns a boolean if a field has been set. func (o *Volumes) HasOffset() bool { if o != nil && o.Offset != nil { return true } return false } // GetLimit returns the Limit field value // If the value is explicit nil, nil is returned func (o *Volumes) GetLimit() *float32 { if o == nil { return nil } return o.Limit } // GetLimitOk returns a tuple with the Limit field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volumes) GetLimitOk() (*float32, bool) { if o == nil { return nil, false } return o.Limit, true } // SetLimit sets field value func (o *Volumes) SetLimit(v float32) { o.Limit = &v } // HasLimit returns a boolean if a field has been set. func (o *Volumes) HasLimit() bool { if o != nil && o.Limit != nil { return true } return false } // GetLinks returns the Links field value // If the value is explicit nil, nil is returned func (o *Volumes) GetLinks() *PaginationLinks { if o == nil { return nil } return o.Links } // GetLinksOk returns a tuple with the Links field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *Volumes) GetLinksOk() (*PaginationLinks, bool) { if o == nil { return nil, false } return o.Links, true } // SetLinks sets field value func (o *Volumes) SetLinks(v PaginationLinks) { o.Links = &v } // HasLinks returns a boolean if a field has been set. func (o *Volumes) HasLinks() bool { if o != nil && o.Links != nil { return true } return false } func (o Volumes) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if o.Type != nil { toSerialize["type"] = o.Type } if o.Href != nil { toSerialize["href"] = o.Href } if o.Items != nil { toSerialize["items"] = o.Items } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } if o.Links != nil { toSerialize["_links"] = o.Links } return json.Marshal(toSerialize) } type NullableVolumes struct { value *Volumes isSet bool } func (v NullableVolumes) Get() *Volumes { return v.value } func (v *NullableVolumes) Set(val *Volumes) { v.value = val v.isSet = true } func (v NullableVolumes) IsSet() bool { return v.isSet } func (v *NullableVolumes) Unset() { v.value = nil v.isSet = false } func NewNullableVolumes(val *Volumes) *NullableVolumes { return &NullableVolumes{value: val, isSet: true} } func (v NullableVolumes) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableVolumes) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } golang-github-ionos-cloud-sdk-go-6.2.0/response.go000066400000000000000000000051621465267054300220660ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "log" "net/http" "time" ) // APIResponse stores the API response returned by the server. type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // RequestTime is the time duration from the moment the APIClient sends // the HTTP request to the moment it receives an HTTP response. RequestTime time.Duration `json:"duration,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` } // NewAPIResponse returns a new APIResonse object. func NewAPIResponse(r *http.Response) *APIResponse { response := &APIResponse{Response: r} return response } // NewAPIResponseWithError returns a new APIResponse object with the provided error message. func NewAPIResponseWithError(errorMessage string) *APIResponse { response := &APIResponse{Message: errorMessage} return response } // HttpNotFound - returns true if a 404 status code was returned // returns false for nil APIResponse values func (resp *APIResponse) HttpNotFound() bool { if resp != nil && resp.Response != nil && resp.StatusCode == http.StatusNotFound { return true } return false } // LogInfo - logs APIResponse values like RequestTime, Operation and StatusCode // does not print anything for nil APIResponse values func (resp *APIResponse) LogInfo() { if resp != nil { log.Printf("[DEBUG] Request time : %s for operation : %s", resp.RequestTime, resp.Operation) if resp.Response != nil { log.Printf("[DEBUG] response status code : %d\n", resp.StatusCode) } } } golang-github-ionos-cloud-sdk-go-6.2.0/sonar-project.properties000066400000000000000000000006001465267054300245750ustar00rootroot00000000000000sonar.projectKey=ionos-cloud_sdk-go sonar.organization=ionos-cloud # This is the name and version displayed in the SonarCloud UI. #sonar.projectName=sdk-go #sonar.projectVersion=1.0 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. #sonar.sources=. # Encoding of the source code. Default is default system encoding #sonar.sourceEncoding=UTF-8 golang-github-ionos-cloud-sdk-go-6.2.0/utils.go000066400000000000000000000412631465267054300213720ustar00rootroot00000000000000/* * CLOUD API * * IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on. * * API version: 6.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package ionoscloud import ( "encoding/json" "reflect" "strings" "time" ) var ( // used to set a nullable field to nil. This is a sentinel address that will be checked in the MarshalJson function. // if set to this address, a nil value will be marshalled Nilstring string = "<>" Nilint32 int32 = -334455 Nilbool bool = false ) // ToPtr - returns a pointer to the given value. func ToPtr[T any](v T) *T { return &v } // ToValue - returns the value of the pointer passed in func ToValue[T any](ptr *T) T { return *ptr } // ToValueDefault - returns the value of the pointer passed in, or the default type value if the pointer is nil func ToValueDefault[T any](ptr *T) T { var defaultVal T if ptr == nil { return defaultVal } return *ptr } func SliceToValueDefault[T any](ptrSlice *[]T) []T { return append([]T{}, *ptrSlice...) } // PtrBool - returns a pointer to given boolean value. func PtrBool(v bool) *bool { return &v } // PtrInt - returns a pointer to given integer value. func PtrInt(v int) *int { return &v } // PtrInt32 - returns a pointer to given integer value. func PtrInt32(v int32) *int32 { return &v } // PtrInt64 - returns a pointer to given integer value. func PtrInt64(v int64) *int64 { return &v } // PtrFloat32 - returns a pointer to given float value. func PtrFloat32(v float32) *float32 { return &v } // PtrFloat64 - returns a pointer to given float value. func PtrFloat64(v float64) *float64 { return &v } // PtrString - returns a pointer to given string value. func PtrString(v string) *string { return &v } // PtrTime - returns a pointer to given Time value. func PtrTime(v time.Time) *time.Time { return &v } // ToBool - returns the value of the bool pointer passed in func ToBool(ptr *bool) bool { return *ptr } // ToBoolDefault - returns the value of the bool pointer passed in, or false if the pointer is nil func ToBoolDefault(ptr *bool) bool { var defaultVal bool if ptr == nil { return defaultVal } return *ptr } // ToBoolSlice - returns a bool slice of the pointer passed in func ToBoolSlice(ptrSlice *[]bool) []bool { valSlice := make([]bool, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToByte - returns the value of the byte pointer passed in func ToByte(ptr *byte) byte { return *ptr } // ToByteDefault - returns the value of the byte pointer passed in, or 0 if the pointer is nil func ToByteDefault(ptr *byte) byte { var defaultVal byte if ptr == nil { return defaultVal } return *ptr } // ToByteSlice - returns a byte slice of the pointer passed in func ToByteSlice(ptrSlice *[]byte) []byte { valSlice := make([]byte, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToString - returns the value of the string pointer passed in func ToString(ptr *string) string { return *ptr } // ToStringDefault - returns the value of the string pointer passed in, or "" if the pointer is nil func ToStringDefault(ptr *string) string { var defaultVal string if ptr == nil { return defaultVal } return *ptr } // ToStringSlice - returns a string slice of the pointer passed in func ToStringSlice(ptrSlice *[]string) []string { valSlice := make([]string, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToInt - returns the value of the int pointer passed in func ToInt(ptr *int) int { return *ptr } // ToIntDefault - returns the value of the int pointer passed in, or 0 if the pointer is nil func ToIntDefault(ptr *int) int { var defaultVal int if ptr == nil { return defaultVal } return *ptr } // ToIntSlice - returns a int slice of the pointer passed in func ToIntSlice(ptrSlice *[]int) []int { valSlice := make([]int, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToInt8 - returns the value of the int8 pointer passed in func ToInt8(ptr *int8) int8 { return *ptr } // ToInt8Default - returns the value of the int8 pointer passed in, or 0 if the pointer is nil func ToInt8Default(ptr *int8) int8 { var defaultVal int8 if ptr == nil { return defaultVal } return *ptr } // ToInt8Slice - returns a int8 slice of the pointer passed in func ToInt8Slice(ptrSlice *[]int8) []int8 { valSlice := make([]int8, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToInt16 - returns the value of the int16 pointer passed in func ToInt16(ptr *int16) int16 { return *ptr } // ToInt16Default - returns the value of the int16 pointer passed in, or 0 if the pointer is nil func ToInt16Default(ptr *int16) int16 { var defaultVal int16 if ptr == nil { return defaultVal } return *ptr } // ToInt16Slice - returns a int16 slice of the pointer passed in func ToInt16Slice(ptrSlice *[]int16) []int16 { valSlice := make([]int16, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToInt32 - returns the value of the int32 pointer passed in func ToInt32(ptr *int32) int32 { return *ptr } // ToInt32Default - returns the value of the int32 pointer passed in, or 0 if the pointer is nil func ToInt32Default(ptr *int32) int32 { var defaultVal int32 if ptr == nil { return defaultVal } return *ptr } // ToInt32Slice - returns a int32 slice of the pointer passed in func ToInt32Slice(ptrSlice *[]int32) []int32 { valSlice := make([]int32, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToInt64 - returns the value of the int64 pointer passed in func ToInt64(ptr *int64) int64 { return *ptr } // ToInt64Default - returns the value of the int64 pointer passed in, or 0 if the pointer is nil func ToInt64Default(ptr *int64) int64 { var defaultVal int64 if ptr == nil { return defaultVal } return *ptr } // ToInt64Slice - returns a int64 slice of the pointer passed in func ToInt64Slice(ptrSlice *[]int64) []int64 { valSlice := make([]int64, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToUint - returns the value of the uint pointer passed in func ToUint(ptr *uint) uint { return *ptr } // ToUintDefault - returns the value of the uint pointer passed in, or 0 if the pointer is nil func ToUintDefault(ptr *uint) uint { var defaultVal uint if ptr == nil { return defaultVal } return *ptr } // ToUintSlice - returns a uint slice of the pointer passed in func ToUintSlice(ptrSlice *[]uint) []uint { valSlice := make([]uint, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToUint8 -returns the value of the uint8 pointer passed in func ToUint8(ptr *uint8) uint8 { return *ptr } // ToUint8Default - returns the value of the uint8 pointer passed in, or 0 if the pointer is nil func ToUint8Default(ptr *uint8) uint8 { var defaultVal uint8 if ptr == nil { return defaultVal } return *ptr } // ToUint8Slice - returns a uint8 slice of the pointer passed in func ToUint8Slice(ptrSlice *[]uint8) []uint8 { valSlice := make([]uint8, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToUint16 - returns the value of the uint16 pointer passed in func ToUint16(ptr *uint16) uint16 { return *ptr } // ToUint16Default - returns the value of the uint16 pointer passed in, or 0 if the pointer is nil func ToUint16Default(ptr *uint16) uint16 { var defaultVal uint16 if ptr == nil { return defaultVal } return *ptr } // ToUint16Slice - returns a uint16 slice of the pointer passed in func ToUint16Slice(ptrSlice *[]uint16) []uint16 { valSlice := make([]uint16, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToUint32 - returns the value of the uint32 pointer passed in func ToUint32(ptr *uint32) uint32 { return *ptr } // ToUint32Default - returns the value of the uint32 pointer passed in, or 0 if the pointer is nil func ToUint32Default(ptr *uint32) uint32 { var defaultVal uint32 if ptr == nil { return defaultVal } return *ptr } // ToUint32Slice - returns a uint32 slice of the pointer passed in func ToUint32Slice(ptrSlice *[]uint32) []uint32 { valSlice := make([]uint32, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToUint64 - returns the value of the uint64 pointer passed in func ToUint64(ptr *uint64) uint64 { return *ptr } // ToUint64Default - returns the value of the uint64 pointer passed in, or 0 if the pointer is nil func ToUint64Default(ptr *uint64) uint64 { var defaultVal uint64 if ptr == nil { return defaultVal } return *ptr } // ToUint64Slice - returns a uint63 slice of the pointer passed in func ToUint64Slice(ptrSlice *[]uint64) []uint64 { valSlice := make([]uint64, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToFloat32 - returns the value of the float32 pointer passed in func ToFloat32(ptr *float32) float32 { return *ptr } // ToFloat32Default - returns the value of the float32 pointer passed in, or 0 if the pointer is nil func ToFloat32Default(ptr *float32) float32 { var defaultVal float32 if ptr == nil { return defaultVal } return *ptr } // ToFloat32Slice - returns a float32 slice of the pointer passed in func ToFloat32Slice(ptrSlice *[]float32) []float32 { valSlice := make([]float32, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToFloat64 - returns the value of the float64 pointer passed in func ToFloat64(ptr *float64) float64 { return *ptr } // ToFloat64Default - returns the value of the float64 pointer passed in, or 0 if the pointer is nil func ToFloat64Default(ptr *float64) float64 { var defaultVal float64 if ptr == nil { return defaultVal } return *ptr } // ToFloat64Slice - returns a float64 slice of the pointer passed in func ToFloat64Slice(ptrSlice *[]float64) []float64 { valSlice := make([]float64, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } // ToTime - returns the value of the Time pointer passed in func ToTime(ptr *time.Time) time.Time { return *ptr } // ToTimeDefault - returns the value of the Time pointer passed in, or 0001-01-01 00:00:00 +0000 UTC if the pointer is nil func ToTimeDefault(ptr *time.Time) time.Time { var defaultVal time.Time if ptr == nil { return defaultVal } return *ptr } // ToTimeSlice - returns a Time slice of the pointer passed in func ToTimeSlice(ptrSlice *[]time.Time) []time.Time { valSlice := make([]time.Time, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice } 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) } type IonosTime struct { time.Time } func (t *IonosTime) UnmarshalJSON(data []byte) error { str := string(data) if strlen(str) == 0 { t = nil return nil } if str[0] == '"' { str = str[1:] } if str[len(str)-1] == '"' { str = str[:len(str)-1] } if !strings.Contains(str, "Z") { /* forcefully adding timezone suffix to be able to parse the * string using RFC3339 */ str += "Z" } tt, err := time.Parse(time.RFC3339, str) if err != nil { return err } *t = IonosTime{tt} return nil } // IsNil checks if an input is nil func IsNil(i interface{}) bool { if i == nil { return true } switch reflect.TypeOf(i).Kind() { case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: return reflect.ValueOf(i).IsNil() case reflect.Array: return reflect.ValueOf(i).IsZero() } return false }