feat: auto generated files and new structure (#4)
## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
This commit is contained in:
parent
979220be66
commit
9f41c4da7f
1283 changed files with 273211 additions and 4614 deletions
|
|
@ -1,24 +0,0 @@
|
||||||
# NOTE: This file is for HashiCorp specific licensing automation and can be deleted after creating a new repo with this template.
|
|
||||||
schema_version = 1
|
|
||||||
|
|
||||||
project {
|
|
||||||
license = "Apache-2.0"
|
|
||||||
copyright_year = 2025
|
|
||||||
|
|
||||||
header_ignore = [
|
|
||||||
# internal catalog metadata (prose)
|
|
||||||
"META.d/**/*.yaml",
|
|
||||||
|
|
||||||
# examples used within documentation (prose)
|
|
||||||
"examples/**",
|
|
||||||
|
|
||||||
# GitHub issue template configuration
|
|
||||||
".github/ISSUE_TEMPLATE/*.yml",
|
|
||||||
|
|
||||||
# golangci-lint tooling configuration
|
|
||||||
".golangci.yml",
|
|
||||||
|
|
||||||
# GoReleaser tooling configuration
|
|
||||||
".goreleaser.yml",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
24
.github/actions/build/action.yaml
vendored
24
.github/actions/build/action.yaml
vendored
|
|
@ -1,16 +1,34 @@
|
||||||
|
|
||||||
name: Build
|
name: Build
|
||||||
description: "Build pipeline"
|
description: "Build pipeline"
|
||||||
inputs:
|
inputs:
|
||||||
go-version:
|
go-version:
|
||||||
description: "Go version to install"
|
description: "Go version to install"
|
||||||
|
default: '1.25'
|
||||||
required: true
|
required: true
|
||||||
|
golang-cilint-version:
|
||||||
|
description: "Golangci-lint version to install"
|
||||||
|
default: "2.7.2"
|
||||||
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go ${{ inputs.go-version }}
|
- name: Install Go ${{ inputs.go-version }}
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version: ${{ inputs.go-version }}
|
go-version: ${{ inputs.go-version }}
|
||||||
- name: Install project tools and dependencies
|
check-latest: true
|
||||||
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
|
# - name: Run golangci-lint
|
||||||
|
# uses: golangci/golangci-lint-action@v9
|
||||||
|
# with:
|
||||||
|
# version: ${{ inputs.golang-cilint-version }}
|
||||||
|
|
||||||
|
- name: Install needed tools
|
||||||
shell: bash
|
shell: bash
|
||||||
run: make project-tools
|
run: |
|
||||||
|
set -e
|
||||||
|
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${{ inputs.golang-cilint-version }}
|
||||||
|
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@v0.24.0
|
||||||
|
|
|
||||||
114
.github/workflows/publish.yaml
vendored
Normal file
114
.github/workflows/publish.yaml
vendored
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
name: Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v0.*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
GO_VERSION: "1.25"
|
||||||
|
CODE_COVERAGE_FILE_NAME: "coverage.out" # must be the same as in Makefile
|
||||||
|
CODE_COVERAGE_ARTIFACT_NAME: "code-coverage"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
config:
|
||||||
|
name: Check GoReleaser config
|
||||||
|
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Check GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
args: check
|
||||||
|
|
||||||
|
publish:
|
||||||
|
name: "Publish provider"
|
||||||
|
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||||
|
needs: config
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read # Required to identify workflow run.
|
||||||
|
checks: write # Required to add status summary.
|
||||||
|
contents: read # Required to checkout repository.
|
||||||
|
pull-requests: write # Required to add PR comment.
|
||||||
|
steps:
|
||||||
|
- name: Install needed tools
|
||||||
|
run: |
|
||||||
|
apt-get -y -qq update
|
||||||
|
apt-get -y -qq install jq python3 python3-pip python-is-python3 s3cmd git make wget
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Install Go ${{ env.GO_VERSION }}
|
||||||
|
uses: actions/setup-go@v6
|
||||||
|
with:
|
||||||
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
|
||||||
|
- name: Install go tools
|
||||||
|
run: |
|
||||||
|
go install golang.org/x/tools/cmd/goimports@latest
|
||||||
|
go install github.com/hashicorp/terraform-plugin-codegen-framework/cmd/tfplugingen-framework@latest
|
||||||
|
go install github.com/hashicorp/terraform-plugin-codegen-openapi/cmd/tfplugingen-openapi@latest
|
||||||
|
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
|
java-version: '21'
|
||||||
|
|
||||||
|
- name: Run build pkg directory
|
||||||
|
run: |
|
||||||
|
go run cmd/main.go build
|
||||||
|
|
||||||
|
- name: Set up s3cfg
|
||||||
|
run: |
|
||||||
|
cat <<'EOF' >> ~/.s3cfg
|
||||||
|
[default]
|
||||||
|
host_base = https://object.storage.eu01.onstackit.cloud
|
||||||
|
host_bucket = https://%(bucket).object.storage.eu01.onstackit.cloud
|
||||||
|
check_ssl_certificate = False
|
||||||
|
access_key = ${{ secrets.S3_ACCESS_KEY }}
|
||||||
|
secret_key = ${{ secrets.S3_SECRET_KEY }}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- name: Import GPG key
|
||||||
|
run: |
|
||||||
|
gpg --import private.key
|
||||||
|
|
||||||
|
- name: Run GoReleaser
|
||||||
|
id: goreleaser
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
args: release --skip publish --clean --snapshot
|
||||||
|
|
||||||
|
- name: Prepare key file
|
||||||
|
run: |
|
||||||
|
echo $(echo ${{ secrets.KEY_FILE_B64 }} | base64 -d) >public_key.pem
|
||||||
|
|
||||||
|
- name: Prepare provider directory structure
|
||||||
|
run: |
|
||||||
|
VERSION=$(jq -r .version < dist/metadata.json)
|
||||||
|
go run cmd/main.go \
|
||||||
|
publish \
|
||||||
|
--namespace=mhenselin \
|
||||||
|
--providerName=stackitprivatepreview \
|
||||||
|
--repoName=terraform-provider-stackitprivatepreview \
|
||||||
|
--domain=tfregistry.sysops.stackit.rocks \
|
||||||
|
--gpgFingerprint=${{ secrets.GPG_FINGERPRINT }} \
|
||||||
|
--gpgPubKeyFile=public_key.pem \
|
||||||
|
--version=${VERSION}
|
||||||
|
|
||||||
|
- name: Publish provider to S3
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
cd release/
|
||||||
|
s3cmd put --recursive v1 s3://terraform-provider-privatepreview/
|
||||||
|
s3cmd put --recursive .well-known s3://terraform-provider-privatepreview/
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -38,3 +38,8 @@ stackit/internal/services/iaas/test-512k.img
|
||||||
# Test coverage reports
|
# Test coverage reports
|
||||||
coverage.out
|
coverage.out
|
||||||
coverage.html
|
coverage.html
|
||||||
|
generated
|
||||||
|
stackit-sdk-generator
|
||||||
|
dist
|
||||||
|
|
||||||
|
.secrets
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
# behavior.
|
# behavior.
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
|
project_name: terraform-provider-stackitprivatepreview
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- env:
|
||||||
# goreleaser does not work with CGO, it could also complicate
|
# goreleaser does not work with CGO, it could also complicate
|
||||||
|
|
@ -29,14 +31,16 @@ builds:
|
||||||
ignore:
|
ignore:
|
||||||
- goos: darwin
|
- goos: darwin
|
||||||
goarch: '386'
|
goarch: '386'
|
||||||
|
- goos: windows
|
||||||
|
goarch: arm
|
||||||
binary: '{{ .ProjectName }}_v{{ .Version }}'
|
binary: '{{ .ProjectName }}_v{{ .Version }}'
|
||||||
archives:
|
archives:
|
||||||
- formats: [ 'zip' ]
|
- formats: [ 'zip' ]
|
||||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
||||||
checksum:
|
checksum:
|
||||||
extra_files:
|
# extra_files:
|
||||||
- glob: 'terraform-registry-manifest.json'
|
# - glob: 'terraform-registry-manifest.json'
|
||||||
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
|
# name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
|
||||||
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
|
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
|
||||||
algorithm: sha256
|
algorithm: sha256
|
||||||
signs:
|
signs:
|
||||||
|
|
|
||||||
9
Makefile
9
Makefile
|
|
@ -1,5 +1,6 @@
|
||||||
ROOT_DIR ?= $(shell git rev-parse --show-toplevel)
|
ROOT_DIR ?= $(shell git rev-parse --show-toplevel)
|
||||||
SCRIPTS_BASE ?= $(ROOT_DIR)/scripts
|
SCRIPTS_BASE ?= $(ROOT_DIR)/scripts
|
||||||
|
VERSION ?= ${VER}
|
||||||
|
|
||||||
# SETUP AND TOOL INITIALIZATION TASKS
|
# SETUP AND TOOL INITIALIZATION TASKS
|
||||||
project-help:
|
project-help:
|
||||||
|
|
@ -57,3 +58,11 @@ test-acceptance-tf:
|
||||||
TF_ACC_REGION=$(TF_ACC_REGION) \
|
TF_ACC_REGION=$(TF_ACC_REGION) \
|
||||||
go test ./... -count=1 -timeout=30m && \
|
go test ./... -count=1 -timeout=30m && \
|
||||||
cd $(ROOT_DIR)
|
cd $(ROOT_DIR)
|
||||||
|
|
||||||
|
publish: build
|
||||||
|
ifeq ($(strip $(VERSION)),)
|
||||||
|
@echo "please call like this: VER=0.1.0 make publish"
|
||||||
|
else
|
||||||
|
@echo "version: $(VERSION)"
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
17
cmd/cmd/buildCmd.go
Normal file
17
cmd/cmd/buildCmd.go
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
package cmd
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/mhenselin/terraform-provider-stackitprivatepreview/tools"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
func NewBuildCmd() *cobra.Command {
|
||||||
|
return &cobra.Command{
|
||||||
|
Use: "build",
|
||||||
|
Short: "Build the necessary boilerplate",
|
||||||
|
Long: `...`,
|
||||||
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
return tools.Build()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
498
cmd/cmd/publishCmd.go
Normal file
498
cmd/cmd/publishCmd.go
Normal file
|
|
@ -0,0 +1,498 @@
|
||||||
|
package cmd
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bufio"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"io/fs"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
"path"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
namespace string
|
||||||
|
domain string
|
||||||
|
providerName string
|
||||||
|
distPath string
|
||||||
|
repoName string
|
||||||
|
version string
|
||||||
|
gpgFingerprint string
|
||||||
|
gpgPubKeyFile string
|
||||||
|
)
|
||||||
|
|
||||||
|
var rootCmd = &cobra.Command{
|
||||||
|
Use: "publish",
|
||||||
|
Short: "Publish terraform provider",
|
||||||
|
Long: `...`,
|
||||||
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
return publish()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { // nolint: gochecknoinits
|
||||||
|
rootCmd.Flags().StringVarP(&namespace, "namespace", "n", "", "Namespace for the Terraform registry.")
|
||||||
|
rootCmd.Flags().StringVarP(&domain, "domain", "d", "", "Domain for the Terraform registry.")
|
||||||
|
rootCmd.Flags().StringVarP(&providerName, "providerName", "p", "", "ProviderName for the Terraform registry.")
|
||||||
|
rootCmd.Flags().StringVarP(&distPath, "distPath", "x", "dist", "Dist Path for the Terraform registry.")
|
||||||
|
rootCmd.Flags().StringVarP(&repoName, "repoName", "r", "", "RepoName for the Terraform registry.")
|
||||||
|
rootCmd.Flags().StringVarP(&version, "version", "v", "", "Version for the Terraform registry.")
|
||||||
|
rootCmd.Flags().StringVarP(&gpgFingerprint, "gpgFingerprint", "f", "", "GPG Fingerprint for the Terraform registry.")
|
||||||
|
rootCmd.Flags().StringVarP(&gpgPubKeyFile, "gpgPubKeyFile", "k", "", "GPG PubKey file name for the Terraform registry.")
|
||||||
|
|
||||||
|
err := rootCmd.MarkFlagRequired("namespace")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = rootCmd.MarkFlagRequired("domain")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = rootCmd.MarkFlagRequired("providerName")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = rootCmd.MarkFlagRequired("gpgFingerprint")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = rootCmd.MarkFlagRequired("gpgPubKeyFile")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = rootCmd.MarkFlagRequired("repoName")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = rootCmd.MarkFlagRequired("version")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = rootCmd.MarkFlagRequired("gpgFingerprint")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = rootCmd.MarkFlagRequired("gpgPubKeyFile")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewPublishCmd() *cobra.Command {
|
||||||
|
return rootCmd
|
||||||
|
}
|
||||||
|
|
||||||
|
func publish() error {
|
||||||
|
log.Println("📦 Packaging Terraform Provider for private registry...")
|
||||||
|
|
||||||
|
distPath = filepath.Clean(distPath) + "/"
|
||||||
|
|
||||||
|
// Create release dir - only the contents of this need to be uploaded to S3
|
||||||
|
err := createDir("release")
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("error creating 'release' dir: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create .wellKnown directory and terraform.json file
|
||||||
|
err = wellKnown()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("error creating '.wellKnown' dir: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create v1 directory
|
||||||
|
err = provider(namespace, providerName, distPath, repoName, version, gpgFingerprint, gpgPubKeyFile, domain)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("error creating 'v1' dir: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Println("📦 Packaged Terraform Provider for private registry.")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This establishes the "API" as a TF provider by responding with the correct JSON payload, by using static files
|
||||||
|
func wellKnown() error {
|
||||||
|
log.Println("* Creating .well-known directory")
|
||||||
|
|
||||||
|
err := createDir("release/.well-known")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
terraformJson := []byte(`{"providers.v1": "/v1/providers/"}`)
|
||||||
|
|
||||||
|
log.Println(" - Writing to .well-known/terraform.json file")
|
||||||
|
err = writeFile("release/.well-known/terraform.json", terraformJson)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// provider is the Terraform name
|
||||||
|
// repoName is the Repository name
|
||||||
|
func provider(namespace, provider, distPath, repoName, version, gpgFingerprint, gpgPubKeyFile, domain string) error {
|
||||||
|
// Path to semantic version dir
|
||||||
|
versionPath := providerDirs(namespace, provider, version)
|
||||||
|
|
||||||
|
// Files to create under v1/providers/[namespace]/[provider_name]
|
||||||
|
err := createVersionsFile(namespace, provider, distPath, repoName, version)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
} // Creates version file one above download, which is why downloadPath isn't used
|
||||||
|
|
||||||
|
// Files/Directories to create under v1/providers/[namespace]/[provider_name]/[version]
|
||||||
|
copyShaFiles(versionPath, distPath, repoName, version)
|
||||||
|
downloadPath, err := createDownloadsDir(versionPath)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create darwin, freebsd, linux, windows dirs
|
||||||
|
err = createTargetDirs(*downloadPath)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy all zips
|
||||||
|
err = copyBuildZips(*downloadPath, distPath, repoName, version)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create all individual files for build targets and each architecture for the build targets
|
||||||
|
err = createArchitectureFiles(namespace, provider, distPath, repoName, version, gpgFingerprint, gpgPubKeyFile, domain)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the directories with a path format v1/providers/[namespace]/[provider_name]/[version]
|
||||||
|
func providerDirs(namespace, repoName, version string) string {
|
||||||
|
log.Println("* Creating release/v1/providers/[namespace]/[repo]/[version] directories")
|
||||||
|
|
||||||
|
providerPathArr := [6]string{"release", "v1", "providers", namespace, repoName, version}
|
||||||
|
|
||||||
|
var currentPath string
|
||||||
|
for _, v := range providerPathArr {
|
||||||
|
currentPath = currentPath + v + "/"
|
||||||
|
err := createDir(currentPath)
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return currentPath
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the versions file under v1/providers/[namespace]/[provider_name]
|
||||||
|
func createVersionsFile(namespace, provider, distPath, repoName, version string) error {
|
||||||
|
log.Println("* Writing to release/v1/providers/[namespace]/[repo]/versions file")
|
||||||
|
|
||||||
|
versionPath := fmt.Sprintf("release/v1/providers/%s/%s/versions", namespace, provider)
|
||||||
|
|
||||||
|
shaSumContents, err := getShaSumContents(distPath, repoName, version)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build the versions file...
|
||||||
|
platforms := ""
|
||||||
|
for _, line := range shaSumContents {
|
||||||
|
fileName := line[1] // zip file name
|
||||||
|
|
||||||
|
// get os and arch from filename
|
||||||
|
removeFileExtension := strings.Split(fileName, ".zip")
|
||||||
|
fileNameSplit := strings.Split(removeFileExtension[0], "_")
|
||||||
|
|
||||||
|
// Get build target and architecture from the zip file name
|
||||||
|
target := fileNameSplit[2]
|
||||||
|
arch := fileNameSplit[3]
|
||||||
|
|
||||||
|
platforms += "{"
|
||||||
|
platforms += fmt.Sprintf(`"os": "%s",`, target)
|
||||||
|
platforms += fmt.Sprintf(`"arch": "%s"`, arch)
|
||||||
|
platforms += "}"
|
||||||
|
platforms += ","
|
||||||
|
}
|
||||||
|
platforms = strings.TrimRight(platforms, ",") // remove trailing comma, json does not allow
|
||||||
|
|
||||||
|
var versions = []byte(fmt.Sprintf(`
|
||||||
|
{
|
||||||
|
"versions": [
|
||||||
|
{
|
||||||
|
"version": "%s",
|
||||||
|
"protocols": [
|
||||||
|
"4.0",
|
||||||
|
"5.1",
|
||||||
|
"6.0"
|
||||||
|
],
|
||||||
|
"platform": [
|
||||||
|
%s
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
`, version, platforms))
|
||||||
|
|
||||||
|
err = writeFile(versionPath, versions)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyShaFiles(destPath, srcPath, repoName, version string) {
|
||||||
|
log.Printf("* Copying SHA files in %s directory", srcPath)
|
||||||
|
|
||||||
|
// Copy files from srcPath
|
||||||
|
shaSum := repoName + "_" + version + "_SHA256SUMS"
|
||||||
|
shaSumPath := srcPath + "/" + shaSum
|
||||||
|
|
||||||
|
// _SHA256SUMS file
|
||||||
|
_, err := copyFile(shaSumPath, destPath+shaSum)
|
||||||
|
if err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// _SHA256SUMS.sig file
|
||||||
|
_, err = copyFile(shaSumPath+".sig", destPath+shaSum+".sig")
|
||||||
|
if err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func createDownloadsDir(destPath string) (*string, error) {
|
||||||
|
log.Printf("* Creating download/ in %s directory", destPath)
|
||||||
|
|
||||||
|
downloadPath := path.Join(destPath, "download")
|
||||||
|
|
||||||
|
err := createDir(downloadPath)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &downloadPath, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func createTargetDirs(destPath string) error {
|
||||||
|
log.Printf("* Creating target dirs in %s directory", destPath)
|
||||||
|
|
||||||
|
targets := [4]string{"darwin", "freebsd", "linux", "windows"}
|
||||||
|
|
||||||
|
for _, v := range targets {
|
||||||
|
err := createDir(destPath + v)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyBuildZips(destPath, distPath, repoName, version string) error {
|
||||||
|
log.Println("* Copying build zips")
|
||||||
|
|
||||||
|
shaSumContents, err := getShaSumContents(distPath, repoName, version)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Loop through and copy each
|
||||||
|
for _, v := range shaSumContents {
|
||||||
|
zipName := v[1]
|
||||||
|
zipSrcPath := distPath + zipName
|
||||||
|
zipDestPath := destPath + zipName
|
||||||
|
|
||||||
|
log.Printf(" - Zip Source: %s", zipSrcPath)
|
||||||
|
log.Printf(" - Zip Dest: %s", zipDestPath)
|
||||||
|
|
||||||
|
// Copy the zip
|
||||||
|
_, err := copyFile(zipSrcPath, zipDestPath)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func getShaSumContents(distPath, repoName, version string) ([][]string, error) {
|
||||||
|
shaSumFileName := repoName + "_" + version + "_SHA256SUMS"
|
||||||
|
shaSumPath := distPath + "/" + shaSumFileName
|
||||||
|
|
||||||
|
shaSumLine, err := readFile(shaSumPath)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
buildsAndShaSums := [][]string{}
|
||||||
|
|
||||||
|
for _, line := range shaSumLine {
|
||||||
|
lineSplit := strings.Split(line, " ")
|
||||||
|
|
||||||
|
row := []string{lineSplit[0], lineSplit[1]}
|
||||||
|
buildsAndShaSums = append(buildsAndShaSums, row)
|
||||||
|
}
|
||||||
|
|
||||||
|
// log.Println(buildsAndShaSums)
|
||||||
|
|
||||||
|
return buildsAndShaSums, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create architecture files for each build target
|
||||||
|
func createArchitectureFiles(namespace, provider, distPath, repoName, version, gpgFingerprint, gpgPubKeyFile, domain string) error {
|
||||||
|
log.Println("* Creating architecture files in target directories")
|
||||||
|
|
||||||
|
// filename = terraform-provider-[provider]_0.0.1_darwin_amd64.zip - provider_name + version + target + architecture + .zip
|
||||||
|
prefix := fmt.Sprintf("v1/providers/%s/%s/%s/", namespace, provider, version)
|
||||||
|
pathPrefix := fmt.Sprintf("release/%s", prefix)
|
||||||
|
urlPrefix := fmt.Sprintf("https://%s/%s", domain, prefix)
|
||||||
|
|
||||||
|
// download url = https://example.com/v1/providers/namespace/provider/0.0.1/download/terraform-provider_0.0.1_darwin_amd64.zip
|
||||||
|
downloadUrlPrefix := urlPrefix + "download/"
|
||||||
|
downloadPathPrefix := pathPrefix + "download/"
|
||||||
|
|
||||||
|
// shasums url = https://example.com/v1/providers/namespace/provider/0.0.1/terraform-provider_0.0.1_SHA256SUMS
|
||||||
|
shasumsUrl := urlPrefix + fmt.Sprintf("%s_%s_SHA256SUMS", repoName, version)
|
||||||
|
// shasums_signature_url = https://example.com/v1/providers/namespace/provider/0.0.1/terraform-provider_0.0.1_SHA256SUMS.sig
|
||||||
|
shasumsSigUrl := shasumsUrl + ".sig"
|
||||||
|
|
||||||
|
shaSumContents, err := getShaSumContents(distPath, repoName, version)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get contents of GPG key
|
||||||
|
gpgFile, err := readFile(gpgPubKeyFile)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Error reading '%s' file: %s", gpgPubKeyFile, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// loop through every line and stick with \\n
|
||||||
|
gpgAsciiPub := ""
|
||||||
|
for _, line := range gpgFile {
|
||||||
|
gpgAsciiPub = gpgAsciiPub + line + "\\n"
|
||||||
|
}
|
||||||
|
// log.Println(gpgAsciiPub)
|
||||||
|
|
||||||
|
for _, line := range shaSumContents {
|
||||||
|
shasum := line[0] // shasum of the zip
|
||||||
|
fileName := line[1] // zip file name
|
||||||
|
|
||||||
|
downloadUrl := downloadUrlPrefix + fileName
|
||||||
|
|
||||||
|
// get os and arch from filename
|
||||||
|
removeFileExtension := strings.Split(fileName, ".zip")
|
||||||
|
fileNameSplit := strings.Split(removeFileExtension[0], "_")
|
||||||
|
|
||||||
|
// Get build target and architecture from the zip file name
|
||||||
|
target := fileNameSplit[2]
|
||||||
|
arch := fileNameSplit[3]
|
||||||
|
|
||||||
|
// build filepath
|
||||||
|
archFileName := downloadPathPrefix + target + "/" + arch
|
||||||
|
|
||||||
|
var architectureTemplate = []byte(fmt.Sprintf(`
|
||||||
|
{
|
||||||
|
"protocols": [
|
||||||
|
"4.0",
|
||||||
|
"5.1"
|
||||||
|
],
|
||||||
|
"os": "%s",
|
||||||
|
"arch": "%s",
|
||||||
|
"filename": "%s",
|
||||||
|
"download_url": "%s",
|
||||||
|
"shasums_url": "%s",
|
||||||
|
"shasums_signature_url": "%s",
|
||||||
|
"shasum": "%s",
|
||||||
|
"signing_keys": {
|
||||||
|
"gpg_public_keys": [
|
||||||
|
{
|
||||||
|
"key_id": "%s",
|
||||||
|
"ascii_armor": "%s",
|
||||||
|
"trust_signature": "",
|
||||||
|
"source": "",
|
||||||
|
"source_url": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`, target, arch, fileName, downloadUrl, shasumsUrl, shasumsSigUrl, shasum, gpgFingerprint, gpgAsciiPub))
|
||||||
|
|
||||||
|
log.Printf(" - Arch file: %s", archFileName)
|
||||||
|
|
||||||
|
err := writeFile(archFileName, architectureTemplate)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func createDir(path string) error {
|
||||||
|
log.Printf("* Creating %s directory", path)
|
||||||
|
err := os.Mkdir(path, os.ModePerm)
|
||||||
|
if errors.Is(err, fs.ErrExist) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyFile(src, dst string) (int64, error) {
|
||||||
|
sourceFileStat, err := os.Stat(src)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if !sourceFileStat.Mode().IsRegular() {
|
||||||
|
return 0, fmt.Errorf("%s is not a regular file", src)
|
||||||
|
}
|
||||||
|
|
||||||
|
source, err := os.Open(src)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
defer source.Close()
|
||||||
|
|
||||||
|
destination, err := os.Create(dst)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
defer destination.Close()
|
||||||
|
nBytes, err := io.Copy(destination, source)
|
||||||
|
return nBytes, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func readFile(filePath string) ([]string, error) {
|
||||||
|
rFile, err := os.Open(filePath)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
fileScanner := bufio.NewScanner(rFile)
|
||||||
|
fileScanner.Split(bufio.ScanLines)
|
||||||
|
var fileLines []string
|
||||||
|
|
||||||
|
for fileScanner.Scan() {
|
||||||
|
fileLines = append(fileLines, fileScanner.Text())
|
||||||
|
}
|
||||||
|
|
||||||
|
rFile.Close()
|
||||||
|
|
||||||
|
return fileLines, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeFile(fileName string, fileContents []byte) error {
|
||||||
|
err := os.WriteFile(fileName, fileContents, 0644)
|
||||||
|
return err
|
||||||
|
}
|
||||||
23
cmd/cmd/rootCmd.go
Normal file
23
cmd/cmd/rootCmd.go
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
package cmd
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
|
func NewRootCmd() *cobra.Command {
|
||||||
|
return &cobra.Command{
|
||||||
|
Use: "build-tools",
|
||||||
|
Short: "...",
|
||||||
|
Long: "...",
|
||||||
|
SilenceErrors: true, // Error is beautified in a custom way before being printed
|
||||||
|
SilenceUsage: true,
|
||||||
|
DisableAutoGenTag: true,
|
||||||
|
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||||
|
err := cmd.Help()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
27
cmd/main.go
Normal file
27
cmd/main.go
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"github.com/mhenselin/terraform-provider-stackitprivatepreview/cmd/cmd"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
rootCmd := cmd.NewRootCmd()
|
||||||
|
//rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)")
|
||||||
|
//rootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "author name for copyright attribution")
|
||||||
|
//rootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "name of license for the project")
|
||||||
|
|
||||||
|
rootCmd.SetOut(os.Stdout)
|
||||||
|
|
||||||
|
rootCmd.AddCommand(
|
||||||
|
cmd.NewBuildCmd(),
|
||||||
|
cmd.NewPublishCmd(),
|
||||||
|
)
|
||||||
|
|
||||||
|
err := rootCmd.Execute()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -25,16 +25,16 @@ data "stackitprivatepreview_postgresflexalpha_database" "example" {
|
||||||
|
|
||||||
### Required
|
### Required
|
||||||
|
|
||||||
- `database_id` (String) Database ID.
|
|
||||||
- `instance_id` (String) ID of the Postgres Flex instance.
|
- `instance_id` (String) ID of the Postgres Flex instance.
|
||||||
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
||||||
|
|
||||||
### Optional
|
### Optional
|
||||||
|
|
||||||
|
- `database_id` (Number) Database ID.
|
||||||
|
- `name` (String) Database name.
|
||||||
- `region` (String) The resource region. If not defined, the provider region is used.
|
- `region` (String) The resource region. If not defined, the provider region is used.
|
||||||
|
|
||||||
### Read-Only
|
### Read-Only
|
||||||
|
|
||||||
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_id`,`database_id`".
|
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_id`,`database_id`".
|
||||||
- `name` (String) Database name.
|
|
||||||
- `owner` (String) Username of the database owner.
|
- `owner` (String) Username of the database owner.
|
||||||
|
|
|
||||||
68
docs/data-sources/postgresflexalpha_flavors.md
Normal file
68
docs/data-sources/postgresflexalpha_flavors.md
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "stackitprivatepreview_postgresflexalpha_flavors Data Source - stackitprivatepreview"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# stackitprivatepreview_postgresflexalpha_flavors (Data Source)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Required
|
||||||
|
|
||||||
|
- `project_id` (String) The STACKIT project ID.
|
||||||
|
- `region` (String) The region which should be addressed
|
||||||
|
|
||||||
|
### Optional
|
||||||
|
|
||||||
|
- `page` (Number) Number of the page of items list to be returned.
|
||||||
|
- `size` (Number) Number of items to be returned on each page.
|
||||||
|
- `sort` (String) Sorting of the flavors to be returned on each page.
|
||||||
|
|
||||||
|
### Read-Only
|
||||||
|
|
||||||
|
- `flavors` (Attributes List) List of flavors available for the project. (see [below for nested schema](#nestedatt--flavors))
|
||||||
|
- `pagination` (Attributes) (see [below for nested schema](#nestedatt--pagination))
|
||||||
|
|
||||||
|
<a id="nestedatt--flavors"></a>
|
||||||
|
### Nested Schema for `flavors`
|
||||||
|
|
||||||
|
Read-Only:
|
||||||
|
|
||||||
|
- `cpu` (Number) The cpu count of the instance.
|
||||||
|
- `description` (String) The flavor description.
|
||||||
|
- `id` (String) The id of the instance flavor.
|
||||||
|
- `max_gb` (Number) maximum storage which can be ordered for the flavor in Gigabyte.
|
||||||
|
- `memory` (Number) The memory of the instance in Gibibyte.
|
||||||
|
- `min_gb` (Number) minimum storage which is required to order in Gigabyte.
|
||||||
|
- `node_type` (String) defines the nodeType it can be either single or replica
|
||||||
|
- `storage_classes` (Attributes List) maximum storage which can be ordered for the flavor in Gigabyte. (see [below for nested schema](#nestedatt--flavors--storage_classes))
|
||||||
|
|
||||||
|
<a id="nestedatt--flavors--storage_classes"></a>
|
||||||
|
### Nested Schema for `flavors.storage_classes`
|
||||||
|
|
||||||
|
Read-Only:
|
||||||
|
|
||||||
|
- `class` (String)
|
||||||
|
- `max_io_per_sec` (Number)
|
||||||
|
- `max_through_in_mb` (Number)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="nestedatt--pagination"></a>
|
||||||
|
### Nested Schema for `pagination`
|
||||||
|
|
||||||
|
Read-Only:
|
||||||
|
|
||||||
|
- `page` (Number)
|
||||||
|
- `size` (Number)
|
||||||
|
- `sort` (String)
|
||||||
|
- `total_pages` (Number)
|
||||||
|
- `total_rows` (Number)
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
page_title: "stackitprivatepreview_postgresflexalpha_instance Data Source - stackitprivatepreview"
|
page_title: "stackitprivatepreview_postgresflexalpha_instance Data Source - stackitprivatepreview"
|
||||||
subcategory: ""
|
subcategory: ""
|
||||||
description: |-
|
description: |-
|
||||||
Postgres Flex instance data source schema. Must have a region specified in the provider configuration.
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# stackitprivatepreview_postgresflexalpha_instance (Data Source)
|
# stackitprivatepreview_postgresflexalpha_instance (Data Source)
|
||||||
|
|
||||||
Postgres Flex instance data source schema. Must have a `region` specified in the provider configuration.
|
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
|
|
@ -24,44 +24,31 @@ data "stackitprivatepreview_postgresflexalpha_instance" "example" {
|
||||||
|
|
||||||
### Required
|
### Required
|
||||||
|
|
||||||
- `instance_id` (String) ID of the PostgresFlex instance.
|
- `instance_id` (String) The ID of the instance.
|
||||||
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
- `project_id` (String) The STACKIT project ID.
|
||||||
|
- `region` (String) The region which should be addressed
|
||||||
### Optional
|
|
||||||
|
|
||||||
- `region` (String) The resource region. If not defined, the provider region is used.
|
|
||||||
|
|
||||||
### Read-Only
|
### Read-Only
|
||||||
|
|
||||||
- `backup_schedule` (String)
|
- `backup_schedule` (String) The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.
|
||||||
- `encryption` (Attributes) (see [below for nested schema](#nestedatt--encryption))
|
- `flavor_id` (String) The id of the instance flavor.
|
||||||
- `flavor_id` (String)
|
- `id` (String) The ID of the instance.
|
||||||
- `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`region`,`instance_id`".
|
- `is_deletable` (Boolean) Whether the instance can be deleted or not.
|
||||||
- `name` (String) Instance name.
|
- `name` (String) The name of the instance.
|
||||||
- `network` (Attributes) (see [below for nested schema](#nestedatt--network))
|
- `network` (Attributes) The access configuration of the instance (see [below for nested schema](#nestedatt--network))
|
||||||
- `replicas` (Number)
|
- `replicas` (Number) How many replicas the instance should have.
|
||||||
- `retention_days` (Number)
|
- `retention_days` (Number) How long backups are retained. The value can only be between 32 and 365 days.
|
||||||
- `storage` (Attributes) (see [below for nested schema](#nestedatt--storage))
|
- `status` (String) The current status of the instance.
|
||||||
- `version` (String)
|
- `storage` (Attributes) The object containing information about the storage size and class. (see [below for nested schema](#nestedatt--storage))
|
||||||
|
- `version` (String) The Postgres version used for the instance. See [Versions Endpoint](/documentation/postgres-flex-service/version/v3alpha1#tag/Version) for supported version parameters.
|
||||||
<a id="nestedatt--encryption"></a>
|
|
||||||
### Nested Schema for `encryption`
|
|
||||||
|
|
||||||
Read-Only:
|
|
||||||
|
|
||||||
- `key_id` (String)
|
|
||||||
- `key_version` (String)
|
|
||||||
- `keyring_id` (String)
|
|
||||||
- `service_account` (String)
|
|
||||||
|
|
||||||
|
|
||||||
<a id="nestedatt--network"></a>
|
<a id="nestedatt--network"></a>
|
||||||
### Nested Schema for `network`
|
### Nested Schema for `network`
|
||||||
|
|
||||||
Read-Only:
|
Read-Only:
|
||||||
|
|
||||||
- `access_scope` (String)
|
- `access_scope` (String) The access scope of the instance. It defines if the instance is public or airgapped.
|
||||||
- `acl` (List of String) The Access Control List (ACL) for the PostgresFlex instance.
|
- `acl` (List of String) List of IPV4 cidr.
|
||||||
- `instance_address` (String)
|
- `instance_address` (String)
|
||||||
- `router_address` (String)
|
- `router_address` (String)
|
||||||
|
|
||||||
|
|
@ -71,5 +58,5 @@ Read-Only:
|
||||||
|
|
||||||
Read-Only:
|
Read-Only:
|
||||||
|
|
||||||
- `class` (String)
|
- `performance_class` (String) The storage class for the storage.
|
||||||
- `size` (Number)
|
- `size` (Number) The storage size in Gigabytes.
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,10 @@ data "stackitprivatepreview_postgresflexalpha_user" "example" {
|
||||||
|
|
||||||
### Read-Only
|
### Read-Only
|
||||||
|
|
||||||
- `connection_string` (String)
|
- `connection_string` (String) The connection string for the user to the instance.
|
||||||
- `host` (String)
|
- `host` (String) The host address for the user to connect to the instance.
|
||||||
- `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`region`,`instance_id`,`user_id`".
|
- `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`region`,`instance_id`,`user_id`".
|
||||||
- `port` (Number)
|
- `port` (Number) The port number for the user to connect to the instance.
|
||||||
- `roles` (Set of String)
|
- `roles` (Set of String) The roles assigned to the user.
|
||||||
- `status` (String)
|
- `status` (String) The current status of the user.
|
||||||
- `username` (String)
|
- `username` (String) The name of the user.
|
||||||
|
|
|
||||||
31
docs/data-sources/sqlserverflexalpha_database.md
Normal file
31
docs/data-sources/sqlserverflexalpha_database.md
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "stackitprivatepreview_sqlserverflexalpha_database Data Source - stackitprivatepreview"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# stackitprivatepreview_sqlserverflexalpha_database (Data Source)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Required
|
||||||
|
|
||||||
|
- `database_name` (String) The name of the database.
|
||||||
|
- `instance_id` (String) The ID of the instance.
|
||||||
|
- `project_id` (String) The STACKIT project ID.
|
||||||
|
- `region` (String) The region which should be addressed
|
||||||
|
|
||||||
|
### Read-Only
|
||||||
|
|
||||||
|
- `collation_name` (String) The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint.
|
||||||
|
- `compatibility_level` (Number) CompatibilityLevel of the Database.
|
||||||
|
- `id` (Number) The id of the database.
|
||||||
|
- `name` (String) The name of the database.
|
||||||
|
- `owner` (String) The owner of the database.
|
||||||
35
docs/data-sources/sqlserverflexalpha_version.md
Normal file
35
docs/data-sources/sqlserverflexalpha_version.md
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "stackitprivatepreview_sqlserverflexalpha_version Data Source - stackitprivatepreview"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# stackitprivatepreview_sqlserverflexalpha_version (Data Source)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Required
|
||||||
|
|
||||||
|
- `project_id` (String) The STACKIT project ID.
|
||||||
|
- `region` (String) The region which should be addressed
|
||||||
|
|
||||||
|
### Read-Only
|
||||||
|
|
||||||
|
- `versions` (Attributes List) A list containing available sqlserver versions. (see [below for nested schema](#nestedatt--versions))
|
||||||
|
|
||||||
|
<a id="nestedatt--versions"></a>
|
||||||
|
### Nested Schema for `versions`
|
||||||
|
|
||||||
|
Read-Only:
|
||||||
|
|
||||||
|
- `beta` (Boolean) Flag if the version is a beta version. If set the version may contain bugs and is not fully tested.
|
||||||
|
- `deprecated` (String) Timestamp in RFC3339 format which says when the version will no longer be supported by STACKIT.
|
||||||
|
- `recommend` (Boolean) Flag if the version is recommend by the STACKIT Team.
|
||||||
|
- `version` (String) The sqlserver version used for the instance.
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
page_title: "stackitprivatepreview_postgresflexalpha_instance Resource - stackitprivatepreview"
|
page_title: "stackitprivatepreview_postgresflexalpha_instance Resource - stackitprivatepreview"
|
||||||
subcategory: ""
|
subcategory: ""
|
||||||
description: |-
|
description: |-
|
||||||
Postgres Flex instance resource schema. Must have a region specified in the provider configuration.
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# stackitprivatepreview_postgresflexalpha_instance (Resource)
|
# stackitprivatepreview_postgresflexalpha_instance (Resource)
|
||||||
|
|
||||||
Postgres Flex instance resource schema. Must have a `region` specified in the provider configuration.
|
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
|
|
@ -42,49 +42,42 @@ import {
|
||||||
|
|
||||||
### Required
|
### Required
|
||||||
|
|
||||||
- `backup_schedule` (String)
|
- `backup_schedule` (String) The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.
|
||||||
- `encryption` (Attributes) The encryption block. (see [below for nested schema](#nestedatt--encryption))
|
- `flavor_id` (String) The id of the instance flavor.
|
||||||
- `flavor_id` (String)
|
- `name` (String) The name of the instance.
|
||||||
- `name` (String) Instance name.
|
- `network` (Attributes) The access configuration of the instance (see [below for nested schema](#nestedatt--network))
|
||||||
- `network` (Attributes) The network block configuration. (see [below for nested schema](#nestedatt--network))
|
- `replicas` (Number) How many replicas the instance should have.
|
||||||
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
- `retention_days` (Number) How long backups are retained. The value can only be between 32 and 365 days.
|
||||||
- `replicas` (Number)
|
- `storage` (Attributes) The object containing information about the storage size and class. (see [below for nested schema](#nestedatt--storage))
|
||||||
- `retention_days` (Number) The days of the retention period.
|
- `version` (String) The Postgres version used for the instance. See [Versions Endpoint](/documentation/postgres-flex-service/version/v3alpha1#tag/Version) for supported version parameters.
|
||||||
- `storage` (Attributes) (see [below for nested schema](#nestedatt--storage))
|
|
||||||
- `version` (String) The database version used.
|
|
||||||
|
|
||||||
### Optional
|
### Optional
|
||||||
|
|
||||||
- `region` (String) The resource region. If not defined, the provider region is used.
|
- `encryption` (Attributes) The configuration for instance's volume and backup storage encryption.
|
||||||
|
|
||||||
|
⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected. (see [below for nested schema](#nestedatt--encryption))
|
||||||
|
- `instance_id` (String) The ID of the instance.
|
||||||
|
- `project_id` (String) The STACKIT project ID.
|
||||||
|
- `region` (String) The region which should be addressed
|
||||||
|
|
||||||
### Read-Only
|
### Read-Only
|
||||||
|
|
||||||
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_id`".
|
- `id` (String) The ID of the instance.
|
||||||
- `instance_id` (String) ID of the PostgresFlex instance.
|
- `is_deletable` (Boolean) Whether the instance can be deleted or not.
|
||||||
|
- `status` (String) The current status of the instance.
|
||||||
<a id="nestedatt--encryption"></a>
|
|
||||||
### Nested Schema for `encryption`
|
|
||||||
|
|
||||||
Required:
|
|
||||||
|
|
||||||
- `key_id` (String) Key ID of the encryption key.
|
|
||||||
- `key_version` (String) Key version of the encryption key.
|
|
||||||
- `keyring_id` (String) KeyRing ID of the encryption key.
|
|
||||||
- `service_account` (String) The service account ID of the service account.
|
|
||||||
|
|
||||||
|
|
||||||
<a id="nestedatt--network"></a>
|
<a id="nestedatt--network"></a>
|
||||||
### Nested Schema for `network`
|
### Nested Schema for `network`
|
||||||
|
|
||||||
Required:
|
Required:
|
||||||
|
|
||||||
- `acl` (List of String) The Access Control List (ACL) for the PostgresFlex instance.
|
- `acl` (List of String) List of IPV4 cidr.
|
||||||
|
|
||||||
Optional:
|
Optional:
|
||||||
|
|
||||||
- `access_scope` (String) The access scope. (Either SNA or PUBLIC)
|
- `access_scope` (String) The access scope of the instance. It defines if the instance is public or airgapped.
|
||||||
- `instance_address` (String) The returned instance address.
|
- `instance_address` (String)
|
||||||
- `router_address` (String) The returned router address.
|
- `router_address` (String)
|
||||||
|
|
||||||
|
|
||||||
<a id="nestedatt--storage"></a>
|
<a id="nestedatt--storage"></a>
|
||||||
|
|
@ -92,5 +85,16 @@ Optional:
|
||||||
|
|
||||||
Required:
|
Required:
|
||||||
|
|
||||||
- `class` (String) The storage class used.
|
- `performance_class` (String) The storage class for the storage.
|
||||||
- `size` (Number) The disk size of the storage.
|
- `size` (Number) The storage size in Gigabytes.
|
||||||
|
|
||||||
|
|
||||||
|
<a id="nestedatt--encryption"></a>
|
||||||
|
### Nested Schema for `encryption`
|
||||||
|
|
||||||
|
Required:
|
||||||
|
|
||||||
|
- `kek_key_id` (String) The encryption-key key identifier
|
||||||
|
- `kek_key_ring_id` (String) The encryption-key keyring identifier
|
||||||
|
- `kek_key_version` (String) The encryption-key version
|
||||||
|
- `service_account` (String)
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ import {
|
||||||
|
|
||||||
- `instance_id` (String) ID of the PostgresFlex instance.
|
- `instance_id` (String) ID of the PostgresFlex instance.
|
||||||
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
- `project_id` (String) STACKIT project ID to which the instance is associated.
|
||||||
- `roles` (Set of String) Database access levels for the user. Possible values are: `login`, `createdb`.
|
- `roles` (Set of String) Database access levels for the user. Possible values are: `login`, `createdb`, `createrole`.
|
||||||
- `username` (String)
|
- `username` (String) The name of the user.
|
||||||
|
|
||||||
### Optional
|
### Optional
|
||||||
|
|
||||||
|
|
@ -43,8 +43,10 @@ import {
|
||||||
|
|
||||||
### Read-Only
|
### Read-Only
|
||||||
|
|
||||||
- `connection_string` (String)
|
- `connection_string` (String) The connection string for the user to the instance.
|
||||||
|
- `host` (String) The host of the Postgres Flex instance.
|
||||||
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_id`,`user_id`".
|
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_id`,`user_id`".
|
||||||
- `password` (String, Sensitive)
|
- `password` (String, Sensitive) The password for the user. This is only set upon creation.
|
||||||
- `status` (String)
|
- `port` (Number) The port of the Postgres Flex instance.
|
||||||
|
- `status` (String) The current status of the user.
|
||||||
- `user_id` (Number) User ID.
|
- `user_id` (Number) User ID.
|
||||||
|
|
|
||||||
36
docs/resources/sqlserverflexalpha_database.md
Normal file
36
docs/resources/sqlserverflexalpha_database.md
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "stackitprivatepreview_sqlserverflexalpha_database Resource - stackitprivatepreview"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# stackitprivatepreview_sqlserverflexalpha_database (Resource)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Required
|
||||||
|
|
||||||
|
- `name` (String) The name of the database.
|
||||||
|
- `owner` (String) The owner of the database.
|
||||||
|
|
||||||
|
### Optional
|
||||||
|
|
||||||
|
- `collation` (String) The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint.
|
||||||
|
- `compatibility` (Number) CompatibilityLevel of the Database.
|
||||||
|
- `database_name` (String) The name of the database.
|
||||||
|
- `instance_id` (String) The ID of the instance.
|
||||||
|
- `project_id` (String) The STACKIT project ID.
|
||||||
|
- `region` (String) The region which should be addressed
|
||||||
|
|
||||||
|
### Read-Only
|
||||||
|
|
||||||
|
- `collation_name` (String) The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint.
|
||||||
|
- `compatibility_level` (Number) CompatibilityLevel of the Database.
|
||||||
|
- `id` (Number) The id of the database.
|
||||||
|
|
@ -41,7 +41,6 @@ import {
|
||||||
|
|
||||||
### Required
|
### Required
|
||||||
|
|
||||||
- `encryption` (Attributes) The encryption block. (see [below for nested schema](#nestedatt--encryption))
|
|
||||||
- `flavor_id` (String)
|
- `flavor_id` (String)
|
||||||
- `name` (String) Instance name.
|
- `name` (String) Instance name.
|
||||||
- `network` (Attributes) The network block. (see [below for nested schema](#nestedatt--network))
|
- `network` (Attributes) The network block. (see [below for nested schema](#nestedatt--network))
|
||||||
|
|
@ -50,6 +49,7 @@ import {
|
||||||
### Optional
|
### Optional
|
||||||
|
|
||||||
- `backup_schedule` (String) The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *")
|
- `backup_schedule` (String) The backup schedule. Should follow the cron scheduling system format (e.g. "0 0 * * *")
|
||||||
|
- `encryption` (Attributes) The encryption block. (see [below for nested schema](#nestedatt--encryption))
|
||||||
- `is_deletable` (Boolean)
|
- `is_deletable` (Boolean)
|
||||||
- `region` (String) The resource region. If not defined, the provider region is used.
|
- `region` (String) The resource region. If not defined, the provider region is used.
|
||||||
- `retention_days` (Number)
|
- `retention_days` (Number)
|
||||||
|
|
@ -64,17 +64,6 @@ import {
|
||||||
- `instance_id` (String) ID of the SQLServer Flex instance.
|
- `instance_id` (String) ID of the SQLServer Flex instance.
|
||||||
- `replicas` (Number)
|
- `replicas` (Number)
|
||||||
|
|
||||||
<a id="nestedatt--encryption"></a>
|
|
||||||
### Nested Schema for `encryption`
|
|
||||||
|
|
||||||
Required:
|
|
||||||
|
|
||||||
- `key_id` (String) STACKIT KMS - Key ID of the encryption key to use.
|
|
||||||
- `key_version` (String) STACKIT KMS - Key version to use in the encryption key.
|
|
||||||
- `keyring_id` (String) STACKIT KMS - KeyRing ID of the encryption key to use.
|
|
||||||
- `service_account` (String)
|
|
||||||
|
|
||||||
|
|
||||||
<a id="nestedatt--network"></a>
|
<a id="nestedatt--network"></a>
|
||||||
### Nested Schema for `network`
|
### Nested Schema for `network`
|
||||||
|
|
||||||
|
|
@ -89,6 +78,17 @@ Read-Only:
|
||||||
- `router_address` (String) The returned router IP address of the SQLServer Flex instance.
|
- `router_address` (String) The returned router IP address of the SQLServer Flex instance.
|
||||||
|
|
||||||
|
|
||||||
|
<a id="nestedatt--encryption"></a>
|
||||||
|
### Nested Schema for `encryption`
|
||||||
|
|
||||||
|
Required:
|
||||||
|
|
||||||
|
- `key_id` (String) STACKIT KMS - Key ID of the encryption key to use.
|
||||||
|
- `key_version` (String) STACKIT KMS - Key version to use in the encryption key.
|
||||||
|
- `keyring_id` (String) STACKIT KMS - KeyRing ID of the encryption key to use.
|
||||||
|
- `service_account` (String)
|
||||||
|
|
||||||
|
|
||||||
<a id="nestedatt--storage"></a>
|
<a id="nestedatt--storage"></a>
|
||||||
### Nested Schema for `storage`
|
### Nested Schema for `storage`
|
||||||
|
|
||||||
|
|
|
||||||
29
go.mod
29
go.mod
|
|
@ -1,6 +1,6 @@
|
||||||
module github.com/mhenselin/terraform-provider-stackitprivatepreview
|
module github.com/mhenselin/terraform-provider-stackitprivatepreview
|
||||||
|
|
||||||
go 1.25.5
|
go 1.25.6
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/google/go-cmp v0.7.0
|
github.com/google/go-cmp v0.7.0
|
||||||
|
|
@ -10,18 +10,23 @@ require (
|
||||||
github.com/hashicorp/terraform-plugin-go v0.29.0
|
github.com/hashicorp/terraform-plugin-go v0.29.0
|
||||||
github.com/hashicorp/terraform-plugin-log v0.10.0
|
github.com/hashicorp/terraform-plugin-log v0.10.0
|
||||||
github.com/hashicorp/terraform-plugin-testing v1.14.0
|
github.com/hashicorp/terraform-plugin-testing v1.14.0
|
||||||
github.com/stackitcloud/stackit-sdk-go/core v0.20.1
|
github.com/iancoleman/strcase v0.3.0
|
||||||
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.0
|
github.com/ldez/go-git-cmd-wrapper/v2 v2.9.1
|
||||||
|
github.com/spf13/cobra v1.10.2
|
||||||
|
github.com/stackitcloud/stackit-sdk-go/core v0.21.0
|
||||||
|
github.com/stackitcloud/stackit-sdk-go/services/iaasalpha v0.1.23-alpha
|
||||||
|
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.1
|
||||||
github.com/teambition/rrule-go v1.8.2
|
github.com/teambition/rrule-go v1.8.2
|
||||||
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
|
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
|
||||||
github.com/kr/text v0.2.0 // indirect
|
golang.org/x/telemetry v0.0.0-20260116145544-c6413dc483f5 // indirect
|
||||||
golang.org/x/telemetry v0.0.0-20260109210033-bd525da824e2 // indirect
|
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
dario.cat/mergo v1.0.1 // indirect
|
||||||
github.com/ProtonMail/go-crypto v1.3.0 // indirect
|
github.com/ProtonMail/go-crypto v1.3.0 // indirect
|
||||||
github.com/agext/levenshtein v1.2.3 // indirect
|
github.com/agext/levenshtein v1.2.3 // indirect
|
||||||
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
|
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
|
||||||
|
|
@ -45,8 +50,10 @@ require (
|
||||||
github.com/hashicorp/terraform-json v0.27.2 // indirect
|
github.com/hashicorp/terraform-json v0.27.2 // indirect
|
||||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1 // indirect
|
github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1 // indirect
|
||||||
github.com/hashicorp/terraform-registry-address v0.4.0 // indirect
|
github.com/hashicorp/terraform-registry-address v0.4.0 // indirect
|
||||||
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
|
github.com/hashicorp/terraform-svchost v0.2.0 // indirect
|
||||||
github.com/hashicorp/yamux v0.1.2 // indirect
|
github.com/hashicorp/yamux v0.1.2 // indirect
|
||||||
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||||
|
github.com/kr/text v0.2.0 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||||
|
|
@ -55,19 +62,21 @@ require (
|
||||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||||
github.com/oklog/run v1.2.0 // indirect
|
github.com/oklog/run v1.2.0 // indirect
|
||||||
|
github.com/spf13/pflag v1.0.10 // indirect
|
||||||
|
github.com/stretchr/testify v1.11.1 // indirect
|
||||||
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
|
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
|
||||||
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
|
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
|
||||||
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
||||||
github.com/zclconf/go-cty v1.17.0 // indirect
|
github.com/zclconf/go-cty v1.17.0 // indirect
|
||||||
golang.org/x/crypto v0.46.0 // indirect
|
golang.org/x/crypto v0.47.0 // indirect
|
||||||
golang.org/x/mod v0.32.0 // indirect
|
golang.org/x/mod v0.32.0 // indirect
|
||||||
golang.org/x/net v0.48.0 // indirect
|
golang.org/x/net v0.49.0 // indirect
|
||||||
golang.org/x/sync v0.19.0 // indirect
|
golang.org/x/sync v0.19.0 // indirect
|
||||||
golang.org/x/sys v0.40.0 // indirect
|
golang.org/x/sys v0.40.0 // indirect
|
||||||
golang.org/x/text v0.33.0 // indirect
|
golang.org/x/text v0.33.0 // indirect
|
||||||
golang.org/x/tools v0.40.0 // indirect
|
golang.org/x/tools v0.41.0 // indirect
|
||||||
google.golang.org/appengine v1.6.8 // indirect
|
google.golang.org/appengine v1.6.8 // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 // indirect
|
||||||
google.golang.org/grpc v1.78.0 // indirect
|
google.golang.org/grpc v1.78.0 // indirect
|
||||||
google.golang.org/protobuf v1.36.11 // indirect
|
google.golang.org/protobuf v1.36.11 // indirect
|
||||||
)
|
)
|
||||||
|
|
|
||||||
60
go.sum
60
go.sum
|
|
@ -1,5 +1,5 @@
|
||||||
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
|
dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
|
||||||
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
||||||
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
||||||
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||||
github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw=
|
github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw=
|
||||||
|
|
@ -13,6 +13,7 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/
|
||||||
github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c=
|
github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c=
|
||||||
github.com/cloudflare/circl v1.6.2 h1:hL7VBpHHKzrV5WTfHCaBsgx/HGbBYlgrwvNXEVDYYsQ=
|
github.com/cloudflare/circl v1.6.2 h1:hL7VBpHHKzrV5WTfHCaBsgx/HGbBYlgrwvNXEVDYYsQ=
|
||||||
github.com/cloudflare/circl v1.6.2/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=
|
github.com/cloudflare/circl v1.6.2/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=
|
||||||
|
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s=
|
github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s=
|
||||||
github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=
|
github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=
|
||||||
|
|
@ -99,10 +100,14 @@ github.com/hashicorp/terraform-plugin-testing v1.14.0 h1:5t4VKrjOJ0rg0sVuSJ86dz5
|
||||||
github.com/hashicorp/terraform-plugin-testing v1.14.0/go.mod h1:1qfWkecyYe1Do2EEOK/5/WnTyvC8wQucUkkhiGLg5nk=
|
github.com/hashicorp/terraform-plugin-testing v1.14.0/go.mod h1:1qfWkecyYe1Do2EEOK/5/WnTyvC8wQucUkkhiGLg5nk=
|
||||||
github.com/hashicorp/terraform-registry-address v0.4.0 h1:S1yCGomj30Sao4l5BMPjTGZmCNzuv7/GDTDX99E9gTk=
|
github.com/hashicorp/terraform-registry-address v0.4.0 h1:S1yCGomj30Sao4l5BMPjTGZmCNzuv7/GDTDX99E9gTk=
|
||||||
github.com/hashicorp/terraform-registry-address v0.4.0/go.mod h1:LRS1Ay0+mAiRkUyltGT+UHWkIqTFvigGn/LbMshfflE=
|
github.com/hashicorp/terraform-registry-address v0.4.0/go.mod h1:LRS1Ay0+mAiRkUyltGT+UHWkIqTFvigGn/LbMshfflE=
|
||||||
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
|
github.com/hashicorp/terraform-svchost v0.2.0 h1:wVc2vMiodOHvNZcQw/3y9af1XSomgjGSv+rv3BMCk7I=
|
||||||
github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc=
|
github.com/hashicorp/terraform-svchost v0.2.0/go.mod h1:/98rrS2yZsbppi4VGVCjwYmh8dqsKzISqK7Hli+0rcQ=
|
||||||
github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8=
|
github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8=
|
||||||
github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns=
|
github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns=
|
||||||
|
github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=
|
||||||
|
github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
|
||||||
|
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
||||||
|
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
|
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
|
||||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
||||||
github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94=
|
github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94=
|
||||||
|
|
@ -116,6 +121,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||||
|
github.com/ldez/go-git-cmd-wrapper/v2 v2.9.1 h1:QJRB9Gs5i/h6TVJI6yl09Qm6rNooznRiKwIw+VIxd90=
|
||||||
|
github.com/ldez/go-git-cmd-wrapper/v2 v2.9.1/go.mod h1:0eUeas7XtKDPKQbB0KijfaMPbuQ/cIprtoTRiwaUoFg=
|
||||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
||||||
|
|
@ -143,18 +150,26 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
|
||||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||||
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||||
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
|
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
|
||||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
||||||
github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8=
|
github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8=
|
||||||
github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY=
|
github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY=
|
||||||
github.com/stackitcloud/stackit-sdk-go/core v0.20.1 h1:odiuhhRXmxvEvnVTeZSN9u98edvw2Cd3DcnkepncP3M=
|
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
|
||||||
github.com/stackitcloud/stackit-sdk-go/core v0.20.1/go.mod h1:fqto7M82ynGhEnpZU6VkQKYWYoFG5goC076JWXTUPRQ=
|
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
|
||||||
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.0 h1:KgIRTw4gpxx8qoiaLGLbXPVDcBgCxPl60gigw+tizYc=
|
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.0/go.mod h1:fd13ANCU/Pye8uDd/6E0I605+6PYfHuVIQpPEK2Ph6c=
|
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
|
||||||
|
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
|
github.com/stackitcloud/stackit-sdk-go/core v0.21.0 h1:QXZqiaO7U/4IpTkJfzt4dt6QxJzG2uUS12mBnHpYNik=
|
||||||
|
github.com/stackitcloud/stackit-sdk-go/core v0.21.0/go.mod h1:fqto7M82ynGhEnpZU6VkQKYWYoFG5goC076JWXTUPRQ=
|
||||||
|
github.com/stackitcloud/stackit-sdk-go/services/iaasalpha v0.1.23-alpha h1:ugpMOMUZGB0yXsWcfe97F7GCdjlexbjFuGD8ZeyMSts=
|
||||||
|
github.com/stackitcloud/stackit-sdk-go/services/iaasalpha v0.1.23-alpha/go.mod h1:v5VGvTxLcCdJJmblbhqYalt/MFHcElDfYoy15CMhaWs=
|
||||||
|
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.1 h1:6MJdy1xmdE+uOo/F8mR5HSldjPSHpdhwuqS3u9m2EWQ=
|
||||||
|
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.1/go.mod h1:XLr3ZfrT1g8ZZMm7A6RXOPBuhBkikdUN2o/+/Y+Hu+g=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||||
github.com/teambition/rrule-go v1.8.2 h1:lIjpjvWTj9fFUZCmuoVDrKVOtdiyzbzc93qTmRVe/J8=
|
github.com/teambition/rrule-go v1.8.2 h1:lIjpjvWTj9fFUZCmuoVDrKVOtdiyzbzc93qTmRVe/J8=
|
||||||
github.com/teambition/rrule-go v1.8.2/go.mod h1:Ieq5AbrKGciP1V//Wq8ktsTXwSwJHDD5mD/wLBGl3p4=
|
github.com/teambition/rrule-go v1.8.2/go.mod h1:Ieq5AbrKGciP1V//Wq8ktsTXwSwJHDD5mD/wLBGl3p4=
|
||||||
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
|
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
|
||||||
|
|
@ -183,10 +198,11 @@ go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6
|
||||||
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
|
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
|
||||||
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
|
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
|
||||||
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
|
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
|
||||||
|
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
|
golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8=
|
||||||
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
|
golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c=
|
golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c=
|
||||||
golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU=
|
golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU=
|
||||||
|
|
@ -194,8 +210,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
|
golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=
|
||||||
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
|
golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
|
@ -214,12 +230,12 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
|
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
|
||||||
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||||
golang.org/x/telemetry v0.0.0-20260109210033-bd525da824e2 h1:O1cMQHRfwNpDfDJerqRoE2oD+AFlyid87D40L/OkkJo=
|
golang.org/x/telemetry v0.0.0-20260116145544-c6413dc483f5 h1:i0p03B68+xC1kD2QUO8JzDTPXCzhN56OLJ+IhHY8U3A=
|
||||||
golang.org/x/telemetry v0.0.0-20260109210033-bd525da824e2/go.mod h1:b7fPSJ0pKZ3ccUh8gnTONJxhn3c/PS6tyzQvyqw4iA8=
|
golang.org/x/telemetry v0.0.0-20260116145544-c6413dc483f5/go.mod h1:b7fPSJ0pKZ3ccUh8gnTONJxhn3c/PS6tyzQvyqw4iA8=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
|
golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY=
|
||||||
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg=
|
golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
|
|
@ -229,8 +245,8 @@ golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA=
|
golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc=
|
||||||
golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc=
|
golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
||||||
|
|
@ -238,8 +254,8 @@ gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||||
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
|
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
|
||||||
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
|
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b h1:Mv8VFug0MP9e5vUxfBcE3vUkV6CImK3cMNMIDFjmzxU=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 h1:sNrWoksmOyF5bvJUcnmbeAmQi8baNhqg5IWaI3llQqU=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
|
||||||
google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc=
|
google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc=
|
||||||
google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U=
|
google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U=
|
||||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||||
|
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
||||||
# This file contains all available configuration options
|
|
||||||
# with their default values.
|
|
||||||
|
|
||||||
# options for analysis running
|
|
||||||
run:
|
|
||||||
# default concurrency is a available CPU number
|
|
||||||
concurrency: 4
|
|
||||||
|
|
||||||
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
|
||||||
timeout: 5m
|
|
||||||
linters-settings:
|
|
||||||
goimports:
|
|
||||||
# put imports beginning with prefix after 3rd-party packages;
|
|
||||||
# it's a comma-separated list of prefixes
|
|
||||||
local-prefixes: github.com/freiheit-com/nmww
|
|
||||||
depguard:
|
|
||||||
rules:
|
|
||||||
main:
|
|
||||||
list-mode: lax # Everything is allowed unless it is denied
|
|
||||||
deny:
|
|
||||||
- pkg: "github.com/stretchr/testify"
|
|
||||||
desc: Do not use a testing framework
|
|
||||||
misspell:
|
|
||||||
# Correct spellings using locale preferences for US or UK.
|
|
||||||
# Default is to use a neutral variety of English.
|
|
||||||
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
|
|
||||||
locale: US
|
|
||||||
# golint:
|
|
||||||
# min-confidence: 0.8
|
|
||||||
gosec:
|
|
||||||
excludes:
|
|
||||||
# Suppressions: (see https://github.com/securego/gosec#available-rules for details)
|
|
||||||
- G104 # "Audit errors not checked" -> which we don't need and is a badly implemented version of errcheck
|
|
||||||
- G102 # "Bind to all interfaces" -> since this is normal in k8s
|
|
||||||
- G304 # "File path provided as taint input" -> too many false positives
|
|
||||||
- G307 # "Deferring unsafe method "Close" on type "io.ReadCloser" -> false positive when calling defer resp.Body.Close()
|
|
||||||
nakedret:
|
|
||||||
max-func-lines: 0
|
|
||||||
revive:
|
|
||||||
ignore-generated-header: true
|
|
||||||
severity: error
|
|
||||||
# https://github.com/mgechev/revive
|
|
||||||
rules:
|
|
||||||
- name: errorf
|
|
||||||
- name: context-as-argument
|
|
||||||
- name: error-return
|
|
||||||
- name: increment-decrement
|
|
||||||
- name: indent-error-flow
|
|
||||||
- name: superfluous-else
|
|
||||||
- name: unused-parameter
|
|
||||||
- name: unreachable-code
|
|
||||||
- name: atomic
|
|
||||||
- name: empty-lines
|
|
||||||
- name: early-return
|
|
||||||
gocritic:
|
|
||||||
enabled-tags:
|
|
||||||
- performance
|
|
||||||
- style
|
|
||||||
- experimental
|
|
||||||
disabled-checks:
|
|
||||||
- wrapperFunc
|
|
||||||
- typeDefFirst
|
|
||||||
- ifElseChain
|
|
||||||
- dupImport # https://github.com/go-critic/go-critic/issues/845
|
|
||||||
linters:
|
|
||||||
enable:
|
|
||||||
# https://golangci-lint.run/usage/linters/
|
|
||||||
# default linters
|
|
||||||
- gosimple
|
|
||||||
- govet
|
|
||||||
- ineffassign
|
|
||||||
- staticcheck
|
|
||||||
- typecheck
|
|
||||||
- unused
|
|
||||||
# additional linters
|
|
||||||
- errorlint
|
|
||||||
- gochecknoinits
|
|
||||||
- gocritic
|
|
||||||
- gofmt
|
|
||||||
- goimports
|
|
||||||
- gosec
|
|
||||||
- misspell
|
|
||||||
- nakedret
|
|
||||||
- revive
|
|
||||||
- depguard
|
|
||||||
- bodyclose
|
|
||||||
- sqlclosecheck
|
|
||||||
- wastedassign
|
|
||||||
- forcetypeassert
|
|
||||||
- errcheck
|
|
||||||
disable:
|
|
||||||
- noctx # false positive: finds errors with http.NewRequest that dont make sense
|
|
||||||
- unparam # false positives
|
|
||||||
issues:
|
|
||||||
exclude-use-default: false
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
version: "2"
|
version: "2"
|
||||||
run:
|
run:
|
||||||
concurrency: 4
|
concurrency: 4
|
||||||
|
|
@ -67,6 +68,8 @@ linters:
|
||||||
- third_party$
|
- third_party$
|
||||||
- builtin$
|
- builtin$
|
||||||
- examples$
|
- examples$
|
||||||
|
- tools/copy.go
|
||||||
|
- tools/main.go
|
||||||
formatters:
|
formatters:
|
||||||
enable:
|
enable:
|
||||||
- gofmt
|
- gofmt
|
||||||
|
|
|
||||||
2
main.go
2
main.go
|
|
@ -21,7 +21,7 @@ func main() {
|
||||||
flag.BoolVar(&debug, "debug", false, "allows debugging the provider")
|
flag.BoolVar(&debug, "debug", false, "allows debugging the provider")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
err := providerserver.Serve(context.Background(), stackit.New(version), providerserver.ServeOpts{
|
err := providerserver.Serve(context.Background(), stackit.New(version), providerserver.ServeOpts{
|
||||||
Address: "registry.terraform.io/mhenselin/stackitprivatepreview",
|
Address: "tfregistry.sysops.stackit.rocks/mhenselin/stackitprivatepreview",
|
||||||
Debug: debug,
|
Debug: debug,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
1
pkg/albbeta/.openapi-generator/VERSION
Normal file
1
pkg/albbeta/.openapi-generator/VERSION
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
6.6.0
|
||||||
2409
pkg/albbeta/api_default.go
Normal file
2409
pkg/albbeta/api_default.go
Normal file
File diff suppressed because it is too large
Load diff
767
pkg/albbeta/api_default_test.go
Normal file
767
pkg/albbeta/api_default_test.go
Normal file
|
|
@ -0,0 +1,767 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
Testing DefaultApiService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"net/http"
|
||||||
|
"net/http/httptest"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stackitcloud/stackit-sdk-go/core/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_albbeta_DefaultApiService(t *testing.T) {
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService CreateCredentials", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/credentials"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := CreateCredentialsResponse{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
createCredentialsPayload := CreateCredentialsPayload{}
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.CreateCredentials(context.Background(), projectId, region).CreateCredentialsPayload(createCredentialsPayload).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService CreateLoadBalancer", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/load-balancers"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := LoadBalancer{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
createLoadBalancerPayload := CreateLoadBalancerPayload{}
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.CreateLoadBalancer(context.Background(), projectId, region).CreateLoadBalancerPayload(createLoadBalancerPayload).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService DeleteCredentials", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/credentials/{credentialsRef}"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
credentialsRefValue := "credentialsRef-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := map[string]interface{}{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
credentialsRef := credentialsRefValue
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.DeleteCredentials(context.Background(), projectId, region, credentialsRef).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService DeleteLoadBalancer", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/load-balancers/{name}"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
nameValue := "name-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := map[string]interface{}{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
name := nameValue
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.DeleteLoadBalancer(context.Background(), projectId, region, name).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService GetCredentials", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/credentials/{credentialsRef}"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
credentialsRefValue := "credentialsRef-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := GetCredentialsResponse{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
credentialsRef := credentialsRefValue
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.GetCredentials(context.Background(), projectId, region, credentialsRef).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService GetLoadBalancer", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/load-balancers/{name}"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
nameValue := "name-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := LoadBalancer{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
name := nameValue
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.GetLoadBalancer(context.Background(), projectId, region, name).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService GetQuota", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/quota"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := GetQuotaResponse{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.GetQuota(context.Background(), projectId, region).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService ListCredentials", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/credentials"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := ListCredentialsResponse{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.ListCredentials(context.Background(), projectId, region).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService ListLoadBalancers", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/load-balancers"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := ListLoadBalancersResponse{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.ListLoadBalancers(context.Background(), projectId, region).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService ListPlans", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/regions/{region}/plans"
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := ListPlansResponse{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
region := regionValue
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.ListPlans(context.Background(), region).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService UpdateCredentials", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/credentials/{credentialsRef}"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
credentialsRefValue := "credentialsRef-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"credentialsRef"+"}", url.PathEscape(ParameterValueToString(credentialsRefValue, "credentialsRef")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := UpdateCredentialsResponse{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
credentialsRef := credentialsRefValue
|
||||||
|
updateCredentialsPayload := UpdateCredentialsPayload{}
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.UpdateCredentials(context.Background(), projectId, region, credentialsRef).UpdateCredentialsPayload(updateCredentialsPayload).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService UpdateLoadBalancer", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/load-balancers/{name}"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
nameValue := "name-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := LoadBalancer{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
name := nameValue
|
||||||
|
updateLoadBalancerPayload := UpdateLoadBalancerPayload{}
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.UpdateLoadBalancer(context.Background(), projectId, region, name).UpdateLoadBalancerPayload(updateLoadBalancerPayload).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DefaultApiService UpdateTargetPool", func(t *testing.T) {
|
||||||
|
_apiUrlPath := "/v2beta2/projects/{projectId}/regions/{region}/load-balancers/{name}/target-pools/{targetPoolName}"
|
||||||
|
projectIdValue := "projectId-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
|
||||||
|
regionValue := "region-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
|
||||||
|
nameValue := "name-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"name"+"}", url.PathEscape(ParameterValueToString(nameValue, "name")), -1)
|
||||||
|
targetPoolNameValue := "targetPoolName-value"
|
||||||
|
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"targetPoolName"+"}", url.PathEscape(ParameterValueToString(targetPoolNameValue, "targetPoolName")), -1)
|
||||||
|
|
||||||
|
testDefaultApiServeMux := http.NewServeMux()
|
||||||
|
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
data := TargetPool{}
|
||||||
|
w.Header().Add("Content-Type", "application/json")
|
||||||
|
json.NewEncoder(w).Encode(data)
|
||||||
|
})
|
||||||
|
testServer := httptest.NewServer(testDefaultApiServeMux)
|
||||||
|
defer testServer.Close()
|
||||||
|
|
||||||
|
configuration := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Region: "test_region",
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: testServer.URL,
|
||||||
|
Description: "Localhost for albbeta_DefaultApi",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
DefaultValue: "test_region.",
|
||||||
|
EnumValues: []string{
|
||||||
|
"test_region.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("creating API client: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId := projectIdValue
|
||||||
|
region := regionValue
|
||||||
|
name := nameValue
|
||||||
|
targetPoolName := targetPoolNameValue
|
||||||
|
updateTargetPoolPayload := UpdateTargetPoolPayload{}
|
||||||
|
|
||||||
|
resp, reqErr := apiClient.UpdateTargetPool(context.Background(), projectId, region, name, targetPoolName).UpdateTargetPoolPayload(updateTargetPoolPayload).Execute()
|
||||||
|
|
||||||
|
if reqErr != nil {
|
||||||
|
t.Fatalf("error in call: %v", reqErr)
|
||||||
|
}
|
||||||
|
if IsNil(resp) {
|
||||||
|
t.Fatalf("response not present")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
628
pkg/albbeta/client.go
Normal file
628
pkg/albbeta/client.go
Normal file
|
|
@ -0,0 +1,628 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"encoding/xml"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"log"
|
||||||
|
"mime/multipart"
|
||||||
|
"net/http"
|
||||||
|
"net/http/httputil"
|
||||||
|
"net/url"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"reflect"
|
||||||
|
"regexp"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
"unicode/utf8"
|
||||||
|
|
||||||
|
"github.com/stackitcloud/stackit-sdk-go/core/auth"
|
||||||
|
"github.com/stackitcloud/stackit-sdk-go/core/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
|
||||||
|
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
|
||||||
|
queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
|
||||||
|
queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
|
||||||
|
)
|
||||||
|
|
||||||
|
// APIClient manages communication with the STACKIT Application Load Balancer API API v2beta2.0.0
|
||||||
|
// In most cases there should be only one, shared, APIClient.
|
||||||
|
type APIClient struct {
|
||||||
|
cfg *config.Configuration
|
||||||
|
common service // Reuse a single struct instead of allocating one for each service on the heap.
|
||||||
|
defaultApi *DefaultApiService
|
||||||
|
}
|
||||||
|
|
||||||
|
type service struct {
|
||||||
|
client DefaultApi
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewAPIClient creates a new API client.
|
||||||
|
// Optionally receives configuration options
|
||||||
|
func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) {
|
||||||
|
cfg := NewConfiguration()
|
||||||
|
|
||||||
|
for _, option := range opts {
|
||||||
|
err := option(cfg)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("configuring the client: %w", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
err := config.ConfigureRegion(cfg)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("configuring region: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if cfg.HTTPClient == nil {
|
||||||
|
cfg.HTTPClient = &http.Client{}
|
||||||
|
}
|
||||||
|
|
||||||
|
authRoundTripper, err := auth.SetupAuth(cfg)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("setting up authentication: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
roundTripper := authRoundTripper
|
||||||
|
if cfg.Middleware != nil {
|
||||||
|
roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...)
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg.HTTPClient.Transport = roundTripper
|
||||||
|
|
||||||
|
c := &APIClient{}
|
||||||
|
c.cfg = cfg
|
||||||
|
c.common.client = c
|
||||||
|
c.defaultApi = (*DefaultApiService)(&c.common)
|
||||||
|
|
||||||
|
return c, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func atoi(in string) (int, error) {
|
||||||
|
return strconv.Atoi(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
// selectHeaderContentType select a content type from the available list.
|
||||||
|
func selectHeaderContentType(contentTypes []string) string {
|
||||||
|
if len(contentTypes) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
if contains(contentTypes, "application/json") {
|
||||||
|
return "application/json"
|
||||||
|
}
|
||||||
|
return contentTypes[0] // use the first content type specified in 'consumes'
|
||||||
|
}
|
||||||
|
|
||||||
|
// selectHeaderAccept join all accept types and return
|
||||||
|
func selectHeaderAccept(accepts []string) string {
|
||||||
|
if len(accepts) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
if contains(accepts, "application/json") {
|
||||||
|
return "application/json"
|
||||||
|
}
|
||||||
|
|
||||||
|
return strings.Join(accepts, ",")
|
||||||
|
}
|
||||||
|
|
||||||
|
// contains is a case insensitive match, finding needle in a haystack
|
||||||
|
func contains(haystack []string, needle string) bool {
|
||||||
|
for _, a := range haystack {
|
||||||
|
if strings.EqualFold(a, needle) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify optional parameters are of the correct type.
|
||||||
|
func typeCheckParameter(obj interface{}, expected string, name string) error {
|
||||||
|
// Make sure there is an object.
|
||||||
|
if obj == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check the type is as expected.
|
||||||
|
if reflect.TypeOf(obj).String() != expected {
|
||||||
|
return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String())
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func ParameterValueToString(obj interface{}, key string) string {
|
||||||
|
if reflect.TypeOf(obj).Kind() != reflect.Ptr {
|
||||||
|
return fmt.Sprintf("%v", obj)
|
||||||
|
}
|
||||||
|
var param, ok = obj.(MappedNullable)
|
||||||
|
if !ok {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
dataMap, err := param.ToMap()
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return fmt.Sprintf("%v", dataMap[key])
|
||||||
|
}
|
||||||
|
|
||||||
|
// parameterAddToHeaderOrQuery adds the provided object to the request header or url query
|
||||||
|
// supporting deep object syntax
|
||||||
|
func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) {
|
||||||
|
var v = reflect.ValueOf(obj)
|
||||||
|
var value = ""
|
||||||
|
if v == reflect.ValueOf(nil) {
|
||||||
|
value = "null"
|
||||||
|
} else {
|
||||||
|
switch v.Kind() {
|
||||||
|
case reflect.Invalid:
|
||||||
|
value = "invalid"
|
||||||
|
|
||||||
|
case reflect.Struct:
|
||||||
|
if t, ok := obj.(MappedNullable); ok {
|
||||||
|
dataMap, err := t.ToMap()
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if t, ok := obj.(time.Time); ok {
|
||||||
|
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
value = v.Type().String() + " value"
|
||||||
|
case reflect.Slice:
|
||||||
|
var indValue = reflect.ValueOf(obj)
|
||||||
|
if indValue == reflect.ValueOf(nil) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var lenIndValue = indValue.Len()
|
||||||
|
for i := 0; i < lenIndValue; i++ {
|
||||||
|
var arrayValue = indValue.Index(i)
|
||||||
|
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
case reflect.Map:
|
||||||
|
var indValue = reflect.ValueOf(obj)
|
||||||
|
if indValue == reflect.ValueOf(nil) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
iter := indValue.MapRange()
|
||||||
|
for iter.Next() {
|
||||||
|
k, v := iter.Key(), iter.Value()
|
||||||
|
parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
case reflect.Interface:
|
||||||
|
fallthrough
|
||||||
|
case reflect.Ptr:
|
||||||
|
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType)
|
||||||
|
return
|
||||||
|
|
||||||
|
case reflect.Int, reflect.Int8, reflect.Int16,
|
||||||
|
reflect.Int32, reflect.Int64:
|
||||||
|
value = strconv.FormatInt(v.Int(), 10)
|
||||||
|
case reflect.Uint, reflect.Uint8, reflect.Uint16,
|
||||||
|
reflect.Uint32, reflect.Uint64, reflect.Uintptr:
|
||||||
|
value = strconv.FormatUint(v.Uint(), 10)
|
||||||
|
case reflect.Float32, reflect.Float64:
|
||||||
|
value = strconv.FormatFloat(v.Float(), 'g', -1, 32)
|
||||||
|
case reflect.Bool:
|
||||||
|
value = strconv.FormatBool(v.Bool())
|
||||||
|
case reflect.String:
|
||||||
|
value = v.String()
|
||||||
|
default:
|
||||||
|
value = v.Type().String() + " value"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch valuesMap := headerOrQueryParams.(type) {
|
||||||
|
case url.Values:
|
||||||
|
if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" {
|
||||||
|
valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value)
|
||||||
|
} else {
|
||||||
|
valuesMap.Add(keyPrefix, value)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case map[string]string:
|
||||||
|
valuesMap[keyPrefix] = value
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// helper for converting interface{} parameters to json strings
|
||||||
|
func parameterToJson(obj interface{}) (string, error) {
|
||||||
|
jsonBuf, err := json.Marshal(obj)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return string(jsonBuf), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// callAPI do the request.
|
||||||
|
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||||
|
if c.cfg.Debug {
|
||||||
|
dump, err := httputil.DumpRequestOut(request, true)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
log.Printf("\n%s\n", string(dump))
|
||||||
|
}
|
||||||
|
|
||||||
|
resp, err := c.cfg.HTTPClient.Do(request)
|
||||||
|
if err != nil {
|
||||||
|
return resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.cfg.Debug {
|
||||||
|
dump, err := httputil.DumpResponse(resp, true)
|
||||||
|
if err != nil {
|
||||||
|
return resp, err
|
||||||
|
}
|
||||||
|
log.Printf("\n%s\n", string(dump))
|
||||||
|
}
|
||||||
|
return resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allow modification of underlying config for alternate implementations and testing
|
||||||
|
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
|
||||||
|
func (c *APIClient) GetConfig() *config.Configuration {
|
||||||
|
return c.cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
type formFile struct {
|
||||||
|
fileBytes []byte
|
||||||
|
fileName string
|
||||||
|
formFileName string
|
||||||
|
}
|
||||||
|
|
||||||
|
// prepareRequest build the request
|
||||||
|
func (c *APIClient) prepareRequest(
|
||||||
|
ctx context.Context,
|
||||||
|
path string, method string,
|
||||||
|
postBody interface{},
|
||||||
|
headerParams map[string]string,
|
||||||
|
queryParams url.Values,
|
||||||
|
formParams url.Values,
|
||||||
|
formFiles []formFile) (localVarRequest *http.Request, err error) {
|
||||||
|
|
||||||
|
var body *bytes.Buffer
|
||||||
|
|
||||||
|
// Detect postBody type and post.
|
||||||
|
if !IsNil(postBody) {
|
||||||
|
contentType := headerParams["Content-Type"]
|
||||||
|
if contentType == "" {
|
||||||
|
contentType = detectContentType(postBody)
|
||||||
|
headerParams["Content-Type"] = contentType
|
||||||
|
}
|
||||||
|
|
||||||
|
body, err = setBody(postBody, contentType)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add form parameters and file if available.
|
||||||
|
if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) {
|
||||||
|
if body != nil {
|
||||||
|
return nil, fmt.Errorf("cannot specify postBody and multipart form at the same time.")
|
||||||
|
}
|
||||||
|
body = &bytes.Buffer{}
|
||||||
|
w := multipart.NewWriter(body)
|
||||||
|
|
||||||
|
for k, v := range formParams {
|
||||||
|
for _, iv := range v {
|
||||||
|
if strings.HasPrefix(k, "@") { // file
|
||||||
|
err = addFile(w, k[1:], iv)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
} else { // form value
|
||||||
|
w.WriteField(k, iv)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, formFile := range formFiles {
|
||||||
|
if len(formFile.fileBytes) > 0 && formFile.fileName != "" {
|
||||||
|
w.Boundary()
|
||||||
|
part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
_, err = part.Write(formFile.fileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the Boundary in the Content-Type
|
||||||
|
headerParams["Content-Type"] = w.FormDataContentType()
|
||||||
|
|
||||||
|
// Set Content-Length
|
||||||
|
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||||
|
w.Close()
|
||||||
|
}
|
||||||
|
|
||||||
|
if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
|
||||||
|
if body != nil {
|
||||||
|
return nil, fmt.Errorf("cannot specify postBody and x-www-form-urlencoded form at the same time.")
|
||||||
|
}
|
||||||
|
body = &bytes.Buffer{}
|
||||||
|
body.WriteString(formParams.Encode())
|
||||||
|
// Set Content-Length
|
||||||
|
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup path and query parameters
|
||||||
|
url, err := url.Parse(path)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Override request host, if applicable
|
||||||
|
if c.cfg.Host != "" {
|
||||||
|
url.Host = c.cfg.Host
|
||||||
|
}
|
||||||
|
|
||||||
|
// Override request scheme, if applicable
|
||||||
|
if c.cfg.Scheme != "" {
|
||||||
|
url.Scheme = c.cfg.Scheme
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adding Query Param
|
||||||
|
query := url.Query()
|
||||||
|
for k, v := range queryParams {
|
||||||
|
for _, iv := range v {
|
||||||
|
query.Add(k, iv)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Encode the parameters.
|
||||||
|
url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string {
|
||||||
|
pieces := strings.Split(s, "=")
|
||||||
|
pieces[0] = queryDescape.Replace(pieces[0])
|
||||||
|
return strings.Join(pieces, "=")
|
||||||
|
})
|
||||||
|
|
||||||
|
// Generate a new request
|
||||||
|
if body != nil {
|
||||||
|
localVarRequest, err = http.NewRequest(method, url.String(), body)
|
||||||
|
} else {
|
||||||
|
localVarRequest, err = http.NewRequest(method, url.String(), nil)
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// add header parameters, if any
|
||||||
|
if len(headerParams) > 0 {
|
||||||
|
headers := http.Header{}
|
||||||
|
for h, v := range headerParams {
|
||||||
|
headers[h] = []string{v}
|
||||||
|
}
|
||||||
|
localVarRequest.Header = headers
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the user agent to the request.
|
||||||
|
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
|
||||||
|
|
||||||
|
if ctx != nil {
|
||||||
|
// add context to the request
|
||||||
|
localVarRequest = localVarRequest.WithContext(ctx)
|
||||||
|
|
||||||
|
// Walk through any authentication.
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for header, value := range c.cfg.DefaultHeader {
|
||||||
|
localVarRequest.Header.Add(header, value)
|
||||||
|
}
|
||||||
|
return localVarRequest, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||||
|
if len(b) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if s, ok := v.(*string); ok {
|
||||||
|
*s = string(b)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if f, ok := v.(*os.File); ok {
|
||||||
|
f, err = os.CreateTemp("", "HttpClientFile")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err = f.Write(b)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err = f.Seek(0, io.SeekStart)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if f, ok := v.(**os.File); ok {
|
||||||
|
*f, err = os.CreateTemp("", "HttpClientFile")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err = (*f).Write(b)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err = (*f).Seek(0, io.SeekStart)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if xmlCheck.MatchString(contentType) {
|
||||||
|
if err = xml.Unmarshal(b, v); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if jsonCheck.MatchString(contentType) {
|
||||||
|
if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
|
||||||
|
if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
|
||||||
|
if err = unmarshalObj.UnmarshalJSON(b); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return fmt.Errorf("unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
|
||||||
|
}
|
||||||
|
} else if err = json.Unmarshal(b, v); err != nil { // simple model
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return fmt.Errorf("undefined response type")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add a file to the multipart request
|
||||||
|
func addFile(w *multipart.Writer, fieldName, path string) error {
|
||||||
|
file, err := os.Open(filepath.Clean(path))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
|
part, err := w.CreateFormFile(fieldName, filepath.Base(path))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
_, err = io.Copy(part, file)
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// A wrapper for strict JSON decoding
|
||||||
|
func newStrictDecoder(data []byte) *json.Decoder {
|
||||||
|
dec := json.NewDecoder(bytes.NewBuffer(data))
|
||||||
|
dec.DisallowUnknownFields()
|
||||||
|
return dec
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set request body from an interface{}
|
||||||
|
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
|
||||||
|
if bodyBuf == nil {
|
||||||
|
bodyBuf = &bytes.Buffer{}
|
||||||
|
}
|
||||||
|
|
||||||
|
if reader, ok := body.(io.Reader); ok {
|
||||||
|
_, err = bodyBuf.ReadFrom(reader)
|
||||||
|
} else if fp, ok := body.(*os.File); ok {
|
||||||
|
_, err = bodyBuf.ReadFrom(fp)
|
||||||
|
} else if b, ok := body.([]byte); ok {
|
||||||
|
_, err = bodyBuf.Write(b)
|
||||||
|
} else if s, ok := body.(string); ok {
|
||||||
|
_, err = bodyBuf.WriteString(s)
|
||||||
|
} else if s, ok := body.(*string); ok {
|
||||||
|
_, err = bodyBuf.WriteString(*s)
|
||||||
|
} else if jsonCheck.MatchString(contentType) {
|
||||||
|
err = json.NewEncoder(bodyBuf).Encode(body)
|
||||||
|
} else if xmlCheck.MatchString(contentType) {
|
||||||
|
err = xml.NewEncoder(bodyBuf).Encode(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if bodyBuf.Len() == 0 {
|
||||||
|
err = fmt.Errorf("invalid body type %s", contentType)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return bodyBuf, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// detectContentType method is used to figure out `Request.Body` content type for request header
|
||||||
|
func detectContentType(body interface{}) string {
|
||||||
|
contentType := "text/plain; charset=utf-8"
|
||||||
|
kind := reflect.TypeOf(body).Kind()
|
||||||
|
|
||||||
|
switch kind {
|
||||||
|
case reflect.Struct, reflect.Map, reflect.Ptr:
|
||||||
|
contentType = "application/json; charset=utf-8"
|
||||||
|
case reflect.String:
|
||||||
|
contentType = "text/plain; charset=utf-8"
|
||||||
|
default:
|
||||||
|
if b, ok := body.([]byte); ok {
|
||||||
|
contentType = http.DetectContentType(b)
|
||||||
|
} else if kind == reflect.Slice {
|
||||||
|
contentType = "application/json; charset=utf-8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return contentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
|
||||||
|
type cacheControl map[string]string
|
||||||
|
|
||||||
|
func parseCacheControl(headers http.Header) cacheControl {
|
||||||
|
cc := cacheControl{}
|
||||||
|
ccHeader := headers.Get("Cache-Control")
|
||||||
|
for _, part := range strings.Split(ccHeader, ",") {
|
||||||
|
part = strings.Trim(part, " ")
|
||||||
|
if part == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if strings.ContainsRune(part, '=') {
|
||||||
|
keyval := strings.Split(part, "=")
|
||||||
|
cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
|
||||||
|
} else {
|
||||||
|
cc[part] = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cc
|
||||||
|
}
|
||||||
|
|
||||||
|
// CacheExpires helper function to determine remaining time before repeating a request.
|
||||||
|
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)
|
||||||
|
}
|
||||||
38
pkg/albbeta/configuration.go
Normal file
38
pkg/albbeta/configuration.go
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/stackitcloud/stackit-sdk-go/core/config"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewConfiguration returns a new Configuration object
|
||||||
|
func NewConfiguration() *config.Configuration {
|
||||||
|
cfg := &config.Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "stackit-sdk-go/albbeta",
|
||||||
|
Debug: false,
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: "https://alb.api.stackit.cloud",
|
||||||
|
Description: "No description provided",
|
||||||
|
Variables: map[string]config.ServerVariable{
|
||||||
|
"region": {
|
||||||
|
Description: "No description provided",
|
||||||
|
DefaultValue: "global",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]config.ServerConfigurations{},
|
||||||
|
}
|
||||||
|
return cfg
|
||||||
|
}
|
||||||
372
pkg/albbeta/model_active_health_check.go
Normal file
372
pkg/albbeta/model_active_health_check.go
Normal file
|
|
@ -0,0 +1,372 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the ActiveHealthCheck type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &ActiveHealthCheck{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for healthyThreshold
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isInteger
|
||||||
|
type ActiveHealthCheckGetHealthyThresholdAttributeType = *int64
|
||||||
|
type ActiveHealthCheckGetHealthyThresholdArgType = int64
|
||||||
|
type ActiveHealthCheckGetHealthyThresholdRetType = int64
|
||||||
|
|
||||||
|
func getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(arg ActiveHealthCheckGetHealthyThresholdAttributeType) (ret ActiveHealthCheckGetHealthyThresholdRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setActiveHealthCheckGetHealthyThresholdAttributeType(arg *ActiveHealthCheckGetHealthyThresholdAttributeType, val ActiveHealthCheckGetHealthyThresholdRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for httpHealthChecks
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type ActiveHealthCheckGetHttpHealthChecksAttributeType = *HttpHealthChecks
|
||||||
|
type ActiveHealthCheckGetHttpHealthChecksArgType = HttpHealthChecks
|
||||||
|
type ActiveHealthCheckGetHttpHealthChecksRetType = HttpHealthChecks
|
||||||
|
|
||||||
|
func getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(arg ActiveHealthCheckGetHttpHealthChecksAttributeType) (ret ActiveHealthCheckGetHttpHealthChecksRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setActiveHealthCheckGetHttpHealthChecksAttributeType(arg *ActiveHealthCheckGetHttpHealthChecksAttributeType, val ActiveHealthCheckGetHttpHealthChecksRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for interval
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ActiveHealthCheckGetIntervalAttributeType = *string
|
||||||
|
|
||||||
|
func getActiveHealthCheckGetIntervalAttributeTypeOk(arg ActiveHealthCheckGetIntervalAttributeType) (ret ActiveHealthCheckGetIntervalRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setActiveHealthCheckGetIntervalAttributeType(arg *ActiveHealthCheckGetIntervalAttributeType, val ActiveHealthCheckGetIntervalRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ActiveHealthCheckGetIntervalArgType = string
|
||||||
|
type ActiveHealthCheckGetIntervalRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for intervalJitter
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ActiveHealthCheckGetIntervalJitterAttributeType = *string
|
||||||
|
|
||||||
|
func getActiveHealthCheckGetIntervalJitterAttributeTypeOk(arg ActiveHealthCheckGetIntervalJitterAttributeType) (ret ActiveHealthCheckGetIntervalJitterRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setActiveHealthCheckGetIntervalJitterAttributeType(arg *ActiveHealthCheckGetIntervalJitterAttributeType, val ActiveHealthCheckGetIntervalJitterRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ActiveHealthCheckGetIntervalJitterArgType = string
|
||||||
|
type ActiveHealthCheckGetIntervalJitterRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for timeout
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ActiveHealthCheckGetTimeoutAttributeType = *string
|
||||||
|
|
||||||
|
func getActiveHealthCheckGetTimeoutAttributeTypeOk(arg ActiveHealthCheckGetTimeoutAttributeType) (ret ActiveHealthCheckGetTimeoutRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setActiveHealthCheckGetTimeoutAttributeType(arg *ActiveHealthCheckGetTimeoutAttributeType, val ActiveHealthCheckGetTimeoutRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ActiveHealthCheckGetTimeoutArgType = string
|
||||||
|
type ActiveHealthCheckGetTimeoutRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for unhealthyThreshold
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isInteger
|
||||||
|
type ActiveHealthCheckGetUnhealthyThresholdAttributeType = *int64
|
||||||
|
type ActiveHealthCheckGetUnhealthyThresholdArgType = int64
|
||||||
|
type ActiveHealthCheckGetUnhealthyThresholdRetType = int64
|
||||||
|
|
||||||
|
func getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(arg ActiveHealthCheckGetUnhealthyThresholdAttributeType) (ret ActiveHealthCheckGetUnhealthyThresholdRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setActiveHealthCheckGetUnhealthyThresholdAttributeType(arg *ActiveHealthCheckGetUnhealthyThresholdAttributeType, val ActiveHealthCheckGetUnhealthyThresholdRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// ActiveHealthCheck struct for ActiveHealthCheck
|
||||||
|
type ActiveHealthCheck struct {
|
||||||
|
// Healthy threshold of the health checking
|
||||||
|
// Can be cast to int32 without loss of precision.
|
||||||
|
HealthyThreshold ActiveHealthCheckGetHealthyThresholdAttributeType `json:"healthyThreshold,omitempty"`
|
||||||
|
HttpHealthChecks ActiveHealthCheckGetHttpHealthChecksAttributeType `json:"httpHealthChecks,omitempty"`
|
||||||
|
// Interval duration of health checking in seconds
|
||||||
|
Interval ActiveHealthCheckGetIntervalAttributeType `json:"interval,omitempty"`
|
||||||
|
// Interval duration threshold of the health checking in seconds
|
||||||
|
IntervalJitter ActiveHealthCheckGetIntervalJitterAttributeType `json:"intervalJitter,omitempty"`
|
||||||
|
// Active health checking timeout duration in seconds
|
||||||
|
Timeout ActiveHealthCheckGetTimeoutAttributeType `json:"timeout,omitempty"`
|
||||||
|
// Unhealthy threshold of the health checking
|
||||||
|
// Can be cast to int32 without loss of precision.
|
||||||
|
UnhealthyThreshold ActiveHealthCheckGetUnhealthyThresholdAttributeType `json:"unhealthyThreshold,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewActiveHealthCheck instantiates a new ActiveHealthCheck object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewActiveHealthCheck() *ActiveHealthCheck {
|
||||||
|
this := ActiveHealthCheck{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewActiveHealthCheckWithDefaults instantiates a new ActiveHealthCheck object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewActiveHealthCheckWithDefaults() *ActiveHealthCheck {
|
||||||
|
this := ActiveHealthCheck{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetHealthyThreshold returns the HealthyThreshold field value if set, zero value otherwise.
|
||||||
|
func (o *ActiveHealthCheck) GetHealthyThreshold() (res ActiveHealthCheckGetHealthyThresholdRetType) {
|
||||||
|
res, _ = o.GetHealthyThresholdOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetHealthyThresholdOk returns a tuple with the HealthyThreshold field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ActiveHealthCheck) GetHealthyThresholdOk() (ret ActiveHealthCheckGetHealthyThresholdRetType, ok bool) {
|
||||||
|
return getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(o.HealthyThreshold)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasHealthyThreshold returns a boolean if a field has been set.
|
||||||
|
func (o *ActiveHealthCheck) HasHealthyThreshold() bool {
|
||||||
|
_, ok := o.GetHealthyThresholdOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHealthyThreshold gets a reference to the given int64 and assigns it to the HealthyThreshold field.
|
||||||
|
func (o *ActiveHealthCheck) SetHealthyThreshold(v ActiveHealthCheckGetHealthyThresholdRetType) {
|
||||||
|
setActiveHealthCheckGetHealthyThresholdAttributeType(&o.HealthyThreshold, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetHttpHealthChecks returns the HttpHealthChecks field value if set, zero value otherwise.
|
||||||
|
func (o *ActiveHealthCheck) GetHttpHealthChecks() (res ActiveHealthCheckGetHttpHealthChecksRetType) {
|
||||||
|
res, _ = o.GetHttpHealthChecksOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetHttpHealthChecksOk returns a tuple with the HttpHealthChecks field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ActiveHealthCheck) GetHttpHealthChecksOk() (ret ActiveHealthCheckGetHttpHealthChecksRetType, ok bool) {
|
||||||
|
return getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(o.HttpHealthChecks)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasHttpHealthChecks returns a boolean if a field has been set.
|
||||||
|
func (o *ActiveHealthCheck) HasHttpHealthChecks() bool {
|
||||||
|
_, ok := o.GetHttpHealthChecksOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHttpHealthChecks gets a reference to the given HttpHealthChecks and assigns it to the HttpHealthChecks field.
|
||||||
|
func (o *ActiveHealthCheck) SetHttpHealthChecks(v ActiveHealthCheckGetHttpHealthChecksRetType) {
|
||||||
|
setActiveHealthCheckGetHttpHealthChecksAttributeType(&o.HttpHealthChecks, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetInterval returns the Interval field value if set, zero value otherwise.
|
||||||
|
func (o *ActiveHealthCheck) GetInterval() (res ActiveHealthCheckGetIntervalRetType) {
|
||||||
|
res, _ = o.GetIntervalOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ActiveHealthCheck) GetIntervalOk() (ret ActiveHealthCheckGetIntervalRetType, ok bool) {
|
||||||
|
return getActiveHealthCheckGetIntervalAttributeTypeOk(o.Interval)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasInterval returns a boolean if a field has been set.
|
||||||
|
func (o *ActiveHealthCheck) HasInterval() bool {
|
||||||
|
_, ok := o.GetIntervalOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetInterval gets a reference to the given string and assigns it to the Interval field.
|
||||||
|
func (o *ActiveHealthCheck) SetInterval(v ActiveHealthCheckGetIntervalRetType) {
|
||||||
|
setActiveHealthCheckGetIntervalAttributeType(&o.Interval, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetIntervalJitter returns the IntervalJitter field value if set, zero value otherwise.
|
||||||
|
func (o *ActiveHealthCheck) GetIntervalJitter() (res ActiveHealthCheckGetIntervalJitterRetType) {
|
||||||
|
res, _ = o.GetIntervalJitterOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetIntervalJitterOk returns a tuple with the IntervalJitter field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ActiveHealthCheck) GetIntervalJitterOk() (ret ActiveHealthCheckGetIntervalJitterRetType, ok bool) {
|
||||||
|
return getActiveHealthCheckGetIntervalJitterAttributeTypeOk(o.IntervalJitter)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasIntervalJitter returns a boolean if a field has been set.
|
||||||
|
func (o *ActiveHealthCheck) HasIntervalJitter() bool {
|
||||||
|
_, ok := o.GetIntervalJitterOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetIntervalJitter gets a reference to the given string and assigns it to the IntervalJitter field.
|
||||||
|
func (o *ActiveHealthCheck) SetIntervalJitter(v ActiveHealthCheckGetIntervalJitterRetType) {
|
||||||
|
setActiveHealthCheckGetIntervalJitterAttributeType(&o.IntervalJitter, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTimeout returns the Timeout field value if set, zero value otherwise.
|
||||||
|
func (o *ActiveHealthCheck) GetTimeout() (res ActiveHealthCheckGetTimeoutRetType) {
|
||||||
|
res, _ = o.GetTimeoutOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ActiveHealthCheck) GetTimeoutOk() (ret ActiveHealthCheckGetTimeoutRetType, ok bool) {
|
||||||
|
return getActiveHealthCheckGetTimeoutAttributeTypeOk(o.Timeout)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasTimeout returns a boolean if a field has been set.
|
||||||
|
func (o *ActiveHealthCheck) HasTimeout() bool {
|
||||||
|
_, ok := o.GetTimeoutOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout gets a reference to the given string and assigns it to the Timeout field.
|
||||||
|
func (o *ActiveHealthCheck) SetTimeout(v ActiveHealthCheckGetTimeoutRetType) {
|
||||||
|
setActiveHealthCheckGetTimeoutAttributeType(&o.Timeout, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUnhealthyThreshold returns the UnhealthyThreshold field value if set, zero value otherwise.
|
||||||
|
func (o *ActiveHealthCheck) GetUnhealthyThreshold() (res ActiveHealthCheckGetUnhealthyThresholdRetType) {
|
||||||
|
res, _ = o.GetUnhealthyThresholdOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUnhealthyThresholdOk returns a tuple with the UnhealthyThreshold field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ActiveHealthCheck) GetUnhealthyThresholdOk() (ret ActiveHealthCheckGetUnhealthyThresholdRetType, ok bool) {
|
||||||
|
return getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(o.UnhealthyThreshold)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasUnhealthyThreshold returns a boolean if a field has been set.
|
||||||
|
func (o *ActiveHealthCheck) HasUnhealthyThreshold() bool {
|
||||||
|
_, ok := o.GetUnhealthyThresholdOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUnhealthyThreshold gets a reference to the given int64 and assigns it to the UnhealthyThreshold field.
|
||||||
|
func (o *ActiveHealthCheck) SetUnhealthyThreshold(v ActiveHealthCheckGetUnhealthyThresholdRetType) {
|
||||||
|
setActiveHealthCheckGetUnhealthyThresholdAttributeType(&o.UnhealthyThreshold, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o ActiveHealthCheck) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getActiveHealthCheckGetHealthyThresholdAttributeTypeOk(o.HealthyThreshold); ok {
|
||||||
|
toSerialize["HealthyThreshold"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getActiveHealthCheckGetHttpHealthChecksAttributeTypeOk(o.HttpHealthChecks); ok {
|
||||||
|
toSerialize["HttpHealthChecks"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getActiveHealthCheckGetIntervalAttributeTypeOk(o.Interval); ok {
|
||||||
|
toSerialize["Interval"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getActiveHealthCheckGetIntervalJitterAttributeTypeOk(o.IntervalJitter); ok {
|
||||||
|
toSerialize["IntervalJitter"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getActiveHealthCheckGetTimeoutAttributeTypeOk(o.Timeout); ok {
|
||||||
|
toSerialize["Timeout"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getActiveHealthCheckGetUnhealthyThresholdAttributeTypeOk(o.UnhealthyThreshold); ok {
|
||||||
|
toSerialize["UnhealthyThreshold"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableActiveHealthCheck struct {
|
||||||
|
value *ActiveHealthCheck
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableActiveHealthCheck) Get() *ActiveHealthCheck {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableActiveHealthCheck) Set(val *ActiveHealthCheck) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableActiveHealthCheck) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableActiveHealthCheck) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableActiveHealthCheck(val *ActiveHealthCheck) *NullableActiveHealthCheck {
|
||||||
|
return &NullableActiveHealthCheck{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableActiveHealthCheck) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableActiveHealthCheck) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_active_health_check_test.go
Normal file
11
pkg/albbeta/model_active_health_check_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
128
pkg/albbeta/model_certificate_config.go
Normal file
128
pkg/albbeta/model_certificate_config.go
Normal file
|
|
@ -0,0 +1,128 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CertificateConfig type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CertificateConfig{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for certificateIds
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type CertificateConfigGetCertificateIdsAttributeType = *[]string
|
||||||
|
type CertificateConfigGetCertificateIdsArgType = []string
|
||||||
|
type CertificateConfigGetCertificateIdsRetType = []string
|
||||||
|
|
||||||
|
func getCertificateConfigGetCertificateIdsAttributeTypeOk(arg CertificateConfigGetCertificateIdsAttributeType) (ret CertificateConfigGetCertificateIdsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCertificateConfigGetCertificateIdsAttributeType(arg *CertificateConfigGetCertificateIdsAttributeType, val CertificateConfigGetCertificateIdsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// CertificateConfig TLS termination certificate configuration.
|
||||||
|
type CertificateConfig struct {
|
||||||
|
// Certificate IDs for TLS termination.
|
||||||
|
CertificateIds CertificateConfigGetCertificateIdsAttributeType `json:"certificateIds,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCertificateConfig instantiates a new CertificateConfig object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewCertificateConfig() *CertificateConfig {
|
||||||
|
this := CertificateConfig{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCertificateConfigWithDefaults instantiates a new CertificateConfig object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewCertificateConfigWithDefaults() *CertificateConfig {
|
||||||
|
this := CertificateConfig{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCertificateIds returns the CertificateIds field value if set, zero value otherwise.
|
||||||
|
func (o *CertificateConfig) GetCertificateIds() (res CertificateConfigGetCertificateIdsRetType) {
|
||||||
|
res, _ = o.GetCertificateIdsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCertificateIdsOk returns a tuple with the CertificateIds field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CertificateConfig) GetCertificateIdsOk() (ret CertificateConfigGetCertificateIdsRetType, ok bool) {
|
||||||
|
return getCertificateConfigGetCertificateIdsAttributeTypeOk(o.CertificateIds)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasCertificateIds returns a boolean if a field has been set.
|
||||||
|
func (o *CertificateConfig) HasCertificateIds() bool {
|
||||||
|
_, ok := o.GetCertificateIdsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCertificateIds gets a reference to the given []string and assigns it to the CertificateIds field.
|
||||||
|
func (o *CertificateConfig) SetCertificateIds(v CertificateConfigGetCertificateIdsRetType) {
|
||||||
|
setCertificateConfigGetCertificateIdsAttributeType(&o.CertificateIds, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o CertificateConfig) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getCertificateConfigGetCertificateIdsAttributeTypeOk(o.CertificateIds); ok {
|
||||||
|
toSerialize["CertificateIds"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableCertificateConfig struct {
|
||||||
|
value *CertificateConfig
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCertificateConfig) Get() *CertificateConfig {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCertificateConfig) Set(val *CertificateConfig) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCertificateConfig) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCertificateConfig) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableCertificateConfig(val *CertificateConfig) *NullableCertificateConfig {
|
||||||
|
return &NullableCertificateConfig{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCertificateConfig) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCertificateConfig) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_certificate_config_test.go
Normal file
11
pkg/albbeta/model_certificate_config_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
178
pkg/albbeta/model_cookie_persistence.go
Normal file
178
pkg/albbeta/model_cookie_persistence.go
Normal file
|
|
@ -0,0 +1,178 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CookiePersistence type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CookiePersistence{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CookiePersistenceGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getCookiePersistenceGetNameAttributeTypeOk(arg CookiePersistenceGetNameAttributeType) (ret CookiePersistenceGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCookiePersistenceGetNameAttributeType(arg *CookiePersistenceGetNameAttributeType, val CookiePersistenceGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CookiePersistenceGetNameArgType = string
|
||||||
|
type CookiePersistenceGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for ttl
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CookiePersistenceGetTtlAttributeType = *string
|
||||||
|
|
||||||
|
func getCookiePersistenceGetTtlAttributeTypeOk(arg CookiePersistenceGetTtlAttributeType) (ret CookiePersistenceGetTtlRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCookiePersistenceGetTtlAttributeType(arg *CookiePersistenceGetTtlAttributeType, val CookiePersistenceGetTtlRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CookiePersistenceGetTtlArgType = string
|
||||||
|
type CookiePersistenceGetTtlRetType = string
|
||||||
|
|
||||||
|
// CookiePersistence struct for CookiePersistence
|
||||||
|
type CookiePersistence struct {
|
||||||
|
// Cookie is the name of the cookie to use.
|
||||||
|
Name CookiePersistenceGetNameAttributeType `json:"name,omitempty"`
|
||||||
|
// TTL specifies the time-to-live for the cookie. The default value is 0s, and it acts as a session cookie, expiring when the client session ends.
|
||||||
|
Ttl CookiePersistenceGetTtlAttributeType `json:"ttl,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCookiePersistence instantiates a new CookiePersistence object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewCookiePersistence() *CookiePersistence {
|
||||||
|
this := CookiePersistence{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCookiePersistenceWithDefaults instantiates a new CookiePersistence object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewCookiePersistenceWithDefaults() *CookiePersistence {
|
||||||
|
this := CookiePersistence{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value if set, zero value otherwise.
|
||||||
|
func (o *CookiePersistence) GetName() (res CookiePersistenceGetNameRetType) {
|
||||||
|
res, _ = o.GetNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CookiePersistence) GetNameOk() (ret CookiePersistenceGetNameRetType, ok bool) {
|
||||||
|
return getCookiePersistenceGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasName returns a boolean if a field has been set.
|
||||||
|
func (o *CookiePersistence) HasName() bool {
|
||||||
|
_, ok := o.GetNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
func (o *CookiePersistence) SetName(v CookiePersistenceGetNameRetType) {
|
||||||
|
setCookiePersistenceGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTtl returns the Ttl field value if set, zero value otherwise.
|
||||||
|
func (o *CookiePersistence) GetTtl() (res CookiePersistenceGetTtlRetType) {
|
||||||
|
res, _ = o.GetTtlOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CookiePersistence) GetTtlOk() (ret CookiePersistenceGetTtlRetType, ok bool) {
|
||||||
|
return getCookiePersistenceGetTtlAttributeTypeOk(o.Ttl)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasTtl returns a boolean if a field has been set.
|
||||||
|
func (o *CookiePersistence) HasTtl() bool {
|
||||||
|
_, ok := o.GetTtlOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTtl gets a reference to the given string and assigns it to the Ttl field.
|
||||||
|
func (o *CookiePersistence) SetTtl(v CookiePersistenceGetTtlRetType) {
|
||||||
|
setCookiePersistenceGetTtlAttributeType(&o.Ttl, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o CookiePersistence) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getCookiePersistenceGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCookiePersistenceGetTtlAttributeTypeOk(o.Ttl); ok {
|
||||||
|
toSerialize["Ttl"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableCookiePersistence struct {
|
||||||
|
value *CookiePersistence
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCookiePersistence) Get() *CookiePersistence {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCookiePersistence) Set(val *CookiePersistence) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCookiePersistence) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCookiePersistence) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableCookiePersistence(val *CookiePersistence) *NullableCookiePersistence {
|
||||||
|
return &NullableCookiePersistence{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCookiePersistence) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCookiePersistence) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_cookie_persistence_test.go
Normal file
11
pkg/albbeta/model_cookie_persistence_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
227
pkg/albbeta/model_create_credentials_payload.go
Normal file
227
pkg/albbeta/model_create_credentials_payload.go
Normal file
|
|
@ -0,0 +1,227 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CreateCredentialsPayload type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CreateCredentialsPayload{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for displayName
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateCredentialsPayloadGetDisplayNameAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(arg CreateCredentialsPayloadGetDisplayNameAttributeType) (ret CreateCredentialsPayloadGetDisplayNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateCredentialsPayloadGetDisplayNameAttributeType(arg *CreateCredentialsPayloadGetDisplayNameAttributeType, val CreateCredentialsPayloadGetDisplayNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateCredentialsPayloadGetDisplayNameArgType = string
|
||||||
|
type CreateCredentialsPayloadGetDisplayNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for password
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateCredentialsPayloadGetPasswordAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateCredentialsPayloadGetPasswordAttributeTypeOk(arg CreateCredentialsPayloadGetPasswordAttributeType) (ret CreateCredentialsPayloadGetPasswordRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateCredentialsPayloadGetPasswordAttributeType(arg *CreateCredentialsPayloadGetPasswordAttributeType, val CreateCredentialsPayloadGetPasswordRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateCredentialsPayloadGetPasswordArgType = string
|
||||||
|
type CreateCredentialsPayloadGetPasswordRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for username
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateCredentialsPayloadGetUsernameAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateCredentialsPayloadGetUsernameAttributeTypeOk(arg CreateCredentialsPayloadGetUsernameAttributeType) (ret CreateCredentialsPayloadGetUsernameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateCredentialsPayloadGetUsernameAttributeType(arg *CreateCredentialsPayloadGetUsernameAttributeType, val CreateCredentialsPayloadGetUsernameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateCredentialsPayloadGetUsernameArgType = string
|
||||||
|
type CreateCredentialsPayloadGetUsernameRetType = string
|
||||||
|
|
||||||
|
// CreateCredentialsPayload struct for CreateCredentialsPayload
|
||||||
|
type CreateCredentialsPayload struct {
|
||||||
|
// Credential name
|
||||||
|
DisplayName CreateCredentialsPayloadGetDisplayNameAttributeType `json:"displayName,omitempty"`
|
||||||
|
// A valid password used for an existing STACKIT Observability instance, which is used during basic auth.
|
||||||
|
Password CreateCredentialsPayloadGetPasswordAttributeType `json:"password,omitempty"`
|
||||||
|
// A valid username used for an existing STACKIT Observability instance, which is used during basic auth.
|
||||||
|
Username CreateCredentialsPayloadGetUsernameAttributeType `json:"username,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCredentialsPayload instantiates a new CreateCredentialsPayload object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewCreateCredentialsPayload() *CreateCredentialsPayload {
|
||||||
|
this := CreateCredentialsPayload{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCredentialsPayloadWithDefaults instantiates a new CreateCredentialsPayload object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewCreateCredentialsPayloadWithDefaults() *CreateCredentialsPayload {
|
||||||
|
this := CreateCredentialsPayload{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
||||||
|
func (o *CreateCredentialsPayload) GetDisplayName() (res CreateCredentialsPayloadGetDisplayNameRetType) {
|
||||||
|
res, _ = o.GetDisplayNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateCredentialsPayload) GetDisplayNameOk() (ret CreateCredentialsPayloadGetDisplayNameRetType, ok bool) {
|
||||||
|
return getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasDisplayName returns a boolean if a field has been set.
|
||||||
|
func (o *CreateCredentialsPayload) HasDisplayName() bool {
|
||||||
|
_, ok := o.GetDisplayNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
|
||||||
|
func (o *CreateCredentialsPayload) SetDisplayName(v CreateCredentialsPayloadGetDisplayNameRetType) {
|
||||||
|
setCreateCredentialsPayloadGetDisplayNameAttributeType(&o.DisplayName, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPassword returns the Password field value if set, zero value otherwise.
|
||||||
|
func (o *CreateCredentialsPayload) GetPassword() (res CreateCredentialsPayloadGetPasswordRetType) {
|
||||||
|
res, _ = o.GetPasswordOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateCredentialsPayload) GetPasswordOk() (ret CreateCredentialsPayloadGetPasswordRetType, ok bool) {
|
||||||
|
return getCreateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPassword returns a boolean if a field has been set.
|
||||||
|
func (o *CreateCredentialsPayload) HasPassword() bool {
|
||||||
|
_, ok := o.GetPasswordOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPassword gets a reference to the given string and assigns it to the Password field.
|
||||||
|
func (o *CreateCredentialsPayload) SetPassword(v CreateCredentialsPayloadGetPasswordRetType) {
|
||||||
|
setCreateCredentialsPayloadGetPasswordAttributeType(&o.Password, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUsername returns the Username field value if set, zero value otherwise.
|
||||||
|
func (o *CreateCredentialsPayload) GetUsername() (res CreateCredentialsPayloadGetUsernameRetType) {
|
||||||
|
res, _ = o.GetUsernameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateCredentialsPayload) GetUsernameOk() (ret CreateCredentialsPayloadGetUsernameRetType, ok bool) {
|
||||||
|
return getCreateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasUsername returns a boolean if a field has been set.
|
||||||
|
func (o *CreateCredentialsPayload) HasUsername() bool {
|
||||||
|
_, ok := o.GetUsernameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUsername gets a reference to the given string and assigns it to the Username field.
|
||||||
|
func (o *CreateCredentialsPayload) SetUsername(v CreateCredentialsPayloadGetUsernameRetType) {
|
||||||
|
setCreateCredentialsPayloadGetUsernameAttributeType(&o.Username, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o CreateCredentialsPayload) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getCreateCredentialsPayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
|
||||||
|
toSerialize["DisplayName"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateCredentialsPayloadGetPasswordAttributeTypeOk(o.Password); ok {
|
||||||
|
toSerialize["Password"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateCredentialsPayloadGetUsernameAttributeTypeOk(o.Username); ok {
|
||||||
|
toSerialize["Username"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableCreateCredentialsPayload struct {
|
||||||
|
value *CreateCredentialsPayload
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateCredentialsPayload) Get() *CreateCredentialsPayload {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateCredentialsPayload) Set(val *CreateCredentialsPayload) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateCredentialsPayload) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateCredentialsPayload) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableCreateCredentialsPayload(val *CreateCredentialsPayload) *NullableCreateCredentialsPayload {
|
||||||
|
return &NullableCreateCredentialsPayload{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateCredentialsPayload) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateCredentialsPayload) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_create_credentials_payload_test.go
Normal file
11
pkg/albbeta/model_create_credentials_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
127
pkg/albbeta/model_create_credentials_response.go
Normal file
127
pkg/albbeta/model_create_credentials_response.go
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CreateCredentialsResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CreateCredentialsResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for credential
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type CreateCredentialsResponseGetCredentialAttributeType = *CredentialsResponse
|
||||||
|
type CreateCredentialsResponseGetCredentialArgType = CredentialsResponse
|
||||||
|
type CreateCredentialsResponseGetCredentialRetType = CredentialsResponse
|
||||||
|
|
||||||
|
func getCreateCredentialsResponseGetCredentialAttributeTypeOk(arg CreateCredentialsResponseGetCredentialAttributeType) (ret CreateCredentialsResponseGetCredentialRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateCredentialsResponseGetCredentialAttributeType(arg *CreateCredentialsResponseGetCredentialAttributeType, val CreateCredentialsResponseGetCredentialRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateCredentialsResponse struct for CreateCredentialsResponse
|
||||||
|
type CreateCredentialsResponse struct {
|
||||||
|
Credential CreateCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCredentialsResponse instantiates a new CreateCredentialsResponse object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewCreateCredentialsResponse() *CreateCredentialsResponse {
|
||||||
|
this := CreateCredentialsResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCredentialsResponseWithDefaults instantiates a new CreateCredentialsResponse object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewCreateCredentialsResponseWithDefaults() *CreateCredentialsResponse {
|
||||||
|
this := CreateCredentialsResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCredential returns the Credential field value if set, zero value otherwise.
|
||||||
|
func (o *CreateCredentialsResponse) GetCredential() (res CreateCredentialsResponseGetCredentialRetType) {
|
||||||
|
res, _ = o.GetCredentialOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateCredentialsResponse) GetCredentialOk() (ret CreateCredentialsResponseGetCredentialRetType, ok bool) {
|
||||||
|
return getCreateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasCredential returns a boolean if a field has been set.
|
||||||
|
func (o *CreateCredentialsResponse) HasCredential() bool {
|
||||||
|
_, ok := o.GetCredentialOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field.
|
||||||
|
func (o *CreateCredentialsResponse) SetCredential(v CreateCredentialsResponseGetCredentialRetType) {
|
||||||
|
setCreateCredentialsResponseGetCredentialAttributeType(&o.Credential, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o CreateCredentialsResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getCreateCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok {
|
||||||
|
toSerialize["Credential"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableCreateCredentialsResponse struct {
|
||||||
|
value *CreateCredentialsResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateCredentialsResponse) Get() *CreateCredentialsResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateCredentialsResponse) Set(val *CreateCredentialsResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateCredentialsResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateCredentialsResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableCreateCredentialsResponse(val *CreateCredentialsResponse) *NullableCreateCredentialsResponse {
|
||||||
|
return &NullableCreateCredentialsResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateCredentialsResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateCredentialsResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_create_credentials_response_test.go
Normal file
11
pkg/albbeta/model_create_credentials_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
961
pkg/albbeta/model_create_load_balancer_payload.go
Normal file
961
pkg/albbeta/model_create_load_balancer_payload.go
Normal file
|
|
@ -0,0 +1,961 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CreateLoadBalancerPayload type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CreateLoadBalancerPayload{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for disableTargetSecurityGroupAssignment
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isBoolean
|
||||||
|
type CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType = *bool
|
||||||
|
type CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentArgType = bool
|
||||||
|
type CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType = bool
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(arg CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType) (ret CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType(arg *CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType, val CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for errors
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type CreateLoadBalancerPayloadGetErrorsAttributeType = *[]LoadBalancerError
|
||||||
|
type CreateLoadBalancerPayloadGetErrorsArgType = []LoadBalancerError
|
||||||
|
type CreateLoadBalancerPayloadGetErrorsRetType = []LoadBalancerError
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(arg CreateLoadBalancerPayloadGetErrorsAttributeType) (ret CreateLoadBalancerPayloadGetErrorsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetErrorsAttributeType(arg *CreateLoadBalancerPayloadGetErrorsAttributeType, val CreateLoadBalancerPayloadGetErrorsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for externalAddress
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateLoadBalancerPayloadGetExternalAddressAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(arg CreateLoadBalancerPayloadGetExternalAddressAttributeType) (ret CreateLoadBalancerPayloadGetExternalAddressRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetExternalAddressAttributeType(arg *CreateLoadBalancerPayloadGetExternalAddressAttributeType, val CreateLoadBalancerPayloadGetExternalAddressRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadGetExternalAddressArgType = string
|
||||||
|
type CreateLoadBalancerPayloadGetExternalAddressRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for labels
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isContainer
|
||||||
|
type CreateLoadBalancerPayloadGetLabelsAttributeType = *map[string]string
|
||||||
|
type CreateLoadBalancerPayloadGetLabelsArgType = map[string]string
|
||||||
|
type CreateLoadBalancerPayloadGetLabelsRetType = map[string]string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetLabelsAttributeTypeOk(arg CreateLoadBalancerPayloadGetLabelsAttributeType) (ret CreateLoadBalancerPayloadGetLabelsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetLabelsAttributeType(arg *CreateLoadBalancerPayloadGetLabelsAttributeType, val CreateLoadBalancerPayloadGetLabelsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for listeners
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type CreateLoadBalancerPayloadGetListenersAttributeType = *[]Listener
|
||||||
|
type CreateLoadBalancerPayloadGetListenersArgType = []Listener
|
||||||
|
type CreateLoadBalancerPayloadGetListenersRetType = []Listener
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(arg CreateLoadBalancerPayloadGetListenersAttributeType) (ret CreateLoadBalancerPayloadGetListenersRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetListenersAttributeType(arg *CreateLoadBalancerPayloadGetListenersAttributeType, val CreateLoadBalancerPayloadGetListenersRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for loadBalancerSecurityGroup
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType = *CreateLoadBalancerPayloadLoadBalancerSecurityGroup
|
||||||
|
type CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupArgType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup
|
||||||
|
type CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(arg CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType) (ret CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(arg *CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType, val CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateLoadBalancerPayloadGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetNameAttributeTypeOk(arg CreateLoadBalancerPayloadGetNameAttributeType) (ret CreateLoadBalancerPayloadGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetNameAttributeType(arg *CreateLoadBalancerPayloadGetNameAttributeType, val CreateLoadBalancerPayloadGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadGetNameArgType = string
|
||||||
|
type CreateLoadBalancerPayloadGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for networks
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type CreateLoadBalancerPayloadGetNetworksAttributeType = *[]Network
|
||||||
|
type CreateLoadBalancerPayloadGetNetworksArgType = []Network
|
||||||
|
type CreateLoadBalancerPayloadGetNetworksRetType = []Network
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(arg CreateLoadBalancerPayloadGetNetworksAttributeType) (ret CreateLoadBalancerPayloadGetNetworksRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetNetworksAttributeType(arg *CreateLoadBalancerPayloadGetNetworksAttributeType, val CreateLoadBalancerPayloadGetNetworksRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for options
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type CreateLoadBalancerPayloadGetOptionsAttributeType = *LoadBalancerOptions
|
||||||
|
type CreateLoadBalancerPayloadGetOptionsArgType = LoadBalancerOptions
|
||||||
|
type CreateLoadBalancerPayloadGetOptionsRetType = LoadBalancerOptions
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(arg CreateLoadBalancerPayloadGetOptionsAttributeType) (ret CreateLoadBalancerPayloadGetOptionsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetOptionsAttributeType(arg *CreateLoadBalancerPayloadGetOptionsAttributeType, val CreateLoadBalancerPayloadGetOptionsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for planId
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateLoadBalancerPayloadGetPlanIdAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(arg CreateLoadBalancerPayloadGetPlanIdAttributeType) (ret CreateLoadBalancerPayloadGetPlanIdRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetPlanIdAttributeType(arg *CreateLoadBalancerPayloadGetPlanIdAttributeType, val CreateLoadBalancerPayloadGetPlanIdRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadGetPlanIdArgType = string
|
||||||
|
type CreateLoadBalancerPayloadGetPlanIdRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for privateAddress
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateLoadBalancerPayloadGetPrivateAddressAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(arg CreateLoadBalancerPayloadGetPrivateAddressAttributeType) (ret CreateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetPrivateAddressAttributeType(arg *CreateLoadBalancerPayloadGetPrivateAddressAttributeType, val CreateLoadBalancerPayloadGetPrivateAddressRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadGetPrivateAddressArgType = string
|
||||||
|
type CreateLoadBalancerPayloadGetPrivateAddressRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for region
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateLoadBalancerPayloadGetRegionAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetRegionAttributeTypeOk(arg CreateLoadBalancerPayloadGetRegionAttributeType) (ret CreateLoadBalancerPayloadGetRegionRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetRegionAttributeType(arg *CreateLoadBalancerPayloadGetRegionAttributeType, val CreateLoadBalancerPayloadGetRegionRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadGetRegionArgType = string
|
||||||
|
type CreateLoadBalancerPayloadGetRegionRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for status
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isEnum
|
||||||
|
|
||||||
|
// CreateLoadBalancerPayloadStatus the model 'CreateLoadBalancerPayload'
|
||||||
|
// value type for enums
|
||||||
|
type CreateLoadBalancerPayloadStatus string
|
||||||
|
|
||||||
|
// List of Status
|
||||||
|
const (
|
||||||
|
CREATELOADBALANCERPAYLOADSTATUS_UNSPECIFIED CreateLoadBalancerPayloadStatus = "STATUS_UNSPECIFIED"
|
||||||
|
CREATELOADBALANCERPAYLOADSTATUS_PENDING CreateLoadBalancerPayloadStatus = "STATUS_PENDING"
|
||||||
|
CREATELOADBALANCERPAYLOADSTATUS_READY CreateLoadBalancerPayloadStatus = "STATUS_READY"
|
||||||
|
CREATELOADBALANCERPAYLOADSTATUS_ERROR CreateLoadBalancerPayloadStatus = "STATUS_ERROR"
|
||||||
|
CREATELOADBALANCERPAYLOADSTATUS_TERMINATING CreateLoadBalancerPayloadStatus = "STATUS_TERMINATING"
|
||||||
|
)
|
||||||
|
|
||||||
|
// All allowed values of CreateLoadBalancerPayload enum
|
||||||
|
var AllowedCreateLoadBalancerPayloadStatusEnumValues = []CreateLoadBalancerPayloadStatus{
|
||||||
|
"STATUS_UNSPECIFIED",
|
||||||
|
"STATUS_PENDING",
|
||||||
|
"STATUS_READY",
|
||||||
|
"STATUS_ERROR",
|
||||||
|
"STATUS_TERMINATING",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *CreateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error {
|
||||||
|
// use a type alias to prevent infinite recursion during unmarshal,
|
||||||
|
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
|
||||||
|
type TmpJson CreateLoadBalancerPayloadStatus
|
||||||
|
var value TmpJson
|
||||||
|
err := json.Unmarshal(src, &value)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// Allow unmarshalling zero value for testing purposes
|
||||||
|
var zeroValue TmpJson
|
||||||
|
if value == zeroValue {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
enumTypeValue := CreateLoadBalancerPayloadStatus(value)
|
||||||
|
for _, existing := range AllowedCreateLoadBalancerPayloadStatusEnumValues {
|
||||||
|
if existing == enumTypeValue {
|
||||||
|
*v = enumTypeValue
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Errorf("%+v is not a valid CreateLoadBalancerPayload", value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateLoadBalancerPayloadStatusFromValue returns a pointer to a valid CreateLoadBalancerPayloadStatus
|
||||||
|
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||||
|
func NewCreateLoadBalancerPayloadStatusFromValue(v CreateLoadBalancerPayloadStatus) (*CreateLoadBalancerPayloadStatus, error) {
|
||||||
|
ev := CreateLoadBalancerPayloadStatus(v)
|
||||||
|
if ev.IsValid() {
|
||||||
|
return &ev, nil
|
||||||
|
} else {
|
||||||
|
return nil, fmt.Errorf("invalid value '%v' for CreateLoadBalancerPayloadStatus: valid values are %v", v, AllowedCreateLoadBalancerPayloadStatusEnumValues)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsValid return true if the value is valid for the enum, false otherwise
|
||||||
|
func (v CreateLoadBalancerPayloadStatus) IsValid() bool {
|
||||||
|
for _, existing := range AllowedCreateLoadBalancerPayloadStatusEnumValues {
|
||||||
|
if existing == v {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ptr returns reference to StatusStatus value
|
||||||
|
func (v CreateLoadBalancerPayloadStatus) Ptr() *CreateLoadBalancerPayloadStatus {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableCreateLoadBalancerPayloadStatus struct {
|
||||||
|
value *CreateLoadBalancerPayloadStatus
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayloadStatus) Get() *CreateLoadBalancerPayloadStatus {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayloadStatus) Set(val *CreateLoadBalancerPayloadStatus) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayloadStatus) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayloadStatus) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableCreateLoadBalancerPayloadStatus(val *CreateLoadBalancerPayloadStatus) *NullableCreateLoadBalancerPayloadStatus {
|
||||||
|
return &NullableCreateLoadBalancerPayloadStatus{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayloadStatus) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayloadStatus) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadGetStatusAttributeType = *CreateLoadBalancerPayloadStatus
|
||||||
|
type CreateLoadBalancerPayloadGetStatusArgType = CreateLoadBalancerPayloadStatus
|
||||||
|
type CreateLoadBalancerPayloadGetStatusRetType = CreateLoadBalancerPayloadStatus
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(arg CreateLoadBalancerPayloadGetStatusAttributeType) (ret CreateLoadBalancerPayloadGetStatusRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetStatusAttributeType(arg *CreateLoadBalancerPayloadGetStatusAttributeType, val CreateLoadBalancerPayloadGetStatusRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for targetPools
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type CreateLoadBalancerPayloadGetTargetPoolsAttributeType = *[]TargetPool
|
||||||
|
type CreateLoadBalancerPayloadGetTargetPoolsArgType = []TargetPool
|
||||||
|
type CreateLoadBalancerPayloadGetTargetPoolsRetType = []TargetPool
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(arg CreateLoadBalancerPayloadGetTargetPoolsAttributeType) (ret CreateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(arg *CreateLoadBalancerPayloadGetTargetPoolsAttributeType, val CreateLoadBalancerPayloadGetTargetPoolsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for targetSecurityGroup
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType = *CreateLoadBalancerPayloadTargetSecurityGroup
|
||||||
|
type CreateLoadBalancerPayloadGetTargetSecurityGroupArgType = CreateLoadBalancerPayloadTargetSecurityGroup
|
||||||
|
type CreateLoadBalancerPayloadGetTargetSecurityGroupRetType = CreateLoadBalancerPayloadTargetSecurityGroup
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(arg CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType) (ret CreateLoadBalancerPayloadGetTargetSecurityGroupRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(arg *CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType, val CreateLoadBalancerPayloadGetTargetSecurityGroupRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for version
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateLoadBalancerPayloadGetVersionAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(arg CreateLoadBalancerPayloadGetVersionAttributeType) (ret CreateLoadBalancerPayloadGetVersionRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadGetVersionAttributeType(arg *CreateLoadBalancerPayloadGetVersionAttributeType, val CreateLoadBalancerPayloadGetVersionRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadGetVersionArgType = string
|
||||||
|
type CreateLoadBalancerPayloadGetVersionRetType = string
|
||||||
|
|
||||||
|
// CreateLoadBalancerPayload struct for CreateLoadBalancerPayload
|
||||||
|
type CreateLoadBalancerPayload struct {
|
||||||
|
// Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation.
|
||||||
|
DisableTargetSecurityGroupAssignment CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType `json:"disableTargetSecurityGroupAssignment,omitempty"`
|
||||||
|
// Reports all errors a application load balancer has.
|
||||||
|
Errors CreateLoadBalancerPayloadGetErrorsAttributeType `json:"errors,omitempty"`
|
||||||
|
// External application load balancer IP address where this application load balancer is exposed. Not changeable after creation.
|
||||||
|
ExternalAddress CreateLoadBalancerPayloadGetExternalAddressAttributeType `json:"externalAddress,omitempty"`
|
||||||
|
// Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per ALB. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between.
|
||||||
|
Labels CreateLoadBalancerPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||||
|
// There is a maximum listener count of 20.
|
||||||
|
Listeners CreateLoadBalancerPayloadGetListenersAttributeType `json:"listeners,omitempty"`
|
||||||
|
LoadBalancerSecurityGroup CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"`
|
||||||
|
// Application Load Balancer name. Not changeable after creation.
|
||||||
|
Name CreateLoadBalancerPayloadGetNameAttributeType `json:"name,omitempty"`
|
||||||
|
// List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation.
|
||||||
|
Networks CreateLoadBalancerPayloadGetNetworksAttributeType `json:"networks,omitempty"`
|
||||||
|
Options CreateLoadBalancerPayloadGetOptionsAttributeType `json:"options,omitempty"`
|
||||||
|
// Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum.
|
||||||
|
PlanId CreateLoadBalancerPayloadGetPlanIdAttributeType `json:"planId,omitempty"`
|
||||||
|
// Transient private application load balancer IP address that can change any time.
|
||||||
|
PrivateAddress CreateLoadBalancerPayloadGetPrivateAddressAttributeType `json:"privateAddress,omitempty"`
|
||||||
|
// Region of the LoadBalancer.
|
||||||
|
Region CreateLoadBalancerPayloadGetRegionAttributeType `json:"region,omitempty"`
|
||||||
|
Status CreateLoadBalancerPayloadGetStatusAttributeType `json:"status,omitempty"`
|
||||||
|
// List of all target pools which will be used in the application load balancer. Limited to 20.
|
||||||
|
TargetPools CreateLoadBalancerPayloadGetTargetPoolsAttributeType `json:"targetPools,omitempty"`
|
||||||
|
TargetSecurityGroup CreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType `json:"targetSecurityGroup,omitempty"`
|
||||||
|
// Application Load Balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this application load balancer resource that changes during updates of the load balancers. On updates this field specified the application load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a application load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case.
|
||||||
|
Version CreateLoadBalancerPayloadGetVersionAttributeType `json:"version,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateLoadBalancerPayload instantiates a new CreateLoadBalancerPayload object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewCreateLoadBalancerPayload() *CreateLoadBalancerPayload {
|
||||||
|
this := CreateLoadBalancerPayload{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateLoadBalancerPayloadWithDefaults instantiates a new CreateLoadBalancerPayload object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewCreateLoadBalancerPayloadWithDefaults() *CreateLoadBalancerPayload {
|
||||||
|
this := CreateLoadBalancerPayload{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignment() (res CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) {
|
||||||
|
res, _ = o.GetDisableTargetSecurityGroupAssignmentOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetDisableTargetSecurityGroupAssignmentOk() (ret CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasDisableTargetSecurityGroupAssignment() bool {
|
||||||
|
_, ok := o.GetDisableTargetSecurityGroupAssignmentOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetDisableTargetSecurityGroupAssignment(v CreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentRetType) {
|
||||||
|
setCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeType(&o.DisableTargetSecurityGroupAssignment, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetErrors returns the Errors field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetErrors() (res CreateLoadBalancerPayloadGetErrorsRetType) {
|
||||||
|
res, _ = o.GetErrorsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetErrorsOk() (ret CreateLoadBalancerPayloadGetErrorsRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasErrors returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasErrors() bool {
|
||||||
|
_, ok := o.GetErrorsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetErrors(v CreateLoadBalancerPayloadGetErrorsRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetErrorsAttributeType(&o.Errors, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetExternalAddress() (res CreateLoadBalancerPayloadGetExternalAddressRetType) {
|
||||||
|
res, _ = o.GetExternalAddressOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetExternalAddressOk() (ret CreateLoadBalancerPayloadGetExternalAddressRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasExternalAddress returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasExternalAddress() bool {
|
||||||
|
_, ok := o.GetExternalAddressOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetExternalAddress(v CreateLoadBalancerPayloadGetExternalAddressRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetExternalAddressAttributeType(&o.ExternalAddress, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetLabels() (res CreateLoadBalancerPayloadGetLabelsRetType) {
|
||||||
|
res, _ = o.GetLabelsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetLabelsOk() (ret CreateLoadBalancerPayloadGetLabelsRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasLabels returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasLabels() bool {
|
||||||
|
_, ok := o.GetLabelsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetLabels(v CreateLoadBalancerPayloadGetLabelsRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListeners returns the Listeners field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetListeners() (res CreateLoadBalancerPayloadGetListenersRetType) {
|
||||||
|
res, _ = o.GetListenersOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetListenersOk() (ret CreateLoadBalancerPayloadGetListenersRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasListeners returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasListeners() bool {
|
||||||
|
_, ok := o.GetListenersOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetListeners(v CreateLoadBalancerPayloadGetListenersRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetListenersAttributeType(&o.Listeners, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroup() (res CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) {
|
||||||
|
res, _ = o.GetLoadBalancerSecurityGroupOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetLoadBalancerSecurityGroupOk() (ret CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasLoadBalancerSecurityGroup returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasLoadBalancerSecurityGroup() bool {
|
||||||
|
_, ok := o.GetLoadBalancerSecurityGroupOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLoadBalancerSecurityGroup gets a reference to the given CreateLoadBalancerPayloadLoadBalancerSecurityGroup and assigns it to the LoadBalancerSecurityGroup field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetLoadBalancerSecurityGroup(v CreateLoadBalancerPayloadGetLoadBalancerSecurityGroupRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeType(&o.LoadBalancerSecurityGroup, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetName() (res CreateLoadBalancerPayloadGetNameRetType) {
|
||||||
|
res, _ = o.GetNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetNameOk() (ret CreateLoadBalancerPayloadGetNameRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasName returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasName() bool {
|
||||||
|
_, ok := o.GetNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetName(v CreateLoadBalancerPayloadGetNameRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNetworks returns the Networks field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetNetworks() (res CreateLoadBalancerPayloadGetNetworksRetType) {
|
||||||
|
res, _ = o.GetNetworksOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetNetworksOk() (ret CreateLoadBalancerPayloadGetNetworksRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasNetworks returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasNetworks() bool {
|
||||||
|
_, ok := o.GetNetworksOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetNetworks gets a reference to the given []Network and assigns it to the Networks field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetNetworks(v CreateLoadBalancerPayloadGetNetworksRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetNetworksAttributeType(&o.Networks, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOptions returns the Options field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetOptions() (res CreateLoadBalancerPayloadGetOptionsRetType) {
|
||||||
|
res, _ = o.GetOptionsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetOptionsOk() (ret CreateLoadBalancerPayloadGetOptionsRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasOptions returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasOptions() bool {
|
||||||
|
_, ok := o.GetOptionsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetOptions(v CreateLoadBalancerPayloadGetOptionsRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetOptionsAttributeType(&o.Options, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPlanId returns the PlanId field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetPlanId() (res CreateLoadBalancerPayloadGetPlanIdRetType) {
|
||||||
|
res, _ = o.GetPlanIdOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetPlanIdOk() (ret CreateLoadBalancerPayloadGetPlanIdRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPlanId returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasPlanId() bool {
|
||||||
|
_, ok := o.GetPlanIdOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPlanId gets a reference to the given string and assigns it to the PlanId field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetPlanId(v CreateLoadBalancerPayloadGetPlanIdRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetPlanIdAttributeType(&o.PlanId, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetPrivateAddress() (res CreateLoadBalancerPayloadGetPrivateAddressRetType) {
|
||||||
|
res, _ = o.GetPrivateAddressOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetPrivateAddressOk() (ret CreateLoadBalancerPayloadGetPrivateAddressRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPrivateAddress returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasPrivateAddress() bool {
|
||||||
|
_, ok := o.GetPrivateAddressOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetPrivateAddress(v CreateLoadBalancerPayloadGetPrivateAddressRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetPrivateAddressAttributeType(&o.PrivateAddress, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRegion returns the Region field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetRegion() (res CreateLoadBalancerPayloadGetRegionRetType) {
|
||||||
|
res, _ = o.GetRegionOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetRegionOk() (ret CreateLoadBalancerPayloadGetRegionRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetRegionAttributeTypeOk(o.Region)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasRegion returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasRegion() bool {
|
||||||
|
_, ok := o.GetRegionOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRegion gets a reference to the given string and assigns it to the Region field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetRegion(v CreateLoadBalancerPayloadGetRegionRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetRegionAttributeType(&o.Region, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetStatus() (res CreateLoadBalancerPayloadGetStatusRetType) {
|
||||||
|
res, _ = o.GetStatusOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetStatusOk() (ret CreateLoadBalancerPayloadGetStatusRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasStatus returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasStatus() bool {
|
||||||
|
_, ok := o.GetStatusOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetStatus(v CreateLoadBalancerPayloadGetStatusRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetStatusAttributeType(&o.Status, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTargetPools returns the TargetPools field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetTargetPools() (res CreateLoadBalancerPayloadGetTargetPoolsRetType) {
|
||||||
|
res, _ = o.GetTargetPoolsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetTargetPoolsOk() (ret CreateLoadBalancerPayloadGetTargetPoolsRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasTargetPools returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasTargetPools() bool {
|
||||||
|
_, ok := o.GetTargetPoolsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetTargetPools(v CreateLoadBalancerPayloadGetTargetPoolsRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetTargetPoolsAttributeType(&o.TargetPools, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetTargetSecurityGroup() (res CreateLoadBalancerPayloadGetTargetSecurityGroupRetType) {
|
||||||
|
res, _ = o.GetTargetSecurityGroupOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetTargetSecurityGroupOk() (ret CreateLoadBalancerPayloadGetTargetSecurityGroupRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasTargetSecurityGroup returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasTargetSecurityGroup() bool {
|
||||||
|
_, ok := o.GetTargetSecurityGroupOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTargetSecurityGroup gets a reference to the given CreateLoadBalancerPayloadTargetSecurityGroup and assigns it to the TargetSecurityGroup field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetTargetSecurityGroup(v CreateLoadBalancerPayloadGetTargetSecurityGroupRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeType(&o.TargetSecurityGroup, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetVersion() (res CreateLoadBalancerPayloadGetVersionRetType) {
|
||||||
|
res, _ = o.GetVersionOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) GetVersionOk() (ret CreateLoadBalancerPayloadGetVersionRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasVersion returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayload) HasVersion() bool {
|
||||||
|
_, ok := o.GetVersionOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetVersion gets a reference to the given string and assigns it to the Version field.
|
||||||
|
func (o *CreateLoadBalancerPayload) SetVersion(v CreateLoadBalancerPayloadGetVersionRetType) {
|
||||||
|
setCreateLoadBalancerPayloadGetVersionAttributeType(&o.Version, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o CreateLoadBalancerPayload) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadgetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment); ok {
|
||||||
|
toSerialize["DisableTargetSecurityGroupAssignment"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetErrorsAttributeTypeOk(o.Errors); ok {
|
||||||
|
toSerialize["Errors"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok {
|
||||||
|
toSerialize["ExternalAddress"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||||
|
toSerialize["Labels"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetListenersAttributeTypeOk(o.Listeners); ok {
|
||||||
|
toSerialize["Listeners"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup); ok {
|
||||||
|
toSerialize["LoadBalancerSecurityGroup"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetNetworksAttributeTypeOk(o.Networks); ok {
|
||||||
|
toSerialize["Networks"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetOptionsAttributeTypeOk(o.Options); ok {
|
||||||
|
toSerialize["Options"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetPlanIdAttributeTypeOk(o.PlanId); ok {
|
||||||
|
toSerialize["PlanId"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok {
|
||||||
|
toSerialize["PrivateAddress"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetRegionAttributeTypeOk(o.Region); ok {
|
||||||
|
toSerialize["Region"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetStatusAttributeTypeOk(o.Status); ok {
|
||||||
|
toSerialize["Status"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetTargetPoolsAttributeTypeOk(o.TargetPools); ok {
|
||||||
|
toSerialize["TargetPools"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup); ok {
|
||||||
|
toSerialize["TargetSecurityGroup"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadGetVersionAttributeTypeOk(o.Version); ok {
|
||||||
|
toSerialize["Version"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableCreateLoadBalancerPayload struct {
|
||||||
|
value *CreateLoadBalancerPayload
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayload) Get() *CreateLoadBalancerPayload {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayload) Set(val *CreateLoadBalancerPayload) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayload) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayload) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableCreateLoadBalancerPayload(val *CreateLoadBalancerPayload) *NullableCreateLoadBalancerPayload {
|
||||||
|
return &NullableCreateLoadBalancerPayload{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayload) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayload) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,178 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CreateLoadBalancerPayloadLoadBalancerSecurityGroup type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CreateLoadBalancerPayloadLoadBalancerSecurityGroup{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for id
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeTypeOk(arg CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType) (ret CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType(arg *CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType, val CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdArgType = string
|
||||||
|
type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeTypeOk(arg CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType) (ret CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType(arg *CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType, val CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameArgType = string
|
||||||
|
type CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType = string
|
||||||
|
|
||||||
|
// CreateLoadBalancerPayloadLoadBalancerSecurityGroup Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.
|
||||||
|
type CreateLoadBalancerPayloadLoadBalancerSecurityGroup struct {
|
||||||
|
// ID of the security Group
|
||||||
|
Id CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType `json:"id,omitempty"`
|
||||||
|
// Name of the security Group
|
||||||
|
Name CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType `json:"name,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateLoadBalancerPayloadLoadBalancerSecurityGroup instantiates a new CreateLoadBalancerPayloadLoadBalancerSecurityGroup object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewCreateLoadBalancerPayloadLoadBalancerSecurityGroup() *CreateLoadBalancerPayloadLoadBalancerSecurityGroup {
|
||||||
|
this := CreateLoadBalancerPayloadLoadBalancerSecurityGroup{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateLoadBalancerPayloadLoadBalancerSecurityGroupWithDefaults instantiates a new CreateLoadBalancerPayloadLoadBalancerSecurityGroup object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewCreateLoadBalancerPayloadLoadBalancerSecurityGroupWithDefaults() *CreateLoadBalancerPayloadLoadBalancerSecurityGroup {
|
||||||
|
this := CreateLoadBalancerPayloadLoadBalancerSecurityGroup{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetId returns the Id field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) GetId() (res CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType) {
|
||||||
|
res, _ = o.GetIdOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) GetIdOk() (ret CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeTypeOk(o.Id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasId returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) HasId() bool {
|
||||||
|
_, ok := o.GetIdOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||||
|
func (o *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) SetId(v CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdRetType) {
|
||||||
|
setCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeType(&o.Id, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) GetName() (res CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType) {
|
||||||
|
res, _ = o.GetNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) GetNameOk() (ret CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasName returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) HasName() bool {
|
||||||
|
_, ok := o.GetNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
func (o *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) SetName(v CreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameRetType) {
|
||||||
|
setCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o CreateLoadBalancerPayloadLoadBalancerSecurityGroup) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetIdAttributeTypeOk(o.Id); ok {
|
||||||
|
toSerialize["Id"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadLoadBalancerSecurityGroupGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup struct {
|
||||||
|
value *CreateLoadBalancerPayloadLoadBalancerSecurityGroup
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) Get() *CreateLoadBalancerPayloadLoadBalancerSecurityGroup {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) Set(val *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup(val *CreateLoadBalancerPayloadLoadBalancerSecurityGroup) *NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup {
|
||||||
|
return &NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayloadLoadBalancerSecurityGroup) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
@ -0,0 +1,178 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CreateLoadBalancerPayloadTargetSecurityGroup type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CreateLoadBalancerPayloadTargetSecurityGroup{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for id
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeTypeOk(arg CreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType) (ret CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType(arg *CreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType, val CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadTargetSecurityGroupGetIdArgType = string
|
||||||
|
type CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeTypeOk(arg CreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType) (ret CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType(arg *CreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType, val CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateLoadBalancerPayloadTargetSecurityGroupGetNameArgType = string
|
||||||
|
type CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType = string
|
||||||
|
|
||||||
|
// CreateLoadBalancerPayloadTargetSecurityGroup Security Group that allows the targets to receive traffic from the LoadBalancer. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.
|
||||||
|
type CreateLoadBalancerPayloadTargetSecurityGroup struct {
|
||||||
|
// ID of the security Group
|
||||||
|
Id CreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType `json:"id,omitempty"`
|
||||||
|
// Name of the security Group
|
||||||
|
Name CreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType `json:"name,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateLoadBalancerPayloadTargetSecurityGroup instantiates a new CreateLoadBalancerPayloadTargetSecurityGroup object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewCreateLoadBalancerPayloadTargetSecurityGroup() *CreateLoadBalancerPayloadTargetSecurityGroup {
|
||||||
|
this := CreateLoadBalancerPayloadTargetSecurityGroup{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateLoadBalancerPayloadTargetSecurityGroupWithDefaults instantiates a new CreateLoadBalancerPayloadTargetSecurityGroup object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewCreateLoadBalancerPayloadTargetSecurityGroupWithDefaults() *CreateLoadBalancerPayloadTargetSecurityGroup {
|
||||||
|
this := CreateLoadBalancerPayloadTargetSecurityGroup{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetId returns the Id field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayloadTargetSecurityGroup) GetId() (res CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType) {
|
||||||
|
res, _ = o.GetIdOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayloadTargetSecurityGroup) GetIdOk() (ret CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeTypeOk(o.Id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasId returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayloadTargetSecurityGroup) HasId() bool {
|
||||||
|
_, ok := o.GetIdOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||||
|
func (o *CreateLoadBalancerPayloadTargetSecurityGroup) SetId(v CreateLoadBalancerPayloadTargetSecurityGroupGetIdRetType) {
|
||||||
|
setCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeType(&o.Id, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value if set, zero value otherwise.
|
||||||
|
func (o *CreateLoadBalancerPayloadTargetSecurityGroup) GetName() (res CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType) {
|
||||||
|
res, _ = o.GetNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateLoadBalancerPayloadTargetSecurityGroup) GetNameOk() (ret CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType, ok bool) {
|
||||||
|
return getCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasName returns a boolean if a field has been set.
|
||||||
|
func (o *CreateLoadBalancerPayloadTargetSecurityGroup) HasName() bool {
|
||||||
|
_, ok := o.GetNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
func (o *CreateLoadBalancerPayloadTargetSecurityGroup) SetName(v CreateLoadBalancerPayloadTargetSecurityGroupGetNameRetType) {
|
||||||
|
setCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o CreateLoadBalancerPayloadTargetSecurityGroup) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadTargetSecurityGroupGetIdAttributeTypeOk(o.Id); ok {
|
||||||
|
toSerialize["Id"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateLoadBalancerPayloadTargetSecurityGroupGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableCreateLoadBalancerPayloadTargetSecurityGroup struct {
|
||||||
|
value *CreateLoadBalancerPayloadTargetSecurityGroup
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayloadTargetSecurityGroup) Get() *CreateLoadBalancerPayloadTargetSecurityGroup {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayloadTargetSecurityGroup) Set(val *CreateLoadBalancerPayloadTargetSecurityGroup) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayloadTargetSecurityGroup) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayloadTargetSecurityGroup) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableCreateLoadBalancerPayloadTargetSecurityGroup(val *CreateLoadBalancerPayloadTargetSecurityGroup) *NullableCreateLoadBalancerPayloadTargetSecurityGroup {
|
||||||
|
return &NullableCreateLoadBalancerPayloadTargetSecurityGroup{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCreateLoadBalancerPayloadTargetSecurityGroup) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCreateLoadBalancerPayloadTargetSecurityGroup) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
79
pkg/albbeta/model_create_load_balancer_payload_test.go
Normal file
79
pkg/albbeta/model_create_load_balancer_payload_test.go
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// isEnum
|
||||||
|
|
||||||
|
func TestCreateLoadBalancerPayloadStatus_UnmarshalJSON(t *testing.T) {
|
||||||
|
type args struct {
|
||||||
|
src []byte
|
||||||
|
}
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
args args
|
||||||
|
wantErr bool
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 1`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"STATUS_UNSPECIFIED"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 2`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"STATUS_PENDING"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 3`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"STATUS_READY"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 4`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"STATUS_ERROR"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 5`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"STATUS_TERMINATING"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "fail",
|
||||||
|
args: args{
|
||||||
|
src: []byte("\"FOOBAR\""),
|
||||||
|
},
|
||||||
|
wantErr: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
v := CreateLoadBalancerPayloadStatus("")
|
||||||
|
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
||||||
|
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
276
pkg/albbeta/model_credentials_response.go
Normal file
276
pkg/albbeta/model_credentials_response.go
Normal file
|
|
@ -0,0 +1,276 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CredentialsResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CredentialsResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for credentialsRef
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CredentialsResponseGetCredentialsRefAttributeType = *string
|
||||||
|
|
||||||
|
func getCredentialsResponseGetCredentialsRefAttributeTypeOk(arg CredentialsResponseGetCredentialsRefAttributeType) (ret CredentialsResponseGetCredentialsRefRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCredentialsResponseGetCredentialsRefAttributeType(arg *CredentialsResponseGetCredentialsRefAttributeType, val CredentialsResponseGetCredentialsRefRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CredentialsResponseGetCredentialsRefArgType = string
|
||||||
|
type CredentialsResponseGetCredentialsRefRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for displayName
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CredentialsResponseGetDisplayNameAttributeType = *string
|
||||||
|
|
||||||
|
func getCredentialsResponseGetDisplayNameAttributeTypeOk(arg CredentialsResponseGetDisplayNameAttributeType) (ret CredentialsResponseGetDisplayNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCredentialsResponseGetDisplayNameAttributeType(arg *CredentialsResponseGetDisplayNameAttributeType, val CredentialsResponseGetDisplayNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CredentialsResponseGetDisplayNameArgType = string
|
||||||
|
type CredentialsResponseGetDisplayNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for region
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CredentialsResponseGetRegionAttributeType = *string
|
||||||
|
|
||||||
|
func getCredentialsResponseGetRegionAttributeTypeOk(arg CredentialsResponseGetRegionAttributeType) (ret CredentialsResponseGetRegionRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCredentialsResponseGetRegionAttributeType(arg *CredentialsResponseGetRegionAttributeType, val CredentialsResponseGetRegionRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CredentialsResponseGetRegionArgType = string
|
||||||
|
type CredentialsResponseGetRegionRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for username
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CredentialsResponseGetUsernameAttributeType = *string
|
||||||
|
|
||||||
|
func getCredentialsResponseGetUsernameAttributeTypeOk(arg CredentialsResponseGetUsernameAttributeType) (ret CredentialsResponseGetUsernameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCredentialsResponseGetUsernameAttributeType(arg *CredentialsResponseGetUsernameAttributeType, val CredentialsResponseGetUsernameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CredentialsResponseGetUsernameArgType = string
|
||||||
|
type CredentialsResponseGetUsernameRetType = string
|
||||||
|
|
||||||
|
// CredentialsResponse struct for CredentialsResponse
|
||||||
|
type CredentialsResponse struct {
|
||||||
|
// The credentials reference can be used for observability of the Application Load Balancer.
|
||||||
|
CredentialsRef CredentialsResponseGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"`
|
||||||
|
// Credential name
|
||||||
|
DisplayName CredentialsResponseGetDisplayNameAttributeType `json:"displayName,omitempty"`
|
||||||
|
// Region of the Credential
|
||||||
|
Region CredentialsResponseGetRegionAttributeType `json:"region,omitempty"`
|
||||||
|
// The username used for the STACKIT Observability instance
|
||||||
|
Username CredentialsResponseGetUsernameAttributeType `json:"username,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCredentialsResponse instantiates a new CredentialsResponse object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewCredentialsResponse() *CredentialsResponse {
|
||||||
|
this := CredentialsResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCredentialsResponseWithDefaults instantiates a new CredentialsResponse object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewCredentialsResponseWithDefaults() *CredentialsResponse {
|
||||||
|
this := CredentialsResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise.
|
||||||
|
func (o *CredentialsResponse) GetCredentialsRef() (res CredentialsResponseGetCredentialsRefRetType) {
|
||||||
|
res, _ = o.GetCredentialsRefOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CredentialsResponse) GetCredentialsRefOk() (ret CredentialsResponseGetCredentialsRefRetType, ok bool) {
|
||||||
|
return getCredentialsResponseGetCredentialsRefAttributeTypeOk(o.CredentialsRef)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasCredentialsRef returns a boolean if a field has been set.
|
||||||
|
func (o *CredentialsResponse) HasCredentialsRef() bool {
|
||||||
|
_, ok := o.GetCredentialsRefOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field.
|
||||||
|
func (o *CredentialsResponse) SetCredentialsRef(v CredentialsResponseGetCredentialsRefRetType) {
|
||||||
|
setCredentialsResponseGetCredentialsRefAttributeType(&o.CredentialsRef, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
||||||
|
func (o *CredentialsResponse) GetDisplayName() (res CredentialsResponseGetDisplayNameRetType) {
|
||||||
|
res, _ = o.GetDisplayNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CredentialsResponse) GetDisplayNameOk() (ret CredentialsResponseGetDisplayNameRetType, ok bool) {
|
||||||
|
return getCredentialsResponseGetDisplayNameAttributeTypeOk(o.DisplayName)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasDisplayName returns a boolean if a field has been set.
|
||||||
|
func (o *CredentialsResponse) HasDisplayName() bool {
|
||||||
|
_, ok := o.GetDisplayNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
|
||||||
|
func (o *CredentialsResponse) SetDisplayName(v CredentialsResponseGetDisplayNameRetType) {
|
||||||
|
setCredentialsResponseGetDisplayNameAttributeType(&o.DisplayName, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRegion returns the Region field value if set, zero value otherwise.
|
||||||
|
func (o *CredentialsResponse) GetRegion() (res CredentialsResponseGetRegionRetType) {
|
||||||
|
res, _ = o.GetRegionOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CredentialsResponse) GetRegionOk() (ret CredentialsResponseGetRegionRetType, ok bool) {
|
||||||
|
return getCredentialsResponseGetRegionAttributeTypeOk(o.Region)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasRegion returns a boolean if a field has been set.
|
||||||
|
func (o *CredentialsResponse) HasRegion() bool {
|
||||||
|
_, ok := o.GetRegionOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRegion gets a reference to the given string and assigns it to the Region field.
|
||||||
|
func (o *CredentialsResponse) SetRegion(v CredentialsResponseGetRegionRetType) {
|
||||||
|
setCredentialsResponseGetRegionAttributeType(&o.Region, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUsername returns the Username field value if set, zero value otherwise.
|
||||||
|
func (o *CredentialsResponse) GetUsername() (res CredentialsResponseGetUsernameRetType) {
|
||||||
|
res, _ = o.GetUsernameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CredentialsResponse) GetUsernameOk() (ret CredentialsResponseGetUsernameRetType, ok bool) {
|
||||||
|
return getCredentialsResponseGetUsernameAttributeTypeOk(o.Username)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasUsername returns a boolean if a field has been set.
|
||||||
|
func (o *CredentialsResponse) HasUsername() bool {
|
||||||
|
_, ok := o.GetUsernameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUsername gets a reference to the given string and assigns it to the Username field.
|
||||||
|
func (o *CredentialsResponse) SetUsername(v CredentialsResponseGetUsernameRetType) {
|
||||||
|
setCredentialsResponseGetUsernameAttributeType(&o.Username, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o CredentialsResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getCredentialsResponseGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok {
|
||||||
|
toSerialize["CredentialsRef"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCredentialsResponseGetDisplayNameAttributeTypeOk(o.DisplayName); ok {
|
||||||
|
toSerialize["DisplayName"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCredentialsResponseGetRegionAttributeTypeOk(o.Region); ok {
|
||||||
|
toSerialize["Region"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCredentialsResponseGetUsernameAttributeTypeOk(o.Username); ok {
|
||||||
|
toSerialize["Username"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableCredentialsResponse struct {
|
||||||
|
value *CredentialsResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCredentialsResponse) Get() *CredentialsResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCredentialsResponse) Set(val *CredentialsResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCredentialsResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCredentialsResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableCredentialsResponse(val *CredentialsResponse) *NullableCredentialsResponse {
|
||||||
|
return &NullableCredentialsResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableCredentialsResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableCredentialsResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_credentials_response_test.go
Normal file
11
pkg/albbeta/model_credentials_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
127
pkg/albbeta/model_get_credentials_response.go
Normal file
127
pkg/albbeta/model_get_credentials_response.go
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the GetCredentialsResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &GetCredentialsResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for credential
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type GetCredentialsResponseGetCredentialAttributeType = *CredentialsResponse
|
||||||
|
type GetCredentialsResponseGetCredentialArgType = CredentialsResponse
|
||||||
|
type GetCredentialsResponseGetCredentialRetType = CredentialsResponse
|
||||||
|
|
||||||
|
func getGetCredentialsResponseGetCredentialAttributeTypeOk(arg GetCredentialsResponseGetCredentialAttributeType) (ret GetCredentialsResponseGetCredentialRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetCredentialsResponseGetCredentialAttributeType(arg *GetCredentialsResponseGetCredentialAttributeType, val GetCredentialsResponseGetCredentialRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCredentialsResponse struct for GetCredentialsResponse
|
||||||
|
type GetCredentialsResponse struct {
|
||||||
|
Credential GetCredentialsResponseGetCredentialAttributeType `json:"credential,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCredentialsResponse instantiates a new GetCredentialsResponse object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewGetCredentialsResponse() *GetCredentialsResponse {
|
||||||
|
this := GetCredentialsResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCredentialsResponseWithDefaults instantiates a new GetCredentialsResponse object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewGetCredentialsResponseWithDefaults() *GetCredentialsResponse {
|
||||||
|
this := GetCredentialsResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCredential returns the Credential field value if set, zero value otherwise.
|
||||||
|
func (o *GetCredentialsResponse) GetCredential() (res GetCredentialsResponseGetCredentialRetType) {
|
||||||
|
res, _ = o.GetCredentialOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCredentialOk returns a tuple with the Credential field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetCredentialsResponse) GetCredentialOk() (ret GetCredentialsResponseGetCredentialRetType, ok bool) {
|
||||||
|
return getGetCredentialsResponseGetCredentialAttributeTypeOk(o.Credential)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasCredential returns a boolean if a field has been set.
|
||||||
|
func (o *GetCredentialsResponse) HasCredential() bool {
|
||||||
|
_, ok := o.GetCredentialOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCredential gets a reference to the given CredentialsResponse and assigns it to the Credential field.
|
||||||
|
func (o *GetCredentialsResponse) SetCredential(v GetCredentialsResponseGetCredentialRetType) {
|
||||||
|
setGetCredentialsResponseGetCredentialAttributeType(&o.Credential, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o GetCredentialsResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getGetCredentialsResponseGetCredentialAttributeTypeOk(o.Credential); ok {
|
||||||
|
toSerialize["Credential"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableGetCredentialsResponse struct {
|
||||||
|
value *GetCredentialsResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGetCredentialsResponse) Get() *GetCredentialsResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGetCredentialsResponse) Set(val *GetCredentialsResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGetCredentialsResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGetCredentialsResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableGetCredentialsResponse(val *GetCredentialsResponse) *NullableGetCredentialsResponse {
|
||||||
|
return &NullableGetCredentialsResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGetCredentialsResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGetCredentialsResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_get_credentials_response_test.go
Normal file
11
pkg/albbeta/model_get_credentials_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
227
pkg/albbeta/model_get_quota_response.go
Normal file
227
pkg/albbeta/model_get_quota_response.go
Normal file
|
|
@ -0,0 +1,227 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the GetQuotaResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &GetQuotaResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for maxLoadBalancers
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isInteger
|
||||||
|
type GetQuotaResponseGetMaxLoadBalancersAttributeType = *int64
|
||||||
|
type GetQuotaResponseGetMaxLoadBalancersArgType = int64
|
||||||
|
type GetQuotaResponseGetMaxLoadBalancersRetType = int64
|
||||||
|
|
||||||
|
func getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(arg GetQuotaResponseGetMaxLoadBalancersAttributeType) (ret GetQuotaResponseGetMaxLoadBalancersRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetQuotaResponseGetMaxLoadBalancersAttributeType(arg *GetQuotaResponseGetMaxLoadBalancersAttributeType, val GetQuotaResponseGetMaxLoadBalancersRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for projectId
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type GetQuotaResponseGetProjectIdAttributeType = *string
|
||||||
|
|
||||||
|
func getGetQuotaResponseGetProjectIdAttributeTypeOk(arg GetQuotaResponseGetProjectIdAttributeType) (ret GetQuotaResponseGetProjectIdRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetQuotaResponseGetProjectIdAttributeType(arg *GetQuotaResponseGetProjectIdAttributeType, val GetQuotaResponseGetProjectIdRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetQuotaResponseGetProjectIdArgType = string
|
||||||
|
type GetQuotaResponseGetProjectIdRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for region
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type GetQuotaResponseGetRegionAttributeType = *string
|
||||||
|
|
||||||
|
func getGetQuotaResponseGetRegionAttributeTypeOk(arg GetQuotaResponseGetRegionAttributeType) (ret GetQuotaResponseGetRegionRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetQuotaResponseGetRegionAttributeType(arg *GetQuotaResponseGetRegionAttributeType, val GetQuotaResponseGetRegionRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetQuotaResponseGetRegionArgType = string
|
||||||
|
type GetQuotaResponseGetRegionRetType = string
|
||||||
|
|
||||||
|
// GetQuotaResponse struct for GetQuotaResponse
|
||||||
|
type GetQuotaResponse struct {
|
||||||
|
// The maximum number of load balancing servers in this project. Unlimited if set to -1.
|
||||||
|
// Can be cast to int32 without loss of precision.
|
||||||
|
MaxLoadBalancers GetQuotaResponseGetMaxLoadBalancersAttributeType `json:"maxLoadBalancers,omitempty"`
|
||||||
|
// Project identifier
|
||||||
|
ProjectId GetQuotaResponseGetProjectIdAttributeType `json:"projectId,omitempty"`
|
||||||
|
// Region
|
||||||
|
Region GetQuotaResponseGetRegionAttributeType `json:"region,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetQuotaResponse instantiates a new GetQuotaResponse object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewGetQuotaResponse() *GetQuotaResponse {
|
||||||
|
this := GetQuotaResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetQuotaResponseWithDefaults instantiates a new GetQuotaResponse object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewGetQuotaResponseWithDefaults() *GetQuotaResponse {
|
||||||
|
this := GetQuotaResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMaxLoadBalancers returns the MaxLoadBalancers field value if set, zero value otherwise.
|
||||||
|
func (o *GetQuotaResponse) GetMaxLoadBalancers() (res GetQuotaResponseGetMaxLoadBalancersRetType) {
|
||||||
|
res, _ = o.GetMaxLoadBalancersOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMaxLoadBalancersOk returns a tuple with the MaxLoadBalancers field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetQuotaResponse) GetMaxLoadBalancersOk() (ret GetQuotaResponseGetMaxLoadBalancersRetType, ok bool) {
|
||||||
|
return getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(o.MaxLoadBalancers)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasMaxLoadBalancers returns a boolean if a field has been set.
|
||||||
|
func (o *GetQuotaResponse) HasMaxLoadBalancers() bool {
|
||||||
|
_, ok := o.GetMaxLoadBalancersOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetMaxLoadBalancers gets a reference to the given int64 and assigns it to the MaxLoadBalancers field.
|
||||||
|
func (o *GetQuotaResponse) SetMaxLoadBalancers(v GetQuotaResponseGetMaxLoadBalancersRetType) {
|
||||||
|
setGetQuotaResponseGetMaxLoadBalancersAttributeType(&o.MaxLoadBalancers, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetProjectId returns the ProjectId field value if set, zero value otherwise.
|
||||||
|
func (o *GetQuotaResponse) GetProjectId() (res GetQuotaResponseGetProjectIdRetType) {
|
||||||
|
res, _ = o.GetProjectIdOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetQuotaResponse) GetProjectIdOk() (ret GetQuotaResponseGetProjectIdRetType, ok bool) {
|
||||||
|
return getGetQuotaResponseGetProjectIdAttributeTypeOk(o.ProjectId)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasProjectId returns a boolean if a field has been set.
|
||||||
|
func (o *GetQuotaResponse) HasProjectId() bool {
|
||||||
|
_, ok := o.GetProjectIdOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetProjectId gets a reference to the given string and assigns it to the ProjectId field.
|
||||||
|
func (o *GetQuotaResponse) SetProjectId(v GetQuotaResponseGetProjectIdRetType) {
|
||||||
|
setGetQuotaResponseGetProjectIdAttributeType(&o.ProjectId, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRegion returns the Region field value if set, zero value otherwise.
|
||||||
|
func (o *GetQuotaResponse) GetRegion() (res GetQuotaResponseGetRegionRetType) {
|
||||||
|
res, _ = o.GetRegionOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetQuotaResponse) GetRegionOk() (ret GetQuotaResponseGetRegionRetType, ok bool) {
|
||||||
|
return getGetQuotaResponseGetRegionAttributeTypeOk(o.Region)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasRegion returns a boolean if a field has been set.
|
||||||
|
func (o *GetQuotaResponse) HasRegion() bool {
|
||||||
|
_, ok := o.GetRegionOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRegion gets a reference to the given string and assigns it to the Region field.
|
||||||
|
func (o *GetQuotaResponse) SetRegion(v GetQuotaResponseGetRegionRetType) {
|
||||||
|
setGetQuotaResponseGetRegionAttributeType(&o.Region, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o GetQuotaResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getGetQuotaResponseGetMaxLoadBalancersAttributeTypeOk(o.MaxLoadBalancers); ok {
|
||||||
|
toSerialize["MaxLoadBalancers"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getGetQuotaResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok {
|
||||||
|
toSerialize["ProjectId"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getGetQuotaResponseGetRegionAttributeTypeOk(o.Region); ok {
|
||||||
|
toSerialize["Region"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableGetQuotaResponse struct {
|
||||||
|
value *GetQuotaResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGetQuotaResponse) Get() *GetQuotaResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGetQuotaResponse) Set(val *GetQuotaResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGetQuotaResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGetQuotaResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableGetQuotaResponse(val *GetQuotaResponse) *NullableGetQuotaResponse {
|
||||||
|
return &NullableGetQuotaResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGetQuotaResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGetQuotaResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_get_quota_response_test.go
Normal file
11
pkg/albbeta/model_get_quota_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
137
pkg/albbeta/model_google_protobuf_any.go
Normal file
137
pkg/albbeta/model_google_protobuf_any.go
Normal file
|
|
@ -0,0 +1,137 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &GoogleProtobufAny{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for @type
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type GoogleProtobufAnyGetTypeAttributeType = *string
|
||||||
|
|
||||||
|
func getGoogleProtobufAnyGetTypeAttributeTypeOk(arg GoogleProtobufAnyGetTypeAttributeType) (ret GoogleProtobufAnyGetTypeRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGoogleProtobufAnyGetTypeAttributeType(arg *GoogleProtobufAnyGetTypeAttributeType, val GoogleProtobufAnyGetTypeRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type GoogleProtobufAnyGetTypeArgType = string
|
||||||
|
type GoogleProtobufAnyGetTypeRetType = string
|
||||||
|
|
||||||
|
// GoogleProtobufAny Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
|
||||||
|
type GoogleProtobufAny struct {
|
||||||
|
// The type of the serialized message.
|
||||||
|
Type GoogleProtobufAnyGetTypeAttributeType `json:"@type,omitempty"`
|
||||||
|
AdditionalProperties map[string]interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
type _GoogleProtobufAny GoogleProtobufAny
|
||||||
|
|
||||||
|
// NewGoogleProtobufAny instantiates a new GoogleProtobufAny object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewGoogleProtobufAny() *GoogleProtobufAny {
|
||||||
|
this := GoogleProtobufAny{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGoogleProtobufAnyWithDefaults instantiates a new GoogleProtobufAny object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewGoogleProtobufAnyWithDefaults() *GoogleProtobufAny {
|
||||||
|
this := GoogleProtobufAny{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetType returns the Type field value if set, zero value otherwise.
|
||||||
|
func (o *GoogleProtobufAny) GetType() (res GoogleProtobufAnyGetTypeRetType) {
|
||||||
|
res, _ = o.GetTypeOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GoogleProtobufAny) GetTypeOk() (ret GoogleProtobufAnyGetTypeRetType, ok bool) {
|
||||||
|
return getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasType returns a boolean if a field has been set.
|
||||||
|
func (o *GoogleProtobufAny) HasType() bool {
|
||||||
|
_, ok := o.GetTypeOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
||||||
|
func (o *GoogleProtobufAny) SetType(v GoogleProtobufAnyGetTypeRetType) {
|
||||||
|
setGoogleProtobufAnyGetTypeAttributeType(&o.Type, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type); ok {
|
||||||
|
toSerialize["Type"] = val
|
||||||
|
}
|
||||||
|
|
||||||
|
for key, value := range o.AdditionalProperties {
|
||||||
|
toSerialize[key] = value
|
||||||
|
}
|
||||||
|
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableGoogleProtobufAny struct {
|
||||||
|
value *GoogleProtobufAny
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGoogleProtobufAny) Get() *GoogleProtobufAny {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGoogleProtobufAny) Set(val *GoogleProtobufAny) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGoogleProtobufAny) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGoogleProtobufAny) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableGoogleProtobufAny(val *GoogleProtobufAny) *NullableGoogleProtobufAny {
|
||||||
|
return &NullableGoogleProtobufAny{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGoogleProtobufAny) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGoogleProtobufAny) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_google_protobuf_any_test.go
Normal file
11
pkg/albbeta/model_google_protobuf_any_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
177
pkg/albbeta/model_host_config.go
Normal file
177
pkg/albbeta/model_host_config.go
Normal file
|
|
@ -0,0 +1,177 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the HostConfig type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &HostConfig{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for host
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type HostConfigGetHostAttributeType = *string
|
||||||
|
|
||||||
|
func getHostConfigGetHostAttributeTypeOk(arg HostConfigGetHostAttributeType) (ret HostConfigGetHostRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setHostConfigGetHostAttributeType(arg *HostConfigGetHostAttributeType, val HostConfigGetHostRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type HostConfigGetHostArgType = string
|
||||||
|
type HostConfigGetHostRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for rules
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type HostConfigGetRulesAttributeType = *[]Rule
|
||||||
|
type HostConfigGetRulesArgType = []Rule
|
||||||
|
type HostConfigGetRulesRetType = []Rule
|
||||||
|
|
||||||
|
func getHostConfigGetRulesAttributeTypeOk(arg HostConfigGetRulesAttributeType) (ret HostConfigGetRulesRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setHostConfigGetRulesAttributeType(arg *HostConfigGetRulesAttributeType, val HostConfigGetRulesRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// HostConfig struct for HostConfig
|
||||||
|
type HostConfig struct {
|
||||||
|
// Hostname to match. Supports wildcards (e.g. *.example.com).
|
||||||
|
Host HostConfigGetHostAttributeType `json:"host,omitempty"`
|
||||||
|
// Routing rules under the specified host, matched by path prefix.
|
||||||
|
Rules HostConfigGetRulesAttributeType `json:"rules,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewHostConfig instantiates a new HostConfig object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewHostConfig() *HostConfig {
|
||||||
|
this := HostConfig{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewHostConfigWithDefaults instantiates a new HostConfig object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewHostConfigWithDefaults() *HostConfig {
|
||||||
|
this := HostConfig{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetHost returns the Host field value if set, zero value otherwise.
|
||||||
|
func (o *HostConfig) GetHost() (res HostConfigGetHostRetType) {
|
||||||
|
res, _ = o.GetHostOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetHostOk returns a tuple with the Host field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *HostConfig) GetHostOk() (ret HostConfigGetHostRetType, ok bool) {
|
||||||
|
return getHostConfigGetHostAttributeTypeOk(o.Host)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasHost returns a boolean if a field has been set.
|
||||||
|
func (o *HostConfig) HasHost() bool {
|
||||||
|
_, ok := o.GetHostOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHost gets a reference to the given string and assigns it to the Host field.
|
||||||
|
func (o *HostConfig) SetHost(v HostConfigGetHostRetType) {
|
||||||
|
setHostConfigGetHostAttributeType(&o.Host, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRules returns the Rules field value if set, zero value otherwise.
|
||||||
|
func (o *HostConfig) GetRules() (res HostConfigGetRulesRetType) {
|
||||||
|
res, _ = o.GetRulesOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *HostConfig) GetRulesOk() (ret HostConfigGetRulesRetType, ok bool) {
|
||||||
|
return getHostConfigGetRulesAttributeTypeOk(o.Rules)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasRules returns a boolean if a field has been set.
|
||||||
|
func (o *HostConfig) HasRules() bool {
|
||||||
|
_, ok := o.GetRulesOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRules gets a reference to the given []Rule and assigns it to the Rules field.
|
||||||
|
func (o *HostConfig) SetRules(v HostConfigGetRulesRetType) {
|
||||||
|
setHostConfigGetRulesAttributeType(&o.Rules, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o HostConfig) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getHostConfigGetHostAttributeTypeOk(o.Host); ok {
|
||||||
|
toSerialize["Host"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getHostConfigGetRulesAttributeTypeOk(o.Rules); ok {
|
||||||
|
toSerialize["Rules"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableHostConfig struct {
|
||||||
|
value *HostConfig
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableHostConfig) Get() *HostConfig {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableHostConfig) Set(val *HostConfig) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableHostConfig) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableHostConfig) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableHostConfig(val *HostConfig) *NullableHostConfig {
|
||||||
|
return &NullableHostConfig{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableHostConfig) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableHostConfig) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_host_config_test.go
Normal file
11
pkg/albbeta/model_host_config_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
178
pkg/albbeta/model_http_header.go
Normal file
178
pkg/albbeta/model_http_header.go
Normal file
|
|
@ -0,0 +1,178 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the HttpHeader type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &HttpHeader{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for exactMatch
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type HttpHeaderGetExactMatchAttributeType = *string
|
||||||
|
|
||||||
|
func getHttpHeaderGetExactMatchAttributeTypeOk(arg HttpHeaderGetExactMatchAttributeType) (ret HttpHeaderGetExactMatchRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setHttpHeaderGetExactMatchAttributeType(arg *HttpHeaderGetExactMatchAttributeType, val HttpHeaderGetExactMatchRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type HttpHeaderGetExactMatchArgType = string
|
||||||
|
type HttpHeaderGetExactMatchRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type HttpHeaderGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getHttpHeaderGetNameAttributeTypeOk(arg HttpHeaderGetNameAttributeType) (ret HttpHeaderGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setHttpHeaderGetNameAttributeType(arg *HttpHeaderGetNameAttributeType, val HttpHeaderGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type HttpHeaderGetNameArgType = string
|
||||||
|
type HttpHeaderGetNameRetType = string
|
||||||
|
|
||||||
|
// HttpHeader struct for HttpHeader
|
||||||
|
type HttpHeader struct {
|
||||||
|
// Exact match for the header value.
|
||||||
|
ExactMatch HttpHeaderGetExactMatchAttributeType `json:"exactMatch,omitempty"`
|
||||||
|
// Header name.
|
||||||
|
Name HttpHeaderGetNameAttributeType `json:"name,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewHttpHeader instantiates a new HttpHeader object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewHttpHeader() *HttpHeader {
|
||||||
|
this := HttpHeader{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewHttpHeaderWithDefaults instantiates a new HttpHeader object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewHttpHeaderWithDefaults() *HttpHeader {
|
||||||
|
this := HttpHeader{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetExactMatch returns the ExactMatch field value if set, zero value otherwise.
|
||||||
|
func (o *HttpHeader) GetExactMatch() (res HttpHeaderGetExactMatchRetType) {
|
||||||
|
res, _ = o.GetExactMatchOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetExactMatchOk returns a tuple with the ExactMatch field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *HttpHeader) GetExactMatchOk() (ret HttpHeaderGetExactMatchRetType, ok bool) {
|
||||||
|
return getHttpHeaderGetExactMatchAttributeTypeOk(o.ExactMatch)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasExactMatch returns a boolean if a field has been set.
|
||||||
|
func (o *HttpHeader) HasExactMatch() bool {
|
||||||
|
_, ok := o.GetExactMatchOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetExactMatch gets a reference to the given string and assigns it to the ExactMatch field.
|
||||||
|
func (o *HttpHeader) SetExactMatch(v HttpHeaderGetExactMatchRetType) {
|
||||||
|
setHttpHeaderGetExactMatchAttributeType(&o.ExactMatch, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value if set, zero value otherwise.
|
||||||
|
func (o *HttpHeader) GetName() (res HttpHeaderGetNameRetType) {
|
||||||
|
res, _ = o.GetNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *HttpHeader) GetNameOk() (ret HttpHeaderGetNameRetType, ok bool) {
|
||||||
|
return getHttpHeaderGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasName returns a boolean if a field has been set.
|
||||||
|
func (o *HttpHeader) HasName() bool {
|
||||||
|
_, ok := o.GetNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
func (o *HttpHeader) SetName(v HttpHeaderGetNameRetType) {
|
||||||
|
setHttpHeaderGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o HttpHeader) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getHttpHeaderGetExactMatchAttributeTypeOk(o.ExactMatch); ok {
|
||||||
|
toSerialize["ExactMatch"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getHttpHeaderGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableHttpHeader struct {
|
||||||
|
value *HttpHeader
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableHttpHeader) Get() *HttpHeader {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableHttpHeader) Set(val *HttpHeader) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableHttpHeader) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableHttpHeader) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableHttpHeader(val *HttpHeader) *NullableHttpHeader {
|
||||||
|
return &NullableHttpHeader{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableHttpHeader) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableHttpHeader) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_http_header_test.go
Normal file
11
pkg/albbeta/model_http_header_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
177
pkg/albbeta/model_http_health_checks.go
Normal file
177
pkg/albbeta/model_http_health_checks.go
Normal file
|
|
@ -0,0 +1,177 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the HttpHealthChecks type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &HttpHealthChecks{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for okStatuses
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type HttpHealthChecksGetOkStatusesAttributeType = *[]string
|
||||||
|
type HttpHealthChecksGetOkStatusesArgType = []string
|
||||||
|
type HttpHealthChecksGetOkStatusesRetType = []string
|
||||||
|
|
||||||
|
func getHttpHealthChecksGetOkStatusesAttributeTypeOk(arg HttpHealthChecksGetOkStatusesAttributeType) (ret HttpHealthChecksGetOkStatusesRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setHttpHealthChecksGetOkStatusesAttributeType(arg *HttpHealthChecksGetOkStatusesAttributeType, val HttpHealthChecksGetOkStatusesRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for path
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type HttpHealthChecksGetPathAttributeType = *string
|
||||||
|
|
||||||
|
func getHttpHealthChecksGetPathAttributeTypeOk(arg HttpHealthChecksGetPathAttributeType) (ret HttpHealthChecksGetPathRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setHttpHealthChecksGetPathAttributeType(arg *HttpHealthChecksGetPathAttributeType, val HttpHealthChecksGetPathRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type HttpHealthChecksGetPathArgType = string
|
||||||
|
type HttpHealthChecksGetPathRetType = string
|
||||||
|
|
||||||
|
// HttpHealthChecks struct for HttpHealthChecks
|
||||||
|
type HttpHealthChecks struct {
|
||||||
|
// List of HTTP status codes that indicate a healthy response
|
||||||
|
OkStatuses HttpHealthChecksGetOkStatusesAttributeType `json:"okStatuses,omitempty"`
|
||||||
|
// Path to send the health check request to
|
||||||
|
Path HttpHealthChecksGetPathAttributeType `json:"path,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewHttpHealthChecks instantiates a new HttpHealthChecks object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewHttpHealthChecks() *HttpHealthChecks {
|
||||||
|
this := HttpHealthChecks{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewHttpHealthChecksWithDefaults instantiates a new HttpHealthChecks object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewHttpHealthChecksWithDefaults() *HttpHealthChecks {
|
||||||
|
this := HttpHealthChecks{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOkStatuses returns the OkStatuses field value if set, zero value otherwise.
|
||||||
|
func (o *HttpHealthChecks) GetOkStatuses() (res HttpHealthChecksGetOkStatusesRetType) {
|
||||||
|
res, _ = o.GetOkStatusesOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOkStatusesOk returns a tuple with the OkStatuses field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *HttpHealthChecks) GetOkStatusesOk() (ret HttpHealthChecksGetOkStatusesRetType, ok bool) {
|
||||||
|
return getHttpHealthChecksGetOkStatusesAttributeTypeOk(o.OkStatuses)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasOkStatuses returns a boolean if a field has been set.
|
||||||
|
func (o *HttpHealthChecks) HasOkStatuses() bool {
|
||||||
|
_, ok := o.GetOkStatusesOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOkStatuses gets a reference to the given []string and assigns it to the OkStatuses field.
|
||||||
|
func (o *HttpHealthChecks) SetOkStatuses(v HttpHealthChecksGetOkStatusesRetType) {
|
||||||
|
setHttpHealthChecksGetOkStatusesAttributeType(&o.OkStatuses, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPath returns the Path field value if set, zero value otherwise.
|
||||||
|
func (o *HttpHealthChecks) GetPath() (res HttpHealthChecksGetPathRetType) {
|
||||||
|
res, _ = o.GetPathOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *HttpHealthChecks) GetPathOk() (ret HttpHealthChecksGetPathRetType, ok bool) {
|
||||||
|
return getHttpHealthChecksGetPathAttributeTypeOk(o.Path)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPath returns a boolean if a field has been set.
|
||||||
|
func (o *HttpHealthChecks) HasPath() bool {
|
||||||
|
_, ok := o.GetPathOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPath gets a reference to the given string and assigns it to the Path field.
|
||||||
|
func (o *HttpHealthChecks) SetPath(v HttpHealthChecksGetPathRetType) {
|
||||||
|
setHttpHealthChecksGetPathAttributeType(&o.Path, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o HttpHealthChecks) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getHttpHealthChecksGetOkStatusesAttributeTypeOk(o.OkStatuses); ok {
|
||||||
|
toSerialize["OkStatuses"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getHttpHealthChecksGetPathAttributeTypeOk(o.Path); ok {
|
||||||
|
toSerialize["Path"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableHttpHealthChecks struct {
|
||||||
|
value *HttpHealthChecks
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableHttpHealthChecks) Get() *HttpHealthChecks {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableHttpHealthChecks) Set(val *HttpHealthChecks) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableHttpHealthChecks) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableHttpHealthChecks) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableHttpHealthChecks(val *HttpHealthChecks) *NullableHttpHealthChecks {
|
||||||
|
return &NullableHttpHealthChecks{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableHttpHealthChecks) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableHttpHealthChecks) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_http_health_checks_test.go
Normal file
11
pkg/albbeta/model_http_health_checks_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
127
pkg/albbeta/model_list_credentials_response.go
Normal file
127
pkg/albbeta/model_list_credentials_response.go
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the ListCredentialsResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &ListCredentialsResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for credentials
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type ListCredentialsResponseGetCredentialsAttributeType = *[]CredentialsResponse
|
||||||
|
type ListCredentialsResponseGetCredentialsArgType = []CredentialsResponse
|
||||||
|
type ListCredentialsResponseGetCredentialsRetType = []CredentialsResponse
|
||||||
|
|
||||||
|
func getListCredentialsResponseGetCredentialsAttributeTypeOk(arg ListCredentialsResponseGetCredentialsAttributeType) (ret ListCredentialsResponseGetCredentialsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListCredentialsResponseGetCredentialsAttributeType(arg *ListCredentialsResponseGetCredentialsAttributeType, val ListCredentialsResponseGetCredentialsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListCredentialsResponse struct for ListCredentialsResponse
|
||||||
|
type ListCredentialsResponse struct {
|
||||||
|
Credentials ListCredentialsResponseGetCredentialsAttributeType `json:"credentials,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewListCredentialsResponse instantiates a new ListCredentialsResponse object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewListCredentialsResponse() *ListCredentialsResponse {
|
||||||
|
this := ListCredentialsResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewListCredentialsResponseWithDefaults instantiates a new ListCredentialsResponse object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewListCredentialsResponseWithDefaults() *ListCredentialsResponse {
|
||||||
|
this := ListCredentialsResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCredentials returns the Credentials field value if set, zero value otherwise.
|
||||||
|
func (o *ListCredentialsResponse) GetCredentials() (res ListCredentialsResponseGetCredentialsRetType) {
|
||||||
|
res, _ = o.GetCredentialsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ListCredentialsResponse) GetCredentialsOk() (ret ListCredentialsResponseGetCredentialsRetType, ok bool) {
|
||||||
|
return getListCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasCredentials returns a boolean if a field has been set.
|
||||||
|
func (o *ListCredentialsResponse) HasCredentials() bool {
|
||||||
|
_, ok := o.GetCredentialsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCredentials gets a reference to the given []CredentialsResponse and assigns it to the Credentials field.
|
||||||
|
func (o *ListCredentialsResponse) SetCredentials(v ListCredentialsResponseGetCredentialsRetType) {
|
||||||
|
setListCredentialsResponseGetCredentialsAttributeType(&o.Credentials, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o ListCredentialsResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getListCredentialsResponseGetCredentialsAttributeTypeOk(o.Credentials); ok {
|
||||||
|
toSerialize["Credentials"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableListCredentialsResponse struct {
|
||||||
|
value *ListCredentialsResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListCredentialsResponse) Get() *ListCredentialsResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListCredentialsResponse) Set(val *ListCredentialsResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListCredentialsResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListCredentialsResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableListCredentialsResponse(val *ListCredentialsResponse) *NullableListCredentialsResponse {
|
||||||
|
return &NullableListCredentialsResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListCredentialsResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListCredentialsResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_list_credentials_response_test.go
Normal file
11
pkg/albbeta/model_list_credentials_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
176
pkg/albbeta/model_list_load_balancers_response.go
Normal file
176
pkg/albbeta/model_list_load_balancers_response.go
Normal file
|
|
@ -0,0 +1,176 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the ListLoadBalancersResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &ListLoadBalancersResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for loadBalancers
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type ListLoadBalancersResponseGetLoadBalancersAttributeType = *[]LoadBalancer
|
||||||
|
type ListLoadBalancersResponseGetLoadBalancersArgType = []LoadBalancer
|
||||||
|
type ListLoadBalancersResponseGetLoadBalancersRetType = []LoadBalancer
|
||||||
|
|
||||||
|
func getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(arg ListLoadBalancersResponseGetLoadBalancersAttributeType) (ret ListLoadBalancersResponseGetLoadBalancersRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListLoadBalancersResponseGetLoadBalancersAttributeType(arg *ListLoadBalancersResponseGetLoadBalancersAttributeType, val ListLoadBalancersResponseGetLoadBalancersRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for nextPageId
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ListLoadBalancersResponseGetNextPageIdAttributeType = *string
|
||||||
|
|
||||||
|
func getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(arg ListLoadBalancersResponseGetNextPageIdAttributeType) (ret ListLoadBalancersResponseGetNextPageIdRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListLoadBalancersResponseGetNextPageIdAttributeType(arg *ListLoadBalancersResponseGetNextPageIdAttributeType, val ListLoadBalancersResponseGetNextPageIdRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListLoadBalancersResponseGetNextPageIdArgType = string
|
||||||
|
type ListLoadBalancersResponseGetNextPageIdRetType = string
|
||||||
|
|
||||||
|
// ListLoadBalancersResponse struct for ListLoadBalancersResponse
|
||||||
|
type ListLoadBalancersResponse struct {
|
||||||
|
LoadBalancers ListLoadBalancersResponseGetLoadBalancersAttributeType `json:"loadBalancers,omitempty"`
|
||||||
|
// Continue token from the ListLoadBalancerResponse with Limit option
|
||||||
|
NextPageId ListLoadBalancersResponseGetNextPageIdAttributeType `json:"nextPageId,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewListLoadBalancersResponse instantiates a new ListLoadBalancersResponse object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewListLoadBalancersResponse() *ListLoadBalancersResponse {
|
||||||
|
this := ListLoadBalancersResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewListLoadBalancersResponseWithDefaults instantiates a new ListLoadBalancersResponse object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewListLoadBalancersResponseWithDefaults() *ListLoadBalancersResponse {
|
||||||
|
this := ListLoadBalancersResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLoadBalancers returns the LoadBalancers field value if set, zero value otherwise.
|
||||||
|
func (o *ListLoadBalancersResponse) GetLoadBalancers() (res ListLoadBalancersResponseGetLoadBalancersRetType) {
|
||||||
|
res, _ = o.GetLoadBalancersOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLoadBalancersOk returns a tuple with the LoadBalancers field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ListLoadBalancersResponse) GetLoadBalancersOk() (ret ListLoadBalancersResponseGetLoadBalancersRetType, ok bool) {
|
||||||
|
return getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(o.LoadBalancers)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasLoadBalancers returns a boolean if a field has been set.
|
||||||
|
func (o *ListLoadBalancersResponse) HasLoadBalancers() bool {
|
||||||
|
_, ok := o.GetLoadBalancersOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLoadBalancers gets a reference to the given []LoadBalancer and assigns it to the LoadBalancers field.
|
||||||
|
func (o *ListLoadBalancersResponse) SetLoadBalancers(v ListLoadBalancersResponseGetLoadBalancersRetType) {
|
||||||
|
setListLoadBalancersResponseGetLoadBalancersAttributeType(&o.LoadBalancers, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNextPageId returns the NextPageId field value if set, zero value otherwise.
|
||||||
|
func (o *ListLoadBalancersResponse) GetNextPageId() (res ListLoadBalancersResponseGetNextPageIdRetType) {
|
||||||
|
res, _ = o.GetNextPageIdOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNextPageIdOk returns a tuple with the NextPageId field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ListLoadBalancersResponse) GetNextPageIdOk() (ret ListLoadBalancersResponseGetNextPageIdRetType, ok bool) {
|
||||||
|
return getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(o.NextPageId)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasNextPageId returns a boolean if a field has been set.
|
||||||
|
func (o *ListLoadBalancersResponse) HasNextPageId() bool {
|
||||||
|
_, ok := o.GetNextPageIdOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetNextPageId gets a reference to the given string and assigns it to the NextPageId field.
|
||||||
|
func (o *ListLoadBalancersResponse) SetNextPageId(v ListLoadBalancersResponseGetNextPageIdRetType) {
|
||||||
|
setListLoadBalancersResponseGetNextPageIdAttributeType(&o.NextPageId, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o ListLoadBalancersResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getListLoadBalancersResponseGetLoadBalancersAttributeTypeOk(o.LoadBalancers); ok {
|
||||||
|
toSerialize["LoadBalancers"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getListLoadBalancersResponseGetNextPageIdAttributeTypeOk(o.NextPageId); ok {
|
||||||
|
toSerialize["NextPageId"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableListLoadBalancersResponse struct {
|
||||||
|
value *ListLoadBalancersResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListLoadBalancersResponse) Get() *ListLoadBalancersResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListLoadBalancersResponse) Set(val *ListLoadBalancersResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListLoadBalancersResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListLoadBalancersResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableListLoadBalancersResponse(val *ListLoadBalancersResponse) *NullableListLoadBalancersResponse {
|
||||||
|
return &NullableListLoadBalancersResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListLoadBalancersResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListLoadBalancersResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_list_load_balancers_response_test.go
Normal file
11
pkg/albbeta/model_list_load_balancers_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
127
pkg/albbeta/model_list_plans_response.go
Normal file
127
pkg/albbeta/model_list_plans_response.go
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the ListPlansResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &ListPlansResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for validPlans
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type ListPlansResponseGetValidPlansAttributeType = *[]PlanDetails
|
||||||
|
type ListPlansResponseGetValidPlansArgType = []PlanDetails
|
||||||
|
type ListPlansResponseGetValidPlansRetType = []PlanDetails
|
||||||
|
|
||||||
|
func getListPlansResponseGetValidPlansAttributeTypeOk(arg ListPlansResponseGetValidPlansAttributeType) (ret ListPlansResponseGetValidPlansRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListPlansResponseGetValidPlansAttributeType(arg *ListPlansResponseGetValidPlansAttributeType, val ListPlansResponseGetValidPlansRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListPlansResponse struct for ListPlansResponse
|
||||||
|
type ListPlansResponse struct {
|
||||||
|
ValidPlans ListPlansResponseGetValidPlansAttributeType `json:"validPlans,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewListPlansResponse instantiates a new ListPlansResponse object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewListPlansResponse() *ListPlansResponse {
|
||||||
|
this := ListPlansResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewListPlansResponseWithDefaults instantiates a new ListPlansResponse object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewListPlansResponseWithDefaults() *ListPlansResponse {
|
||||||
|
this := ListPlansResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetValidPlans returns the ValidPlans field value if set, zero value otherwise.
|
||||||
|
func (o *ListPlansResponse) GetValidPlans() (res ListPlansResponseGetValidPlansRetType) {
|
||||||
|
res, _ = o.GetValidPlansOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetValidPlansOk returns a tuple with the ValidPlans field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ListPlansResponse) GetValidPlansOk() (ret ListPlansResponseGetValidPlansRetType, ok bool) {
|
||||||
|
return getListPlansResponseGetValidPlansAttributeTypeOk(o.ValidPlans)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasValidPlans returns a boolean if a field has been set.
|
||||||
|
func (o *ListPlansResponse) HasValidPlans() bool {
|
||||||
|
_, ok := o.GetValidPlansOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetValidPlans gets a reference to the given []PlanDetails and assigns it to the ValidPlans field.
|
||||||
|
func (o *ListPlansResponse) SetValidPlans(v ListPlansResponseGetValidPlansRetType) {
|
||||||
|
setListPlansResponseGetValidPlansAttributeType(&o.ValidPlans, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o ListPlansResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getListPlansResponseGetValidPlansAttributeTypeOk(o.ValidPlans); ok {
|
||||||
|
toSerialize["ValidPlans"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableListPlansResponse struct {
|
||||||
|
value *ListPlansResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListPlansResponse) Get() *ListPlansResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListPlansResponse) Set(val *ListPlansResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListPlansResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListPlansResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableListPlansResponse(val *ListPlansResponse) *NullableListPlansResponse {
|
||||||
|
return &NullableListPlansResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListPlansResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListPlansResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/albbeta/model_list_plans_response_test.go
Normal file
11
pkg/albbeta/model_list_plans_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
476
pkg/albbeta/model_listener.go
Normal file
476
pkg/albbeta/model_listener.go
Normal file
|
|
@ -0,0 +1,476 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the Listener type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &Listener{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for http
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type ListenerGetHttpAttributeType = *ProtocolOptionsHTTP
|
||||||
|
type ListenerGetHttpArgType = ProtocolOptionsHTTP
|
||||||
|
type ListenerGetHttpRetType = ProtocolOptionsHTTP
|
||||||
|
|
||||||
|
func getListenerGetHttpAttributeTypeOk(arg ListenerGetHttpAttributeType) (ret ListenerGetHttpRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListenerGetHttpAttributeType(arg *ListenerGetHttpAttributeType, val ListenerGetHttpRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for https
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type ListenerGetHttpsAttributeType = *ProtocolOptionsHTTPS
|
||||||
|
type ListenerGetHttpsArgType = ProtocolOptionsHTTPS
|
||||||
|
type ListenerGetHttpsRetType = ProtocolOptionsHTTPS
|
||||||
|
|
||||||
|
func getListenerGetHttpsAttributeTypeOk(arg ListenerGetHttpsAttributeType) (ret ListenerGetHttpsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListenerGetHttpsAttributeType(arg *ListenerGetHttpsAttributeType, val ListenerGetHttpsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ListenerGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getListenerGetNameAttributeTypeOk(arg ListenerGetNameAttributeType) (ret ListenerGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListenerGetNameAttributeType(arg *ListenerGetNameAttributeType, val ListenerGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListenerGetNameArgType = string
|
||||||
|
type ListenerGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for port
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isInteger
|
||||||
|
type ListenerGetPortAttributeType = *int64
|
||||||
|
type ListenerGetPortArgType = int64
|
||||||
|
type ListenerGetPortRetType = int64
|
||||||
|
|
||||||
|
func getListenerGetPortAttributeTypeOk(arg ListenerGetPortAttributeType) (ret ListenerGetPortRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListenerGetPortAttributeType(arg *ListenerGetPortAttributeType, val ListenerGetPortRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for protocol
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isEnum
|
||||||
|
|
||||||
|
// ListenerProtocol Protocol is the highest network protocol we understand to load balance. Currently PROTOCOL_HTTP and PROTOCOL_HTTPS are supported.
|
||||||
|
// value type for enums
|
||||||
|
type ListenerProtocol string
|
||||||
|
|
||||||
|
// List of Protocol
|
||||||
|
const (
|
||||||
|
LISTENERPROTOCOL_UNSPECIFIED ListenerProtocol = "PROTOCOL_UNSPECIFIED"
|
||||||
|
LISTENERPROTOCOL_HTTP ListenerProtocol = "PROTOCOL_HTTP"
|
||||||
|
LISTENERPROTOCOL_HTTPS ListenerProtocol = "PROTOCOL_HTTPS"
|
||||||
|
)
|
||||||
|
|
||||||
|
// All allowed values of Listener enum
|
||||||
|
var AllowedListenerProtocolEnumValues = []ListenerProtocol{
|
||||||
|
"PROTOCOL_UNSPECIFIED",
|
||||||
|
"PROTOCOL_HTTP",
|
||||||
|
"PROTOCOL_HTTPS",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *ListenerProtocol) UnmarshalJSON(src []byte) error {
|
||||||
|
// use a type alias to prevent infinite recursion during unmarshal,
|
||||||
|
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
|
||||||
|
type TmpJson ListenerProtocol
|
||||||
|
var value TmpJson
|
||||||
|
err := json.Unmarshal(src, &value)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// Allow unmarshalling zero value for testing purposes
|
||||||
|
var zeroValue TmpJson
|
||||||
|
if value == zeroValue {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
enumTypeValue := ListenerProtocol(value)
|
||||||
|
for _, existing := range AllowedListenerProtocolEnumValues {
|
||||||
|
if existing == enumTypeValue {
|
||||||
|
*v = enumTypeValue
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Errorf("%+v is not a valid Listener", value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewListenerProtocolFromValue returns a pointer to a valid ListenerProtocol
|
||||||
|
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||||
|
func NewListenerProtocolFromValue(v ListenerProtocol) (*ListenerProtocol, error) {
|
||||||
|
ev := ListenerProtocol(v)
|
||||||
|
if ev.IsValid() {
|
||||||
|
return &ev, nil
|
||||||
|
} else {
|
||||||
|
return nil, fmt.Errorf("invalid value '%v' for ListenerProtocol: valid values are %v", v, AllowedListenerProtocolEnumValues)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsValid return true if the value is valid for the enum, false otherwise
|
||||||
|
func (v ListenerProtocol) IsValid() bool {
|
||||||
|
for _, existing := range AllowedListenerProtocolEnumValues {
|
||||||
|
if existing == v {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ptr returns reference to ProtocolProtocol value
|
||||||
|
func (v ListenerProtocol) Ptr() *ListenerProtocol {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableListenerProtocol struct {
|
||||||
|
value *ListenerProtocol
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListenerProtocol) Get() *ListenerProtocol {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListenerProtocol) Set(val *ListenerProtocol) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListenerProtocol) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListenerProtocol) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableListenerProtocol(val *ListenerProtocol) *NullableListenerProtocol {
|
||||||
|
return &NullableListenerProtocol{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListenerProtocol) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListenerProtocol) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListenerGetProtocolAttributeType = *ListenerProtocol
|
||||||
|
type ListenerGetProtocolArgType = ListenerProtocol
|
||||||
|
type ListenerGetProtocolRetType = ListenerProtocol
|
||||||
|
|
||||||
|
func getListenerGetProtocolAttributeTypeOk(arg ListenerGetProtocolAttributeType) (ret ListenerGetProtocolRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListenerGetProtocolAttributeType(arg *ListenerGetProtocolAttributeType, val ListenerGetProtocolRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for wafConfigName
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ListenerGetWafConfigNameAttributeType = *string
|
||||||
|
|
||||||
|
func getListenerGetWafConfigNameAttributeTypeOk(arg ListenerGetWafConfigNameAttributeType) (ret ListenerGetWafConfigNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListenerGetWafConfigNameAttributeType(arg *ListenerGetWafConfigNameAttributeType, val ListenerGetWafConfigNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListenerGetWafConfigNameArgType = string
|
||||||
|
type ListenerGetWafConfigNameRetType = string
|
||||||
|
|
||||||
|
// Listener struct for Listener
|
||||||
|
type Listener struct {
|
||||||
|
Http ListenerGetHttpAttributeType `json:"http,omitempty"`
|
||||||
|
Https ListenerGetHttpsAttributeType `json:"https,omitempty"`
|
||||||
|
// Unique, system-generated identifier for the listener. It is derived from the protocol and port.
|
||||||
|
Name ListenerGetNameAttributeType `json:"name,omitempty"`
|
||||||
|
// Port number on which the listener receives incoming traffic.
|
||||||
|
// Can be cast to int32 without loss of precision.
|
||||||
|
Port ListenerGetPortAttributeType `json:"port,omitempty"`
|
||||||
|
// Protocol is the highest network protocol we understand to load balance. Currently PROTOCOL_HTTP and PROTOCOL_HTTPS are supported.
|
||||||
|
Protocol ListenerGetProtocolAttributeType `json:"protocol,omitempty"`
|
||||||
|
// Enable Web Application Firewall (WAF), referenced by name. See \"Application Load Balancer - Web Application Firewall API\" for more information.
|
||||||
|
WafConfigName ListenerGetWafConfigNameAttributeType `json:"wafConfigName,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewListener instantiates a new Listener object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewListener() *Listener {
|
||||||
|
this := Listener{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewListenerWithDefaults instantiates a new Listener object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewListenerWithDefaults() *Listener {
|
||||||
|
this := Listener{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetHttp returns the Http field value if set, zero value otherwise.
|
||||||
|
func (o *Listener) GetHttp() (res ListenerGetHttpRetType) {
|
||||||
|
res, _ = o.GetHttpOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetHttpOk returns a tuple with the Http field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Listener) GetHttpOk() (ret ListenerGetHttpRetType, ok bool) {
|
||||||
|
return getListenerGetHttpAttributeTypeOk(o.Http)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasHttp returns a boolean if a field has been set.
|
||||||
|
func (o *Listener) HasHttp() bool {
|
||||||
|
_, ok := o.GetHttpOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHttp gets a reference to the given ProtocolOptionsHTTP and assigns it to the Http field.
|
||||||
|
func (o *Listener) SetHttp(v ListenerGetHttpRetType) {
|
||||||
|
setListenerGetHttpAttributeType(&o.Http, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetHttps returns the Https field value if set, zero value otherwise.
|
||||||
|
func (o *Listener) GetHttps() (res ListenerGetHttpsRetType) {
|
||||||
|
res, _ = o.GetHttpsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetHttpsOk returns a tuple with the Https field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Listener) GetHttpsOk() (ret ListenerGetHttpsRetType, ok bool) {
|
||||||
|
return getListenerGetHttpsAttributeTypeOk(o.Https)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasHttps returns a boolean if a field has been set.
|
||||||
|
func (o *Listener) HasHttps() bool {
|
||||||
|
_, ok := o.GetHttpsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHttps gets a reference to the given ProtocolOptionsHTTPS and assigns it to the Https field.
|
||||||
|
func (o *Listener) SetHttps(v ListenerGetHttpsRetType) {
|
||||||
|
setListenerGetHttpsAttributeType(&o.Https, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value if set, zero value otherwise.
|
||||||
|
func (o *Listener) GetName() (res ListenerGetNameRetType) {
|
||||||
|
res, _ = o.GetNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Listener) GetNameOk() (ret ListenerGetNameRetType, ok bool) {
|
||||||
|
return getListenerGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasName returns a boolean if a field has been set.
|
||||||
|
func (o *Listener) HasName() bool {
|
||||||
|
_, ok := o.GetNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
func (o *Listener) SetName(v ListenerGetNameRetType) {
|
||||||
|
setListenerGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPort returns the Port field value if set, zero value otherwise.
|
||||||
|
func (o *Listener) GetPort() (res ListenerGetPortRetType) {
|
||||||
|
res, _ = o.GetPortOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPortOk returns a tuple with the Port field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Listener) GetPortOk() (ret ListenerGetPortRetType, ok bool) {
|
||||||
|
return getListenerGetPortAttributeTypeOk(o.Port)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPort returns a boolean if a field has been set.
|
||||||
|
func (o *Listener) HasPort() bool {
|
||||||
|
_, ok := o.GetPortOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPort gets a reference to the given int64 and assigns it to the Port field.
|
||||||
|
func (o *Listener) SetPort(v ListenerGetPortRetType) {
|
||||||
|
setListenerGetPortAttributeType(&o.Port, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetProtocol returns the Protocol field value if set, zero value otherwise.
|
||||||
|
func (o *Listener) GetProtocol() (res ListenerGetProtocolRetType) {
|
||||||
|
res, _ = o.GetProtocolOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Listener) GetProtocolOk() (ret ListenerGetProtocolRetType, ok bool) {
|
||||||
|
return getListenerGetProtocolAttributeTypeOk(o.Protocol)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasProtocol returns a boolean if a field has been set.
|
||||||
|
func (o *Listener) HasProtocol() bool {
|
||||||
|
_, ok := o.GetProtocolOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetProtocol gets a reference to the given string and assigns it to the Protocol field.
|
||||||
|
func (o *Listener) SetProtocol(v ListenerGetProtocolRetType) {
|
||||||
|
setListenerGetProtocolAttributeType(&o.Protocol, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetWafConfigName returns the WafConfigName field value if set, zero value otherwise.
|
||||||
|
func (o *Listener) GetWafConfigName() (res ListenerGetWafConfigNameRetType) {
|
||||||
|
res, _ = o.GetWafConfigNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetWafConfigNameOk returns a tuple with the WafConfigName field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Listener) GetWafConfigNameOk() (ret ListenerGetWafConfigNameRetType, ok bool) {
|
||||||
|
return getListenerGetWafConfigNameAttributeTypeOk(o.WafConfigName)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasWafConfigName returns a boolean if a field has been set.
|
||||||
|
func (o *Listener) HasWafConfigName() bool {
|
||||||
|
_, ok := o.GetWafConfigNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetWafConfigName gets a reference to the given string and assigns it to the WafConfigName field.
|
||||||
|
func (o *Listener) SetWafConfigName(v ListenerGetWafConfigNameRetType) {
|
||||||
|
setListenerGetWafConfigNameAttributeType(&o.WafConfigName, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o Listener) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getListenerGetHttpAttributeTypeOk(o.Http); ok {
|
||||||
|
toSerialize["Http"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getListenerGetHttpsAttributeTypeOk(o.Https); ok {
|
||||||
|
toSerialize["Https"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getListenerGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getListenerGetPortAttributeTypeOk(o.Port); ok {
|
||||||
|
toSerialize["Port"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getListenerGetProtocolAttributeTypeOk(o.Protocol); ok {
|
||||||
|
toSerialize["Protocol"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getListenerGetWafConfigNameAttributeTypeOk(o.WafConfigName); ok {
|
||||||
|
toSerialize["WafConfigName"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableListener struct {
|
||||||
|
value *Listener
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListener) Get() *Listener {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListener) Set(val *Listener) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListener) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListener) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableListener(val *Listener) *NullableListener {
|
||||||
|
return &NullableListener{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableListener) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableListener) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
65
pkg/albbeta/model_listener_test.go
Normal file
65
pkg/albbeta/model_listener_test.go
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// isEnum
|
||||||
|
|
||||||
|
func TestListenerProtocol_UnmarshalJSON(t *testing.T) {
|
||||||
|
type args struct {
|
||||||
|
src []byte
|
||||||
|
}
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
args args
|
||||||
|
wantErr bool
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 1`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"PROTOCOL_UNSPECIFIED"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 2`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"PROTOCOL_HTTP"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 3`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"PROTOCOL_HTTPS"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "fail",
|
||||||
|
args: args{
|
||||||
|
src: []byte("\"FOOBAR\""),
|
||||||
|
},
|
||||||
|
wantErr: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
v := ListenerProtocol("")
|
||||||
|
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
||||||
|
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
961
pkg/albbeta/model_load_balancer.go
Normal file
961
pkg/albbeta/model_load_balancer.go
Normal file
|
|
@ -0,0 +1,961 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the LoadBalancer type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &LoadBalancer{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for disableTargetSecurityGroupAssignment
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isBoolean
|
||||||
|
type LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType = *bool
|
||||||
|
type LoadBalancergetDisableTargetSecurityGroupAssignmentArgType = bool
|
||||||
|
type LoadBalancergetDisableTargetSecurityGroupAssignmentRetType = bool
|
||||||
|
|
||||||
|
func getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(arg LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType) (ret LoadBalancergetDisableTargetSecurityGroupAssignmentRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType(arg *LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType, val LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for errors
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type LoadBalancerGetErrorsAttributeType = *[]LoadBalancerError
|
||||||
|
type LoadBalancerGetErrorsArgType = []LoadBalancerError
|
||||||
|
type LoadBalancerGetErrorsRetType = []LoadBalancerError
|
||||||
|
|
||||||
|
func getLoadBalancerGetErrorsAttributeTypeOk(arg LoadBalancerGetErrorsAttributeType) (ret LoadBalancerGetErrorsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetErrorsAttributeType(arg *LoadBalancerGetErrorsAttributeType, val LoadBalancerGetErrorsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for externalAddress
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type LoadBalancerGetExternalAddressAttributeType = *string
|
||||||
|
|
||||||
|
func getLoadBalancerGetExternalAddressAttributeTypeOk(arg LoadBalancerGetExternalAddressAttributeType) (ret LoadBalancerGetExternalAddressRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetExternalAddressAttributeType(arg *LoadBalancerGetExternalAddressAttributeType, val LoadBalancerGetExternalAddressRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoadBalancerGetExternalAddressArgType = string
|
||||||
|
type LoadBalancerGetExternalAddressRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for labels
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isContainer
|
||||||
|
type LoadBalancerGetLabelsAttributeType = *map[string]string
|
||||||
|
type LoadBalancerGetLabelsArgType = map[string]string
|
||||||
|
type LoadBalancerGetLabelsRetType = map[string]string
|
||||||
|
|
||||||
|
func getLoadBalancerGetLabelsAttributeTypeOk(arg LoadBalancerGetLabelsAttributeType) (ret LoadBalancerGetLabelsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetLabelsAttributeType(arg *LoadBalancerGetLabelsAttributeType, val LoadBalancerGetLabelsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for listeners
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type LoadBalancerGetListenersAttributeType = *[]Listener
|
||||||
|
type LoadBalancerGetListenersArgType = []Listener
|
||||||
|
type LoadBalancerGetListenersRetType = []Listener
|
||||||
|
|
||||||
|
func getLoadBalancerGetListenersAttributeTypeOk(arg LoadBalancerGetListenersAttributeType) (ret LoadBalancerGetListenersRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetListenersAttributeType(arg *LoadBalancerGetListenersAttributeType, val LoadBalancerGetListenersRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for loadBalancerSecurityGroup
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type LoadBalancerGetLoadBalancerSecurityGroupAttributeType = *CreateLoadBalancerPayloadLoadBalancerSecurityGroup
|
||||||
|
type LoadBalancerGetLoadBalancerSecurityGroupArgType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup
|
||||||
|
type LoadBalancerGetLoadBalancerSecurityGroupRetType = CreateLoadBalancerPayloadLoadBalancerSecurityGroup
|
||||||
|
|
||||||
|
func getLoadBalancerGetLoadBalancerSecurityGroupAttributeTypeOk(arg LoadBalancerGetLoadBalancerSecurityGroupAttributeType) (ret LoadBalancerGetLoadBalancerSecurityGroupRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetLoadBalancerSecurityGroupAttributeType(arg *LoadBalancerGetLoadBalancerSecurityGroupAttributeType, val LoadBalancerGetLoadBalancerSecurityGroupRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type LoadBalancerGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getLoadBalancerGetNameAttributeTypeOk(arg LoadBalancerGetNameAttributeType) (ret LoadBalancerGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetNameAttributeType(arg *LoadBalancerGetNameAttributeType, val LoadBalancerGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoadBalancerGetNameArgType = string
|
||||||
|
type LoadBalancerGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for networks
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type LoadBalancerGetNetworksAttributeType = *[]Network
|
||||||
|
type LoadBalancerGetNetworksArgType = []Network
|
||||||
|
type LoadBalancerGetNetworksRetType = []Network
|
||||||
|
|
||||||
|
func getLoadBalancerGetNetworksAttributeTypeOk(arg LoadBalancerGetNetworksAttributeType) (ret LoadBalancerGetNetworksRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetNetworksAttributeType(arg *LoadBalancerGetNetworksAttributeType, val LoadBalancerGetNetworksRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for options
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type LoadBalancerGetOptionsAttributeType = *LoadBalancerOptions
|
||||||
|
type LoadBalancerGetOptionsArgType = LoadBalancerOptions
|
||||||
|
type LoadBalancerGetOptionsRetType = LoadBalancerOptions
|
||||||
|
|
||||||
|
func getLoadBalancerGetOptionsAttributeTypeOk(arg LoadBalancerGetOptionsAttributeType) (ret LoadBalancerGetOptionsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetOptionsAttributeType(arg *LoadBalancerGetOptionsAttributeType, val LoadBalancerGetOptionsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for planId
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type LoadBalancerGetPlanIdAttributeType = *string
|
||||||
|
|
||||||
|
func getLoadBalancerGetPlanIdAttributeTypeOk(arg LoadBalancerGetPlanIdAttributeType) (ret LoadBalancerGetPlanIdRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetPlanIdAttributeType(arg *LoadBalancerGetPlanIdAttributeType, val LoadBalancerGetPlanIdRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoadBalancerGetPlanIdArgType = string
|
||||||
|
type LoadBalancerGetPlanIdRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for privateAddress
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type LoadBalancerGetPrivateAddressAttributeType = *string
|
||||||
|
|
||||||
|
func getLoadBalancerGetPrivateAddressAttributeTypeOk(arg LoadBalancerGetPrivateAddressAttributeType) (ret LoadBalancerGetPrivateAddressRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetPrivateAddressAttributeType(arg *LoadBalancerGetPrivateAddressAttributeType, val LoadBalancerGetPrivateAddressRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoadBalancerGetPrivateAddressArgType = string
|
||||||
|
type LoadBalancerGetPrivateAddressRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for region
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type LoadBalancerGetRegionAttributeType = *string
|
||||||
|
|
||||||
|
func getLoadBalancerGetRegionAttributeTypeOk(arg LoadBalancerGetRegionAttributeType) (ret LoadBalancerGetRegionRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetRegionAttributeType(arg *LoadBalancerGetRegionAttributeType, val LoadBalancerGetRegionRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoadBalancerGetRegionArgType = string
|
||||||
|
type LoadBalancerGetRegionRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for status
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isEnum
|
||||||
|
|
||||||
|
// LoadBalancerStatus the model 'LoadBalancer'
|
||||||
|
// value type for enums
|
||||||
|
type LoadBalancerStatus string
|
||||||
|
|
||||||
|
// List of Status
|
||||||
|
const (
|
||||||
|
LOADBALANCERSTATUS_UNSPECIFIED LoadBalancerStatus = "STATUS_UNSPECIFIED"
|
||||||
|
LOADBALANCERSTATUS_PENDING LoadBalancerStatus = "STATUS_PENDING"
|
||||||
|
LOADBALANCERSTATUS_READY LoadBalancerStatus = "STATUS_READY"
|
||||||
|
LOADBALANCERSTATUS_ERROR LoadBalancerStatus = "STATUS_ERROR"
|
||||||
|
LOADBALANCERSTATUS_TERMINATING LoadBalancerStatus = "STATUS_TERMINATING"
|
||||||
|
)
|
||||||
|
|
||||||
|
// All allowed values of LoadBalancer enum
|
||||||
|
var AllowedLoadBalancerStatusEnumValues = []LoadBalancerStatus{
|
||||||
|
"STATUS_UNSPECIFIED",
|
||||||
|
"STATUS_PENDING",
|
||||||
|
"STATUS_READY",
|
||||||
|
"STATUS_ERROR",
|
||||||
|
"STATUS_TERMINATING",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *LoadBalancerStatus) UnmarshalJSON(src []byte) error {
|
||||||
|
// use a type alias to prevent infinite recursion during unmarshal,
|
||||||
|
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
|
||||||
|
type TmpJson LoadBalancerStatus
|
||||||
|
var value TmpJson
|
||||||
|
err := json.Unmarshal(src, &value)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// Allow unmarshalling zero value for testing purposes
|
||||||
|
var zeroValue TmpJson
|
||||||
|
if value == zeroValue {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
enumTypeValue := LoadBalancerStatus(value)
|
||||||
|
for _, existing := range AllowedLoadBalancerStatusEnumValues {
|
||||||
|
if existing == enumTypeValue {
|
||||||
|
*v = enumTypeValue
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Errorf("%+v is not a valid LoadBalancer", value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewLoadBalancerStatusFromValue returns a pointer to a valid LoadBalancerStatus
|
||||||
|
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||||
|
func NewLoadBalancerStatusFromValue(v LoadBalancerStatus) (*LoadBalancerStatus, error) {
|
||||||
|
ev := LoadBalancerStatus(v)
|
||||||
|
if ev.IsValid() {
|
||||||
|
return &ev, nil
|
||||||
|
} else {
|
||||||
|
return nil, fmt.Errorf("invalid value '%v' for LoadBalancerStatus: valid values are %v", v, AllowedLoadBalancerStatusEnumValues)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsValid return true if the value is valid for the enum, false otherwise
|
||||||
|
func (v LoadBalancerStatus) IsValid() bool {
|
||||||
|
for _, existing := range AllowedLoadBalancerStatusEnumValues {
|
||||||
|
if existing == v {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ptr returns reference to StatusStatus value
|
||||||
|
func (v LoadBalancerStatus) Ptr() *LoadBalancerStatus {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableLoadBalancerStatus struct {
|
||||||
|
value *LoadBalancerStatus
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableLoadBalancerStatus) Get() *LoadBalancerStatus {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableLoadBalancerStatus) Set(val *LoadBalancerStatus) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableLoadBalancerStatus) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableLoadBalancerStatus) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableLoadBalancerStatus(val *LoadBalancerStatus) *NullableLoadBalancerStatus {
|
||||||
|
return &NullableLoadBalancerStatus{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableLoadBalancerStatus) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableLoadBalancerStatus) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoadBalancerGetStatusAttributeType = *LoadBalancerStatus
|
||||||
|
type LoadBalancerGetStatusArgType = LoadBalancerStatus
|
||||||
|
type LoadBalancerGetStatusRetType = LoadBalancerStatus
|
||||||
|
|
||||||
|
func getLoadBalancerGetStatusAttributeTypeOk(arg LoadBalancerGetStatusAttributeType) (ret LoadBalancerGetStatusRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetStatusAttributeType(arg *LoadBalancerGetStatusAttributeType, val LoadBalancerGetStatusRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for targetPools
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isArray
|
||||||
|
type LoadBalancerGetTargetPoolsAttributeType = *[]TargetPool
|
||||||
|
type LoadBalancerGetTargetPoolsArgType = []TargetPool
|
||||||
|
type LoadBalancerGetTargetPoolsRetType = []TargetPool
|
||||||
|
|
||||||
|
func getLoadBalancerGetTargetPoolsAttributeTypeOk(arg LoadBalancerGetTargetPoolsAttributeType) (ret LoadBalancerGetTargetPoolsRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetTargetPoolsAttributeType(arg *LoadBalancerGetTargetPoolsAttributeType, val LoadBalancerGetTargetPoolsRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for targetSecurityGroup
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type LoadBalancerGetTargetSecurityGroupAttributeType = *CreateLoadBalancerPayloadTargetSecurityGroup
|
||||||
|
type LoadBalancerGetTargetSecurityGroupArgType = CreateLoadBalancerPayloadTargetSecurityGroup
|
||||||
|
type LoadBalancerGetTargetSecurityGroupRetType = CreateLoadBalancerPayloadTargetSecurityGroup
|
||||||
|
|
||||||
|
func getLoadBalancerGetTargetSecurityGroupAttributeTypeOk(arg LoadBalancerGetTargetSecurityGroupAttributeType) (ret LoadBalancerGetTargetSecurityGroupRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetTargetSecurityGroupAttributeType(arg *LoadBalancerGetTargetSecurityGroupAttributeType, val LoadBalancerGetTargetSecurityGroupRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for version
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type LoadBalancerGetVersionAttributeType = *string
|
||||||
|
|
||||||
|
func getLoadBalancerGetVersionAttributeTypeOk(arg LoadBalancerGetVersionAttributeType) (ret LoadBalancerGetVersionRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerGetVersionAttributeType(arg *LoadBalancerGetVersionAttributeType, val LoadBalancerGetVersionRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoadBalancerGetVersionArgType = string
|
||||||
|
type LoadBalancerGetVersionRetType = string
|
||||||
|
|
||||||
|
// LoadBalancer struct for LoadBalancer
|
||||||
|
type LoadBalancer struct {
|
||||||
|
// Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation.
|
||||||
|
DisableTargetSecurityGroupAssignment LoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType `json:"disableTargetSecurityGroupAssignment,omitempty"`
|
||||||
|
// Reports all errors a application load balancer has.
|
||||||
|
Errors LoadBalancerGetErrorsAttributeType `json:"errors,omitempty"`
|
||||||
|
// External application load balancer IP address where this application load balancer is exposed. Not changeable after creation.
|
||||||
|
ExternalAddress LoadBalancerGetExternalAddressAttributeType `json:"externalAddress,omitempty"`
|
||||||
|
// Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per ALB. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between.
|
||||||
|
Labels LoadBalancerGetLabelsAttributeType `json:"labels,omitempty"`
|
||||||
|
// There is a maximum listener count of 20.
|
||||||
|
Listeners LoadBalancerGetListenersAttributeType `json:"listeners,omitempty"`
|
||||||
|
LoadBalancerSecurityGroup LoadBalancerGetLoadBalancerSecurityGroupAttributeType `json:"loadBalancerSecurityGroup,omitempty"`
|
||||||
|
// Application Load Balancer name. Not changeable after creation.
|
||||||
|
Name LoadBalancerGetNameAttributeType `json:"name,omitempty"`
|
||||||
|
// List of networks that listeners and targets reside in. Currently limited to one. Not changeable after creation.
|
||||||
|
Networks LoadBalancerGetNetworksAttributeType `json:"networks,omitempty"`
|
||||||
|
Options LoadBalancerGetOptionsAttributeType `json:"options,omitempty"`
|
||||||
|
// Service Plan configures the size of the Application Load Balancer. Currently supported plans are p10, p50, p250 and p750. This list can change in the future where plan ids will be removed and new plans by added. That is the reason this is not an enum.
|
||||||
|
PlanId LoadBalancerGetPlanIdAttributeType `json:"planId,omitempty"`
|
||||||
|
// Transient private application load balancer IP address that can change any time.
|
||||||
|
PrivateAddress LoadBalancerGetPrivateAddressAttributeType `json:"privateAddress,omitempty"`
|
||||||
|
// Region of the LoadBalancer.
|
||||||
|
Region LoadBalancerGetRegionAttributeType `json:"region,omitempty"`
|
||||||
|
Status LoadBalancerGetStatusAttributeType `json:"status,omitempty"`
|
||||||
|
// List of all target pools which will be used in the application load balancer. Limited to 20.
|
||||||
|
TargetPools LoadBalancerGetTargetPoolsAttributeType `json:"targetPools,omitempty"`
|
||||||
|
TargetSecurityGroup LoadBalancerGetTargetSecurityGroupAttributeType `json:"targetSecurityGroup,omitempty"`
|
||||||
|
// Application Load Balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this application load balancer resource that changes during updates of the load balancers. On updates this field specified the application load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a application load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of application load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case.
|
||||||
|
Version LoadBalancerGetVersionAttributeType `json:"version,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewLoadBalancer instantiates a new LoadBalancer object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewLoadBalancer() *LoadBalancer {
|
||||||
|
this := LoadBalancer{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewLoadBalancerWithDefaults instantiates a new LoadBalancer object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewLoadBalancerWithDefaults() *LoadBalancer {
|
||||||
|
this := LoadBalancer{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDisableTargetSecurityGroupAssignment returns the DisableTargetSecurityGroupAssignment field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignment() (res LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) {
|
||||||
|
res, _ = o.GetDisableTargetSecurityGroupAssignmentOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDisableTargetSecurityGroupAssignmentOk returns a tuple with the DisableTargetSecurityGroupAssignment field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetDisableTargetSecurityGroupAssignmentOk() (ret LoadBalancergetDisableTargetSecurityGroupAssignmentRetType, ok bool) {
|
||||||
|
return getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasDisableTargetSecurityGroupAssignment returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasDisableTargetSecurityGroupAssignment() bool {
|
||||||
|
_, ok := o.GetDisableTargetSecurityGroupAssignmentOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDisableTargetSecurityGroupAssignment gets a reference to the given bool and assigns it to the DisableTargetSecurityGroupAssignment field.
|
||||||
|
func (o *LoadBalancer) SetDisableTargetSecurityGroupAssignment(v LoadBalancergetDisableTargetSecurityGroupAssignmentRetType) {
|
||||||
|
setLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeType(&o.DisableTargetSecurityGroupAssignment, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetErrors returns the Errors field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetErrors() (res LoadBalancerGetErrorsRetType) {
|
||||||
|
res, _ = o.GetErrorsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetErrorsOk() (ret LoadBalancerGetErrorsRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetErrorsAttributeTypeOk(o.Errors)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasErrors returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasErrors() bool {
|
||||||
|
_, ok := o.GetErrorsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetErrors gets a reference to the given []LoadBalancerError and assigns it to the Errors field.
|
||||||
|
func (o *LoadBalancer) SetErrors(v LoadBalancerGetErrorsRetType) {
|
||||||
|
setLoadBalancerGetErrorsAttributeType(&o.Errors, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetExternalAddress returns the ExternalAddress field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetExternalAddress() (res LoadBalancerGetExternalAddressRetType) {
|
||||||
|
res, _ = o.GetExternalAddressOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetExternalAddressOk returns a tuple with the ExternalAddress field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetExternalAddressOk() (ret LoadBalancerGetExternalAddressRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetExternalAddressAttributeTypeOk(o.ExternalAddress)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasExternalAddress returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasExternalAddress() bool {
|
||||||
|
_, ok := o.GetExternalAddressOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetExternalAddress gets a reference to the given string and assigns it to the ExternalAddress field.
|
||||||
|
func (o *LoadBalancer) SetExternalAddress(v LoadBalancerGetExternalAddressRetType) {
|
||||||
|
setLoadBalancerGetExternalAddressAttributeType(&o.ExternalAddress, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetLabels() (res LoadBalancerGetLabelsRetType) {
|
||||||
|
res, _ = o.GetLabelsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetLabelsOk() (ret LoadBalancerGetLabelsRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetLabelsAttributeTypeOk(o.Labels)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasLabels returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasLabels() bool {
|
||||||
|
_, ok := o.GetLabelsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
|
||||||
|
func (o *LoadBalancer) SetLabels(v LoadBalancerGetLabelsRetType) {
|
||||||
|
setLoadBalancerGetLabelsAttributeType(&o.Labels, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListeners returns the Listeners field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetListeners() (res LoadBalancerGetListenersRetType) {
|
||||||
|
res, _ = o.GetListenersOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetListenersOk returns a tuple with the Listeners field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetListenersOk() (ret LoadBalancerGetListenersRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetListenersAttributeTypeOk(o.Listeners)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasListeners returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasListeners() bool {
|
||||||
|
_, ok := o.GetListenersOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetListeners gets a reference to the given []Listener and assigns it to the Listeners field.
|
||||||
|
func (o *LoadBalancer) SetListeners(v LoadBalancerGetListenersRetType) {
|
||||||
|
setLoadBalancerGetListenersAttributeType(&o.Listeners, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLoadBalancerSecurityGroup returns the LoadBalancerSecurityGroup field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetLoadBalancerSecurityGroup() (res LoadBalancerGetLoadBalancerSecurityGroupRetType) {
|
||||||
|
res, _ = o.GetLoadBalancerSecurityGroupOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLoadBalancerSecurityGroupOk returns a tuple with the LoadBalancerSecurityGroup field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetLoadBalancerSecurityGroupOk() (ret LoadBalancerGetLoadBalancerSecurityGroupRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasLoadBalancerSecurityGroup returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasLoadBalancerSecurityGroup() bool {
|
||||||
|
_, ok := o.GetLoadBalancerSecurityGroupOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLoadBalancerSecurityGroup gets a reference to the given CreateLoadBalancerPayloadLoadBalancerSecurityGroup and assigns it to the LoadBalancerSecurityGroup field.
|
||||||
|
func (o *LoadBalancer) SetLoadBalancerSecurityGroup(v LoadBalancerGetLoadBalancerSecurityGroupRetType) {
|
||||||
|
setLoadBalancerGetLoadBalancerSecurityGroupAttributeType(&o.LoadBalancerSecurityGroup, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetName() (res LoadBalancerGetNameRetType) {
|
||||||
|
res, _ = o.GetNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetNameOk() (ret LoadBalancerGetNameRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasName returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasName() bool {
|
||||||
|
_, ok := o.GetNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
func (o *LoadBalancer) SetName(v LoadBalancerGetNameRetType) {
|
||||||
|
setLoadBalancerGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNetworks returns the Networks field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetNetworks() (res LoadBalancerGetNetworksRetType) {
|
||||||
|
res, _ = o.GetNetworksOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNetworksOk returns a tuple with the Networks field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetNetworksOk() (ret LoadBalancerGetNetworksRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetNetworksAttributeTypeOk(o.Networks)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasNetworks returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasNetworks() bool {
|
||||||
|
_, ok := o.GetNetworksOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetNetworks gets a reference to the given []Network and assigns it to the Networks field.
|
||||||
|
func (o *LoadBalancer) SetNetworks(v LoadBalancerGetNetworksRetType) {
|
||||||
|
setLoadBalancerGetNetworksAttributeType(&o.Networks, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOptions returns the Options field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetOptions() (res LoadBalancerGetOptionsRetType) {
|
||||||
|
res, _ = o.GetOptionsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetOptionsOk() (ret LoadBalancerGetOptionsRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetOptionsAttributeTypeOk(o.Options)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasOptions returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasOptions() bool {
|
||||||
|
_, ok := o.GetOptionsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOptions gets a reference to the given LoadBalancerOptions and assigns it to the Options field.
|
||||||
|
func (o *LoadBalancer) SetOptions(v LoadBalancerGetOptionsRetType) {
|
||||||
|
setLoadBalancerGetOptionsAttributeType(&o.Options, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPlanId returns the PlanId field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetPlanId() (res LoadBalancerGetPlanIdRetType) {
|
||||||
|
res, _ = o.GetPlanIdOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetPlanIdOk() (ret LoadBalancerGetPlanIdRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetPlanIdAttributeTypeOk(o.PlanId)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPlanId returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasPlanId() bool {
|
||||||
|
_, ok := o.GetPlanIdOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPlanId gets a reference to the given string and assigns it to the PlanId field.
|
||||||
|
func (o *LoadBalancer) SetPlanId(v LoadBalancerGetPlanIdRetType) {
|
||||||
|
setLoadBalancerGetPlanIdAttributeType(&o.PlanId, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetPrivateAddress() (res LoadBalancerGetPrivateAddressRetType) {
|
||||||
|
res, _ = o.GetPrivateAddressOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetPrivateAddressOk() (ret LoadBalancerGetPrivateAddressRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetPrivateAddressAttributeTypeOk(o.PrivateAddress)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPrivateAddress returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasPrivateAddress() bool {
|
||||||
|
_, ok := o.GetPrivateAddressOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPrivateAddress gets a reference to the given string and assigns it to the PrivateAddress field.
|
||||||
|
func (o *LoadBalancer) SetPrivateAddress(v LoadBalancerGetPrivateAddressRetType) {
|
||||||
|
setLoadBalancerGetPrivateAddressAttributeType(&o.PrivateAddress, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRegion returns the Region field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetRegion() (res LoadBalancerGetRegionRetType) {
|
||||||
|
res, _ = o.GetRegionOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetRegionOk() (ret LoadBalancerGetRegionRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetRegionAttributeTypeOk(o.Region)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasRegion returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasRegion() bool {
|
||||||
|
_, ok := o.GetRegionOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRegion gets a reference to the given string and assigns it to the Region field.
|
||||||
|
func (o *LoadBalancer) SetRegion(v LoadBalancerGetRegionRetType) {
|
||||||
|
setLoadBalancerGetRegionAttributeType(&o.Region, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetStatus() (res LoadBalancerGetStatusRetType) {
|
||||||
|
res, _ = o.GetStatusOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetStatusOk() (ret LoadBalancerGetStatusRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetStatusAttributeTypeOk(o.Status)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasStatus returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasStatus() bool {
|
||||||
|
_, ok := o.GetStatusOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||||
|
func (o *LoadBalancer) SetStatus(v LoadBalancerGetStatusRetType) {
|
||||||
|
setLoadBalancerGetStatusAttributeType(&o.Status, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTargetPools returns the TargetPools field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetTargetPools() (res LoadBalancerGetTargetPoolsRetType) {
|
||||||
|
res, _ = o.GetTargetPoolsOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTargetPoolsOk returns a tuple with the TargetPools field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetTargetPoolsOk() (ret LoadBalancerGetTargetPoolsRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetTargetPoolsAttributeTypeOk(o.TargetPools)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasTargetPools returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasTargetPools() bool {
|
||||||
|
_, ok := o.GetTargetPoolsOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTargetPools gets a reference to the given []TargetPool and assigns it to the TargetPools field.
|
||||||
|
func (o *LoadBalancer) SetTargetPools(v LoadBalancerGetTargetPoolsRetType) {
|
||||||
|
setLoadBalancerGetTargetPoolsAttributeType(&o.TargetPools, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTargetSecurityGroup returns the TargetSecurityGroup field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetTargetSecurityGroup() (res LoadBalancerGetTargetSecurityGroupRetType) {
|
||||||
|
res, _ = o.GetTargetSecurityGroupOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTargetSecurityGroupOk returns a tuple with the TargetSecurityGroup field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetTargetSecurityGroupOk() (ret LoadBalancerGetTargetSecurityGroupRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasTargetSecurityGroup returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasTargetSecurityGroup() bool {
|
||||||
|
_, ok := o.GetTargetSecurityGroupOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTargetSecurityGroup gets a reference to the given CreateLoadBalancerPayloadTargetSecurityGroup and assigns it to the TargetSecurityGroup field.
|
||||||
|
func (o *LoadBalancer) SetTargetSecurityGroup(v LoadBalancerGetTargetSecurityGroupRetType) {
|
||||||
|
setLoadBalancerGetTargetSecurityGroupAttributeType(&o.TargetSecurityGroup, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancer) GetVersion() (res LoadBalancerGetVersionRetType) {
|
||||||
|
res, _ = o.GetVersionOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancer) GetVersionOk() (ret LoadBalancerGetVersionRetType, ok bool) {
|
||||||
|
return getLoadBalancerGetVersionAttributeTypeOk(o.Version)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasVersion returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancer) HasVersion() bool {
|
||||||
|
_, ok := o.GetVersionOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetVersion gets a reference to the given string and assigns it to the Version field.
|
||||||
|
func (o *LoadBalancer) SetVersion(v LoadBalancerGetVersionRetType) {
|
||||||
|
setLoadBalancerGetVersionAttributeType(&o.Version, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o LoadBalancer) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getLoadBalancergetDisableTargetSecurityGroupAssignmentAttributeTypeOk(o.DisableTargetSecurityGroupAssignment); ok {
|
||||||
|
toSerialize["DisableTargetSecurityGroupAssignment"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetErrorsAttributeTypeOk(o.Errors); ok {
|
||||||
|
toSerialize["Errors"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetExternalAddressAttributeTypeOk(o.ExternalAddress); ok {
|
||||||
|
toSerialize["ExternalAddress"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||||
|
toSerialize["Labels"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetListenersAttributeTypeOk(o.Listeners); ok {
|
||||||
|
toSerialize["Listeners"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetLoadBalancerSecurityGroupAttributeTypeOk(o.LoadBalancerSecurityGroup); ok {
|
||||||
|
toSerialize["LoadBalancerSecurityGroup"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetNetworksAttributeTypeOk(o.Networks); ok {
|
||||||
|
toSerialize["Networks"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetOptionsAttributeTypeOk(o.Options); ok {
|
||||||
|
toSerialize["Options"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetPlanIdAttributeTypeOk(o.PlanId); ok {
|
||||||
|
toSerialize["PlanId"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetPrivateAddressAttributeTypeOk(o.PrivateAddress); ok {
|
||||||
|
toSerialize["PrivateAddress"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetRegionAttributeTypeOk(o.Region); ok {
|
||||||
|
toSerialize["Region"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetStatusAttributeTypeOk(o.Status); ok {
|
||||||
|
toSerialize["Status"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetTargetPoolsAttributeTypeOk(o.TargetPools); ok {
|
||||||
|
toSerialize["TargetPools"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetTargetSecurityGroupAttributeTypeOk(o.TargetSecurityGroup); ok {
|
||||||
|
toSerialize["TargetSecurityGroup"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerGetVersionAttributeTypeOk(o.Version); ok {
|
||||||
|
toSerialize["Version"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
296
pkg/albbeta/model_load_balancer_error.go
Normal file
296
pkg/albbeta/model_load_balancer_error.go
Normal file
|
|
@ -0,0 +1,296 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the LoadBalancerError type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &LoadBalancerError{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for description
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type LoadBalancerErrorGetDescriptionAttributeType = *string
|
||||||
|
|
||||||
|
func getLoadBalancerErrorGetDescriptionAttributeTypeOk(arg LoadBalancerErrorGetDescriptionAttributeType) (ret LoadBalancerErrorGetDescriptionRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerErrorGetDescriptionAttributeType(arg *LoadBalancerErrorGetDescriptionAttributeType, val LoadBalancerErrorGetDescriptionRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoadBalancerErrorGetDescriptionArgType = string
|
||||||
|
type LoadBalancerErrorGetDescriptionRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for type
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isEnum
|
||||||
|
|
||||||
|
// LoadBalancerErrorTypes The error type specifies which part of the application load balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the application load balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error.
|
||||||
|
// value type for enums
|
||||||
|
type LoadBalancerErrorTypes string
|
||||||
|
|
||||||
|
// List of Type
|
||||||
|
const (
|
||||||
|
LOADBALANCERERRORTYPE_UNSPECIFIED LoadBalancerErrorTypes = "TYPE_UNSPECIFIED"
|
||||||
|
LOADBALANCERERRORTYPE_INTERNAL LoadBalancerErrorTypes = "TYPE_INTERNAL"
|
||||||
|
LOADBALANCERERRORTYPE_QUOTA_SECGROUP_EXCEEDED LoadBalancerErrorTypes = "TYPE_QUOTA_SECGROUP_EXCEEDED"
|
||||||
|
LOADBALANCERERRORTYPE_QUOTA_SECGROUPRULE_EXCEEDED LoadBalancerErrorTypes = "TYPE_QUOTA_SECGROUPRULE_EXCEEDED"
|
||||||
|
LOADBALANCERERRORTYPE_PORT_NOT_CONFIGURED LoadBalancerErrorTypes = "TYPE_PORT_NOT_CONFIGURED"
|
||||||
|
LOADBALANCERERRORTYPE_FIP_NOT_CONFIGURED LoadBalancerErrorTypes = "TYPE_FIP_NOT_CONFIGURED"
|
||||||
|
LOADBALANCERERRORTYPE_TARGET_NOT_ACTIVE LoadBalancerErrorTypes = "TYPE_TARGET_NOT_ACTIVE"
|
||||||
|
LOADBALANCERERRORTYPE_METRICS_MISCONFIGURED LoadBalancerErrorTypes = "TYPE_METRICS_MISCONFIGURED"
|
||||||
|
LOADBALANCERERRORTYPE_LOGS_MISCONFIGURED LoadBalancerErrorTypes = "TYPE_LOGS_MISCONFIGURED"
|
||||||
|
)
|
||||||
|
|
||||||
|
// All allowed values of LoadBalancerError enum
|
||||||
|
var AllowedLoadBalancerErrorTypesEnumValues = []LoadBalancerErrorTypes{
|
||||||
|
"TYPE_UNSPECIFIED",
|
||||||
|
"TYPE_INTERNAL",
|
||||||
|
"TYPE_QUOTA_SECGROUP_EXCEEDED",
|
||||||
|
"TYPE_QUOTA_SECGROUPRULE_EXCEEDED",
|
||||||
|
"TYPE_PORT_NOT_CONFIGURED",
|
||||||
|
"TYPE_FIP_NOT_CONFIGURED",
|
||||||
|
"TYPE_TARGET_NOT_ACTIVE",
|
||||||
|
"TYPE_METRICS_MISCONFIGURED",
|
||||||
|
"TYPE_LOGS_MISCONFIGURED",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *LoadBalancerErrorTypes) UnmarshalJSON(src []byte) error {
|
||||||
|
// use a type alias to prevent infinite recursion during unmarshal,
|
||||||
|
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
|
||||||
|
type TmpJson LoadBalancerErrorTypes
|
||||||
|
var value TmpJson
|
||||||
|
err := json.Unmarshal(src, &value)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// Allow unmarshalling zero value for testing purposes
|
||||||
|
var zeroValue TmpJson
|
||||||
|
if value == zeroValue {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
enumTypeValue := LoadBalancerErrorTypes(value)
|
||||||
|
for _, existing := range AllowedLoadBalancerErrorTypesEnumValues {
|
||||||
|
if existing == enumTypeValue {
|
||||||
|
*v = enumTypeValue
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Errorf("%+v is not a valid LoadBalancerError", value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewLoadBalancerErrorTypesFromValue returns a pointer to a valid LoadBalancerErrorTypes
|
||||||
|
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||||
|
func NewLoadBalancerErrorTypesFromValue(v LoadBalancerErrorTypes) (*LoadBalancerErrorTypes, error) {
|
||||||
|
ev := LoadBalancerErrorTypes(v)
|
||||||
|
if ev.IsValid() {
|
||||||
|
return &ev, nil
|
||||||
|
} else {
|
||||||
|
return nil, fmt.Errorf("invalid value '%v' for LoadBalancerErrorTypes: valid values are %v", v, AllowedLoadBalancerErrorTypesEnumValues)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsValid return true if the value is valid for the enum, false otherwise
|
||||||
|
func (v LoadBalancerErrorTypes) IsValid() bool {
|
||||||
|
for _, existing := range AllowedLoadBalancerErrorTypesEnumValues {
|
||||||
|
if existing == v {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ptr returns reference to TypeTypes value
|
||||||
|
func (v LoadBalancerErrorTypes) Ptr() *LoadBalancerErrorTypes {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableLoadBalancerErrorTypes struct {
|
||||||
|
value *LoadBalancerErrorTypes
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableLoadBalancerErrorTypes) Get() *LoadBalancerErrorTypes {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableLoadBalancerErrorTypes) Set(val *LoadBalancerErrorTypes) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableLoadBalancerErrorTypes) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableLoadBalancerErrorTypes) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableLoadBalancerErrorTypes(val *LoadBalancerErrorTypes) *NullableLoadBalancerErrorTypes {
|
||||||
|
return &NullableLoadBalancerErrorTypes{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableLoadBalancerErrorTypes) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableLoadBalancerErrorTypes) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
type LoadBalancerErrorGetTypeAttributeType = *LoadBalancerErrorTypes
|
||||||
|
type LoadBalancerErrorGetTypeArgType = LoadBalancerErrorTypes
|
||||||
|
type LoadBalancerErrorGetTypeRetType = LoadBalancerErrorTypes
|
||||||
|
|
||||||
|
func getLoadBalancerErrorGetTypeAttributeTypeOk(arg LoadBalancerErrorGetTypeAttributeType) (ret LoadBalancerErrorGetTypeRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setLoadBalancerErrorGetTypeAttributeType(arg *LoadBalancerErrorGetTypeAttributeType, val LoadBalancerErrorGetTypeRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// LoadBalancerError struct for LoadBalancerError
|
||||||
|
type LoadBalancerError struct {
|
||||||
|
// The error description contains additional helpful user information to fix the error state of the application load balancer. For example the IP 45.135.247.139 does not exist in the project, then the description will report: Floating IP \"45.135.247.139\" could not be found.
|
||||||
|
Description LoadBalancerErrorGetDescriptionAttributeType `json:"description,omitempty"`
|
||||||
|
// The error type specifies which part of the application load balancer encountered the error. I.e. the API will not check if a provided public IP is actually available in the project. Instead the application load balancer with try to use the provided IP and if not available reports TYPE_FIP_NOT_CONFIGURED error.
|
||||||
|
Type LoadBalancerErrorGetTypeAttributeType `json:"type,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewLoadBalancerError instantiates a new LoadBalancerError object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewLoadBalancerError() *LoadBalancerError {
|
||||||
|
this := LoadBalancerError{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewLoadBalancerErrorWithDefaults instantiates a new LoadBalancerError object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewLoadBalancerErrorWithDefaults() *LoadBalancerError {
|
||||||
|
this := LoadBalancerError{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancerError) GetDescription() (res LoadBalancerErrorGetDescriptionRetType) {
|
||||||
|
res, _ = o.GetDescriptionOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancerError) GetDescriptionOk() (ret LoadBalancerErrorGetDescriptionRetType, ok bool) {
|
||||||
|
return getLoadBalancerErrorGetDescriptionAttributeTypeOk(o.Description)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasDescription returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancerError) HasDescription() bool {
|
||||||
|
_, ok := o.GetDescriptionOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
||||||
|
func (o *LoadBalancerError) SetDescription(v LoadBalancerErrorGetDescriptionRetType) {
|
||||||
|
setLoadBalancerErrorGetDescriptionAttributeType(&o.Description, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetType returns the Type field value if set, zero value otherwise.
|
||||||
|
func (o *LoadBalancerError) GetType() (res LoadBalancerErrorGetTypeRetType) {
|
||||||
|
res, _ = o.GetTypeOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *LoadBalancerError) GetTypeOk() (ret LoadBalancerErrorGetTypeRetType, ok bool) {
|
||||||
|
return getLoadBalancerErrorGetTypeAttributeTypeOk(o.Type)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasType returns a boolean if a field has been set.
|
||||||
|
func (o *LoadBalancerError) HasType() bool {
|
||||||
|
_, ok := o.GetTypeOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
||||||
|
func (o *LoadBalancerError) SetType(v LoadBalancerErrorGetTypeRetType) {
|
||||||
|
setLoadBalancerErrorGetTypeAttributeType(&o.Type, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o LoadBalancerError) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getLoadBalancerErrorGetDescriptionAttributeTypeOk(o.Description); ok {
|
||||||
|
toSerialize["Description"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getLoadBalancerErrorGetTypeAttributeTypeOk(o.Type); ok {
|
||||||
|
toSerialize["Type"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableLoadBalancerError struct {
|
||||||
|
value *LoadBalancerError
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableLoadBalancerError) Get() *LoadBalancerError {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableLoadBalancerError) Set(val *LoadBalancerError) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableLoadBalancerError) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableLoadBalancerError) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableLoadBalancerError(val *LoadBalancerError) *NullableLoadBalancerError {
|
||||||
|
return &NullableLoadBalancerError{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableLoadBalancerError) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableLoadBalancerError) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
107
pkg/albbeta/model_load_balancer_error_test.go
Normal file
107
pkg/albbeta/model_load_balancer_error_test.go
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
/*
|
||||||
|
STACKIT Application Load Balancer API
|
||||||
|
|
||||||
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
||||||
|
|
||||||
|
API version: 2beta2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package albbeta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// isEnum
|
||||||
|
|
||||||
|
func TestLoadBalancerErrorTypes_UnmarshalJSON(t *testing.T) {
|
||||||
|
type args struct {
|
||||||
|
src []byte
|
||||||
|
}
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
args args
|
||||||
|
wantErr bool
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 1`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"TYPE_UNSPECIFIED"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 2`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"TYPE_INTERNAL"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
| < | |||||||