feat: auto generated files and new structure (#4)
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s

## 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:
Marcel_Henselin 2026-01-29 14:10:25 +00:00 committed by Marcel_Henselin
parent 979220be66
commit 9f41c4da7f
Signed by: tf-provider.git.onstackit.cloud
GPG key ID: 6D7E8A1ED8955A9C
1283 changed files with 273211 additions and 4614 deletions

View file

@ -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",
]
}

View file

@ -1,16 +1,34 @@
name: Build
description: "Build pipeline"
inputs:
go-version:
description: "Go version to install"
default: '1.25'
required: true
golang-cilint-version:
description: "Golangci-lint version to install"
default: "2.7.2"
required: true
runs:
using: "composite"
steps:
- name: Install Go ${{ inputs.go-version }}
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
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
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
View 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
View file

@ -38,3 +38,8 @@ stackit/internal/services/iaas/test-512k.img
# Test coverage reports
coverage.out
coverage.html
generated
stackit-sdk-generator
dist
.secrets

View file

@ -5,6 +5,8 @@
# behavior.
version: 2
project_name: terraform-provider-stackitprivatepreview
builds:
- env:
# goreleaser does not work with CGO, it could also complicate
@ -29,14 +31,16 @@ builds:
ignore:
- goos: darwin
goarch: '386'
- goos: windows
goarch: arm
binary: '{{ .ProjectName }}_v{{ .Version }}'
archives:
- formats: [ 'zip' ]
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
checksum:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
# extra_files:
# - glob: 'terraform-registry-manifest.json'
# name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:

View file

@ -1,5 +1,6 @@
ROOT_DIR ?= $(shell git rev-parse --show-toplevel)
SCRIPTS_BASE ?= $(ROOT_DIR)/scripts
VERSION ?= ${VER}
# SETUP AND TOOL INITIALIZATION TASKS
project-help:
@ -57,3 +58,11 @@ test-acceptance-tf:
TF_ACC_REGION=$(TF_ACC_REGION) \
go test ./... -count=1 -timeout=30m && \
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
View 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
View 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
View 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
View 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)
}
}

View file

@ -25,16 +25,16 @@ data "stackitprivatepreview_postgresflexalpha_database" "example" {
### Required
- `database_id` (String) Database ID.
- `instance_id` (String) ID of the Postgres Flex instance.
- `project_id` (String) STACKIT project ID to which the instance is associated.
### Optional
- `database_id` (Number) Database ID.
- `name` (String) Database name.
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `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.

View 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)

View file

@ -3,12 +3,12 @@
page_title: "stackitprivatepreview_postgresflexalpha_instance Data Source - stackitprivatepreview"
subcategory: ""
description: |-
Postgres Flex instance data source schema. Must have a region specified in the provider configuration.
---
# stackitprivatepreview_postgresflexalpha_instance (Data Source)
Postgres Flex instance data source schema. Must have a `region` specified in the provider configuration.
## Example Usage
@ -24,44 +24,31 @@ data "stackitprivatepreview_postgresflexalpha_instance" "example" {
### Required
- `instance_id` (String) ID of the PostgresFlex instance.
- `project_id` (String) STACKIT project ID to which the instance is associated.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
- `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
- `backup_schedule` (String)
- `encryption` (Attributes) (see [below for nested schema](#nestedatt--encryption))
- `flavor_id` (String)
- `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`region`,`instance_id`".
- `name` (String) Instance name.
- `network` (Attributes) (see [below for nested schema](#nestedatt--network))
- `replicas` (Number)
- `retention_days` (Number)
- `storage` (Attributes) (see [below for nested schema](#nestedatt--storage))
- `version` (String)
<a id="nestedatt--encryption"></a>
### Nested Schema for `encryption`
Read-Only:
- `key_id` (String)
- `key_version` (String)
- `keyring_id` (String)
- `service_account` (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.
- `flavor_id` (String) The id of the instance flavor.
- `id` (String) The ID of the instance.
- `is_deletable` (Boolean) Whether the instance can be deleted or not.
- `name` (String) The name of the instance.
- `network` (Attributes) The access configuration of the instance (see [below for nested schema](#nestedatt--network))
- `replicas` (Number) How many replicas the instance should have.
- `retention_days` (Number) How long backups are retained. The value can only be between 32 and 365 days.
- `status` (String) The current status of the instance.
- `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--network"></a>
### Nested Schema for `network`
Read-Only:
- `access_scope` (String)
- `acl` (List of String) The Access Control List (ACL) for the PostgresFlex instance.
- `access_scope` (String) The access scope of the instance. It defines if the instance is public or airgapped.
- `acl` (List of String) List of IPV4 cidr.
- `instance_address` (String)
- `router_address` (String)
@ -71,5 +58,5 @@ Read-Only:
Read-Only:
- `class` (String)
- `size` (Number)
- `performance_class` (String) The storage class for the storage.
- `size` (Number) The storage size in Gigabytes.

View file

@ -35,10 +35,10 @@ data "stackitprivatepreview_postgresflexalpha_user" "example" {
### Read-Only
- `connection_string` (String)
- `host` (String)
- `connection_string` (String) The connection string for the user to the instance.
- `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`".
- `port` (Number)
- `roles` (Set of String)
- `status` (String)
- `username` (String)
- `port` (Number) The port number for the user to connect to the instance.
- `roles` (Set of String) The roles assigned to the user.
- `status` (String) The current status of the user.
- `username` (String) The name of the user.

View 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.

View 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.

View file

@ -3,12 +3,12 @@
page_title: "stackitprivatepreview_postgresflexalpha_instance Resource - stackitprivatepreview"
subcategory: ""
description: |-
Postgres Flex instance resource schema. Must have a region specified in the provider configuration.
---
# stackitprivatepreview_postgresflexalpha_instance (Resource)
Postgres Flex instance resource schema. Must have a `region` specified in the provider configuration.
## Example Usage
@ -42,49 +42,42 @@ import {
### Required
- `backup_schedule` (String)
- `encryption` (Attributes) The encryption block. (see [below for nested schema](#nestedatt--encryption))
- `flavor_id` (String)
- `name` (String) Instance name.
- `network` (Attributes) The network block configuration. (see [below for nested schema](#nestedatt--network))
- `project_id` (String) STACKIT project ID to which the instance is associated.
- `replicas` (Number)
- `retention_days` (Number) The days of the retention period.
- `storage` (Attributes) (see [below for nested schema](#nestedatt--storage))
- `version` (String) The database version used.
- `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.
- `flavor_id` (String) The id of the instance flavor.
- `name` (String) The name of the instance.
- `network` (Attributes) The access configuration of the instance (see [below for nested schema](#nestedatt--network))
- `replicas` (Number) How many replicas the instance should have.
- `retention_days` (Number) How long backups are retained. The value can only be between 32 and 365 days.
- `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.
### 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
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`instance_id`".
- `instance_id` (String) ID of the PostgresFlex 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.
- `id` (String) The ID of the instance.
- `is_deletable` (Boolean) Whether the instance can be deleted or not.
- `status` (String) The current status of the instance.
<a id="nestedatt--network"></a>
### Nested Schema for `network`
Required:
- `acl` (List of String) The Access Control List (ACL) for the PostgresFlex instance.
- `acl` (List of String) List of IPV4 cidr.
Optional:
- `access_scope` (String) The access scope. (Either SNA or PUBLIC)
- `instance_address` (String) The returned instance address.
- `router_address` (String) The returned router address.
- `access_scope` (String) The access scope of the instance. It defines if the instance is public or airgapped.
- `instance_address` (String)
- `router_address` (String)
<a id="nestedatt--storage"></a>
@ -92,5 +85,16 @@ Optional:
Required:
- `class` (String) The storage class used.
- `size` (Number) The disk size of the storage.
- `performance_class` (String) The storage class for 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)

View file

@ -34,8 +34,8 @@ import {
- `instance_id` (String) ID of the PostgresFlex instance.
- `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`.
- `username` (String)
- `roles` (Set of String) Database access levels for the user. Possible values are: `login`, `createdb`, `createrole`.
- `username` (String) The name of the user.
### Optional
@ -43,8 +43,10 @@ import {
### 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`".
- `password` (String, Sensitive)
- `status` (String)
- `password` (String, Sensitive) The password for the user. This is only set upon creation.
- `port` (Number) The port of the Postgres Flex instance.
- `status` (String) The current status of the user.
- `user_id` (Number) User ID.

View 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.

View file

@ -41,7 +41,6 @@ import {
### Required
- `encryption` (Attributes) The encryption block. (see [below for nested schema](#nestedatt--encryption))
- `flavor_id` (String)
- `name` (String) Instance name.
- `network` (Attributes) The network block. (see [below for nested schema](#nestedatt--network))
@ -50,6 +49,7 @@ import {
### Optional
- `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)
- `region` (String) The resource region. If not defined, the provider region is used.
- `retention_days` (Number)
@ -64,17 +64,6 @@ import {
- `instance_id` (String) ID of the SQLServer Flex instance.
- `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>
### Nested Schema for `network`
@ -89,6 +78,17 @@ Read-Only:
- `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>
### Nested Schema for `storage`

29
go.mod
View file

@ -1,6 +1,6 @@
module github.com/mhenselin/terraform-provider-stackitprivatepreview
go 1.25.5
go 1.25.6
require (
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-log v0.10.0
github.com/hashicorp/terraform-plugin-testing v1.14.0
github.com/stackitcloud/stackit-sdk-go/core v0.20.1
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.0
github.com/iancoleman/strcase v0.3.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
gopkg.in/yaml.v3 v3.0.1
)
require (
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/kr/text v0.2.0 // indirect
golang.org/x/telemetry v0.0.0-20260109210033-bd525da824e2 // indirect
golang.org/x/telemetry v0.0.0-20260116145544-c6413dc483f5 // indirect
)
require (
dario.cat/mergo v1.0.1 // indirect
github.com/ProtonMail/go-crypto v1.3.0 // indirect
github.com/agext/levenshtein v1.2.3 // 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-plugin-sdk/v2 v2.38.1 // 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/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-isatty v0.0.20 // 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/reflectwalk v1.0.2 // 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/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.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/net v0.48.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.40.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/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/protobuf v1.36.11 // indirect
)

60
go.sum
View file

@ -1,5 +1,5 @@
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
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/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
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/cloudflare/circl v1.6.2 h1:hL7VBpHHKzrV5WTfHCaBsgx/HGbBYlgrwvNXEVDYYsQ=
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/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s=
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-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-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
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 h1:wVc2vMiodOHvNZcQw/3y9af1XSomgjGSv+rv3BMCk7I=
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/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/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
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.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
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.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
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/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
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/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8=
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/stackitcloud/stackit-sdk-go/core v0.20.1/go.mod h1:fqto7M82ynGhEnpZU6VkQKYWYoFG5goC076JWXTUPRQ=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.0 h1:KgIRTw4gpxx8qoiaLGLbXPVDcBgCxPl60gigw+tizYc=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.0/go.mod h1:fd13ANCU/Pye8uDd/6E0I605+6PYfHuVIQpPEK2Ph6c=
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
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/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.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
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/go.mod h1:Ieq5AbrKGciP1V//Wq8ktsTXwSwJHDD5mD/wLBGl3p4=
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/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8=
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.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c=
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-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.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=
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-20190423024810-112230192c58/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.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
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-20260109210033-bd525da824e2/go.mod h1:b7fPSJ0pKZ3ccUh8gnTONJxhn3c/PS6tyzQvyqw4iA8=
golang.org/x/telemetry v0.0.0-20260116145544-c6413dc483f5 h1:i0p03B68+xC1kD2QUO8JzDTPXCzhN56OLJ+IhHY8U3A=
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-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg=
golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY=
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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
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-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.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA=
golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc=
golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc=
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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
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.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
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-20251222181119-0a764e51fe1b/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 h1:sNrWoksmOyF5bvJUcnmbeAmQi8baNhqg5IWaI3llQqU=
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/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=

View file

@ -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

View file

@ -1,3 +1,4 @@
version: "2"
run:
concurrency: 4
@ -67,6 +68,8 @@ linters:
- third_party$
- builtin$
- examples$
- tools/copy.go
- tools/main.go
formatters:
enable:
- gofmt

View file

@ -21,7 +21,7 @@ func main() {
flag.BoolVar(&debug, "debug", false, "allows debugging the provider")
flag.Parse()
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,
})
if err != nil {

View file

@ -0,0 +1 @@
6.6.0

2409
pkg/albbeta/api_default.go Normal file

File diff suppressed because it is too large Load diff

View 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
View 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)
}

View 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
}

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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 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)
}

View 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

View 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 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)
}

View 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

View 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)
}
})
}
}

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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

View 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)
}

View 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)
}
})
}
}

View 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)
}

View 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)
}

View 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,
},
{
name: `success - possible enum value no. 3`,
args: args{
src: []byte(`"TYPE_QUOTA_SECGROUP_EXCEEDED"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 4`,
args: args{
src: []byte(`"TYPE_QUOTA_SECGROUPRULE_EXCEEDED"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 5`,
args: args{
src: []byte(`"TYPE_PORT_NOT_CONFIGURED"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 6`,
args: args{
src: []byte(`"TYPE_FIP_NOT_CONFIGURED"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 7`,
args: args{
src: []byte(`"TYPE_TARGET_NOT_ACTIVE"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 8`,
args: args{
src: []byte(`"TYPE_METRICS_MISCONFIGURED"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 9`,
args: args{
src: []byte(`"TYPE_LOGS_MISCONFIGURED"`),
},
wantErr: false,
},
{
name: "fail",
args: args{
src: []byte("\"FOOBAR\""),
},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
v := LoadBalancerErrorTypes("")
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}

View file

@ -0,0 +1,269 @@
/*
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 LoadBalancerOptions type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LoadBalancerOptions{}
/*
types and functions for accessControl
*/
// isModel
type LoadBalancerOptionsGetAccessControlAttributeType = *LoadbalancerOptionAccessControl
type LoadBalancerOptionsGetAccessControlArgType = LoadbalancerOptionAccessControl
type LoadBalancerOptionsGetAccessControlRetType = LoadbalancerOptionAccessControl
func getLoadBalancerOptionsGetAccessControlAttributeTypeOk(arg LoadBalancerOptionsGetAccessControlAttributeType) (ret LoadBalancerOptionsGetAccessControlRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerOptionsGetAccessControlAttributeType(arg *LoadBalancerOptionsGetAccessControlAttributeType, val LoadBalancerOptionsGetAccessControlRetType) {
*arg = &val
}
/*
types and functions for ephemeralAddress
*/
// isBoolean
type LoadBalancerOptionsgetEphemeralAddressAttributeType = *bool
type LoadBalancerOptionsgetEphemeralAddressArgType = bool
type LoadBalancerOptionsgetEphemeralAddressRetType = bool
func getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(arg LoadBalancerOptionsgetEphemeralAddressAttributeType) (ret LoadBalancerOptionsgetEphemeralAddressRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerOptionsgetEphemeralAddressAttributeType(arg *LoadBalancerOptionsgetEphemeralAddressAttributeType, val LoadBalancerOptionsgetEphemeralAddressRetType) {
*arg = &val
}
/*
types and functions for observability
*/
// isModel
type LoadBalancerOptionsGetObservabilityAttributeType = *LoadbalancerOptionObservability
type LoadBalancerOptionsGetObservabilityArgType = LoadbalancerOptionObservability
type LoadBalancerOptionsGetObservabilityRetType = LoadbalancerOptionObservability
func getLoadBalancerOptionsGetObservabilityAttributeTypeOk(arg LoadBalancerOptionsGetObservabilityAttributeType) (ret LoadBalancerOptionsGetObservabilityRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerOptionsGetObservabilityAttributeType(arg *LoadBalancerOptionsGetObservabilityAttributeType, val LoadBalancerOptionsGetObservabilityRetType) {
*arg = &val
}
/*
types and functions for privateNetworkOnly
*/
// isBoolean
type LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType = *bool
type LoadBalancerOptionsgetPrivateNetworkOnlyArgType = bool
type LoadBalancerOptionsgetPrivateNetworkOnlyRetType = bool
func getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(arg LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType) (ret LoadBalancerOptionsgetPrivateNetworkOnlyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadBalancerOptionsgetPrivateNetworkOnlyAttributeType(arg *LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType, val LoadBalancerOptionsgetPrivateNetworkOnlyRetType) {
*arg = &val
}
// LoadBalancerOptions Defines any optional functionality you want to have enabled on your application load balancer.
type LoadBalancerOptions struct {
AccessControl LoadBalancerOptionsGetAccessControlAttributeType `json:"accessControl,omitempty"`
EphemeralAddress LoadBalancerOptionsgetEphemeralAddressAttributeType `json:"ephemeralAddress,omitempty"`
Observability LoadBalancerOptionsGetObservabilityAttributeType `json:"observability,omitempty"`
// Application Load Balancer is accessible only via a private network ip address. Not changeable after creation.
PrivateNetworkOnly LoadBalancerOptionsgetPrivateNetworkOnlyAttributeType `json:"privateNetworkOnly,omitempty"`
}
// NewLoadBalancerOptions instantiates a new LoadBalancerOptions object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewLoadBalancerOptions() *LoadBalancerOptions {
this := LoadBalancerOptions{}
return &this
}
// NewLoadBalancerOptionsWithDefaults instantiates a new LoadBalancerOptions object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewLoadBalancerOptionsWithDefaults() *LoadBalancerOptions {
this := LoadBalancerOptions{}
return &this
}
// GetAccessControl returns the AccessControl field value if set, zero value otherwise.
func (o *LoadBalancerOptions) GetAccessControl() (res LoadBalancerOptionsGetAccessControlRetType) {
res, _ = o.GetAccessControlOk()
return
}
// GetAccessControlOk returns a tuple with the AccessControl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancerOptions) GetAccessControlOk() (ret LoadBalancerOptionsGetAccessControlRetType, ok bool) {
return getLoadBalancerOptionsGetAccessControlAttributeTypeOk(o.AccessControl)
}
// HasAccessControl returns a boolean if a field has been set.
func (o *LoadBalancerOptions) HasAccessControl() bool {
_, ok := o.GetAccessControlOk()
return ok
}
// SetAccessControl gets a reference to the given LoadbalancerOptionAccessControl and assigns it to the AccessControl field.
func (o *LoadBalancerOptions) SetAccessControl(v LoadBalancerOptionsGetAccessControlRetType) {
setLoadBalancerOptionsGetAccessControlAttributeType(&o.AccessControl, v)
}
// GetEphemeralAddress returns the EphemeralAddress field value if set, zero value otherwise.
func (o *LoadBalancerOptions) GetEphemeralAddress() (res LoadBalancerOptionsgetEphemeralAddressRetType) {
res, _ = o.GetEphemeralAddressOk()
return
}
// GetEphemeralAddressOk returns a tuple with the EphemeralAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancerOptions) GetEphemeralAddressOk() (ret LoadBalancerOptionsgetEphemeralAddressRetType, ok bool) {
return getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(o.EphemeralAddress)
}
// HasEphemeralAddress returns a boolean if a field has been set.
func (o *LoadBalancerOptions) HasEphemeralAddress() bool {
_, ok := o.GetEphemeralAddressOk()
return ok
}
// SetEphemeralAddress gets a reference to the given bool and assigns it to the EphemeralAddress field.
func (o *LoadBalancerOptions) SetEphemeralAddress(v LoadBalancerOptionsgetEphemeralAddressRetType) {
setLoadBalancerOptionsgetEphemeralAddressAttributeType(&o.EphemeralAddress, v)
}
// GetObservability returns the Observability field value if set, zero value otherwise.
func (o *LoadBalancerOptions) GetObservability() (res LoadBalancerOptionsGetObservabilityRetType) {
res, _ = o.GetObservabilityOk()
return
}
// GetObservabilityOk returns a tuple with the Observability field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancerOptions) GetObservabilityOk() (ret LoadBalancerOptionsGetObservabilityRetType, ok bool) {
return getLoadBalancerOptionsGetObservabilityAttributeTypeOk(o.Observability)
}
// HasObservability returns a boolean if a field has been set.
func (o *LoadBalancerOptions) HasObservability() bool {
_, ok := o.GetObservabilityOk()
return ok
}
// SetObservability gets a reference to the given LoadbalancerOptionObservability and assigns it to the Observability field.
func (o *LoadBalancerOptions) SetObservability(v LoadBalancerOptionsGetObservabilityRetType) {
setLoadBalancerOptionsGetObservabilityAttributeType(&o.Observability, v)
}
// GetPrivateNetworkOnly returns the PrivateNetworkOnly field value if set, zero value otherwise.
func (o *LoadBalancerOptions) GetPrivateNetworkOnly() (res LoadBalancerOptionsgetPrivateNetworkOnlyRetType) {
res, _ = o.GetPrivateNetworkOnlyOk()
return
}
// GetPrivateNetworkOnlyOk returns a tuple with the PrivateNetworkOnly field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadBalancerOptions) GetPrivateNetworkOnlyOk() (ret LoadBalancerOptionsgetPrivateNetworkOnlyRetType, ok bool) {
return getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(o.PrivateNetworkOnly)
}
// HasPrivateNetworkOnly returns a boolean if a field has been set.
func (o *LoadBalancerOptions) HasPrivateNetworkOnly() bool {
_, ok := o.GetPrivateNetworkOnlyOk()
return ok
}
// SetPrivateNetworkOnly gets a reference to the given bool and assigns it to the PrivateNetworkOnly field.
func (o *LoadBalancerOptions) SetPrivateNetworkOnly(v LoadBalancerOptionsgetPrivateNetworkOnlyRetType) {
setLoadBalancerOptionsgetPrivateNetworkOnlyAttributeType(&o.PrivateNetworkOnly, v)
}
func (o LoadBalancerOptions) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getLoadBalancerOptionsGetAccessControlAttributeTypeOk(o.AccessControl); ok {
toSerialize["AccessControl"] = val
}
if val, ok := getLoadBalancerOptionsgetEphemeralAddressAttributeTypeOk(o.EphemeralAddress); ok {
toSerialize["EphemeralAddress"] = val
}
if val, ok := getLoadBalancerOptionsGetObservabilityAttributeTypeOk(o.Observability); ok {
toSerialize["Observability"] = val
}
if val, ok := getLoadBalancerOptionsgetPrivateNetworkOnlyAttributeTypeOk(o.PrivateNetworkOnly); ok {
toSerialize["PrivateNetworkOnly"] = val
}
return toSerialize, nil
}
type NullableLoadBalancerOptions struct {
value *LoadBalancerOptions
isSet bool
}
func (v NullableLoadBalancerOptions) Get() *LoadBalancerOptions {
return v.value
}
func (v *NullableLoadBalancerOptions) Set(val *LoadBalancerOptions) {
v.value = val
v.isSet = true
}
func (v NullableLoadBalancerOptions) IsSet() bool {
return v.isSet
}
func (v *NullableLoadBalancerOptions) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLoadBalancerOptions(val *LoadBalancerOptions) *NullableLoadBalancerOptions {
return &NullableLoadBalancerOptions{value: val, isSet: true}
}
func (v NullableLoadBalancerOptions) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLoadBalancerOptions) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

View 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 TestLoadBalancerStatus_UnmarshalJSON(t *testing.T) {
type args struct {
src []byte
}
tests := []struct {
name string
args args
wantErr bool
}{
{
name: `success - possible enum value no. 1`,
args: args{
src: []byte(`"STATUS_UNSPECIFIED"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 2`,
args: args{
src: []byte(`"STATUS_PENDING"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 3`,
args: args{
src: []byte(`"STATUS_READY"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 4`,
args: args{
src: []byte(`"STATUS_ERROR"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 5`,
args: args{
src: []byte(`"STATUS_TERMINATING"`),
},
wantErr: false,
},
{
name: "fail",
args: args{
src: []byte("\"FOOBAR\""),
},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
v := LoadBalancerStatus("")
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}

View 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 LoadbalancerOptionAccessControl type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LoadbalancerOptionAccessControl{}
/*
types and functions for allowedSourceRanges
*/
// isArray
type LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType = *[]string
type LoadbalancerOptionAccessControlGetAllowedSourceRangesArgType = []string
type LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType = []string
func getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(arg LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType) (ret LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType(arg *LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType, val LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) {
*arg = &val
}
// LoadbalancerOptionAccessControl Use this option to limit the IP ranges that can use the application load balancer.
type LoadbalancerOptionAccessControl struct {
// Application Load Balancer is accessible only from an IP address in this range
AllowedSourceRanges LoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType `json:"allowedSourceRanges,omitempty"`
}
// NewLoadbalancerOptionAccessControl instantiates a new LoadbalancerOptionAccessControl object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewLoadbalancerOptionAccessControl() *LoadbalancerOptionAccessControl {
this := LoadbalancerOptionAccessControl{}
return &this
}
// NewLoadbalancerOptionAccessControlWithDefaults instantiates a new LoadbalancerOptionAccessControl object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewLoadbalancerOptionAccessControlWithDefaults() *LoadbalancerOptionAccessControl {
this := LoadbalancerOptionAccessControl{}
return &this
}
// GetAllowedSourceRanges returns the AllowedSourceRanges field value if set, zero value otherwise.
func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRanges() (res LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) {
res, _ = o.GetAllowedSourceRangesOk()
return
}
// GetAllowedSourceRangesOk returns a tuple with the AllowedSourceRanges field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadbalancerOptionAccessControl) GetAllowedSourceRangesOk() (ret LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType, ok bool) {
return getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(o.AllowedSourceRanges)
}
// HasAllowedSourceRanges returns a boolean if a field has been set.
func (o *LoadbalancerOptionAccessControl) HasAllowedSourceRanges() bool {
_, ok := o.GetAllowedSourceRangesOk()
return ok
}
// SetAllowedSourceRanges gets a reference to the given []string and assigns it to the AllowedSourceRanges field.
func (o *LoadbalancerOptionAccessControl) SetAllowedSourceRanges(v LoadbalancerOptionAccessControlGetAllowedSourceRangesRetType) {
setLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeType(&o.AllowedSourceRanges, v)
}
func (o LoadbalancerOptionAccessControl) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getLoadbalancerOptionAccessControlGetAllowedSourceRangesAttributeTypeOk(o.AllowedSourceRanges); ok {
toSerialize["AllowedSourceRanges"] = val
}
return toSerialize, nil
}
type NullableLoadbalancerOptionAccessControl struct {
value *LoadbalancerOptionAccessControl
isSet bool
}
func (v NullableLoadbalancerOptionAccessControl) Get() *LoadbalancerOptionAccessControl {
return v.value
}
func (v *NullableLoadbalancerOptionAccessControl) Set(val *LoadbalancerOptionAccessControl) {
v.value = val
v.isSet = true
}
func (v NullableLoadbalancerOptionAccessControl) IsSet() bool {
return v.isSet
}
func (v *NullableLoadbalancerOptionAccessControl) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLoadbalancerOptionAccessControl(val *LoadbalancerOptionAccessControl) *NullableLoadbalancerOptionAccessControl {
return &NullableLoadbalancerOptionAccessControl{value: val, isSet: true}
}
func (v NullableLoadbalancerOptionAccessControl) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLoadbalancerOptionAccessControl) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

View 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 LoadbalancerOptionLogs type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LoadbalancerOptionLogs{}
/*
types and functions for credentialsRef
*/
// isNotNullableString
type LoadbalancerOptionLogsGetCredentialsRefAttributeType = *string
func getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(arg LoadbalancerOptionLogsGetCredentialsRefAttributeType) (ret LoadbalancerOptionLogsGetCredentialsRefRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadbalancerOptionLogsGetCredentialsRefAttributeType(arg *LoadbalancerOptionLogsGetCredentialsRefAttributeType, val LoadbalancerOptionLogsGetCredentialsRefRetType) {
*arg = &val
}
type LoadbalancerOptionLogsGetCredentialsRefArgType = string
type LoadbalancerOptionLogsGetCredentialsRefRetType = string
/*
types and functions for pushUrl
*/
// isNotNullableString
type LoadbalancerOptionLogsGetPushUrlAttributeType = *string
func getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(arg LoadbalancerOptionLogsGetPushUrlAttributeType) (ret LoadbalancerOptionLogsGetPushUrlRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadbalancerOptionLogsGetPushUrlAttributeType(arg *LoadbalancerOptionLogsGetPushUrlAttributeType, val LoadbalancerOptionLogsGetPushUrlRetType) {
*arg = &val
}
type LoadbalancerOptionLogsGetPushUrlArgType = string
type LoadbalancerOptionLogsGetPushUrlRetType = string
// LoadbalancerOptionLogs struct for LoadbalancerOptionLogs
type LoadbalancerOptionLogs struct {
// Credentials reference for logging. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the logging solution the push URL points to. Then this enables monitoring via remote write for the Application Load Balancer.
CredentialsRef LoadbalancerOptionLogsGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"`
// The Observability(Logs)/Loki remote write Push URL you want the logs to be shipped to.
PushUrl LoadbalancerOptionLogsGetPushUrlAttributeType `json:"pushUrl,omitempty"`
}
// NewLoadbalancerOptionLogs instantiates a new LoadbalancerOptionLogs object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewLoadbalancerOptionLogs() *LoadbalancerOptionLogs {
this := LoadbalancerOptionLogs{}
return &this
}
// NewLoadbalancerOptionLogsWithDefaults instantiates a new LoadbalancerOptionLogs object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewLoadbalancerOptionLogsWithDefaults() *LoadbalancerOptionLogs {
this := LoadbalancerOptionLogs{}
return &this
}
// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise.
func (o *LoadbalancerOptionLogs) GetCredentialsRef() (res LoadbalancerOptionLogsGetCredentialsRefRetType) {
res, _ = o.GetCredentialsRefOk()
return
}
// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadbalancerOptionLogs) GetCredentialsRefOk() (ret LoadbalancerOptionLogsGetCredentialsRefRetType, ok bool) {
return getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(o.CredentialsRef)
}
// HasCredentialsRef returns a boolean if a field has been set.
func (o *LoadbalancerOptionLogs) HasCredentialsRef() bool {
_, ok := o.GetCredentialsRefOk()
return ok
}
// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field.
func (o *LoadbalancerOptionLogs) SetCredentialsRef(v LoadbalancerOptionLogsGetCredentialsRefRetType) {
setLoadbalancerOptionLogsGetCredentialsRefAttributeType(&o.CredentialsRef, v)
}
// GetPushUrl returns the PushUrl field value if set, zero value otherwise.
func (o *LoadbalancerOptionLogs) GetPushUrl() (res LoadbalancerOptionLogsGetPushUrlRetType) {
res, _ = o.GetPushUrlOk()
return
}
// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadbalancerOptionLogs) GetPushUrlOk() (ret LoadbalancerOptionLogsGetPushUrlRetType, ok bool) {
return getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(o.PushUrl)
}
// HasPushUrl returns a boolean if a field has been set.
func (o *LoadbalancerOptionLogs) HasPushUrl() bool {
_, ok := o.GetPushUrlOk()
return ok
}
// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field.
func (o *LoadbalancerOptionLogs) SetPushUrl(v LoadbalancerOptionLogsGetPushUrlRetType) {
setLoadbalancerOptionLogsGetPushUrlAttributeType(&o.PushUrl, v)
}
func (o LoadbalancerOptionLogs) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getLoadbalancerOptionLogsGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok {
toSerialize["CredentialsRef"] = val
}
if val, ok := getLoadbalancerOptionLogsGetPushUrlAttributeTypeOk(o.PushUrl); ok {
toSerialize["PushUrl"] = val
}
return toSerialize, nil
}
type NullableLoadbalancerOptionLogs struct {
value *LoadbalancerOptionLogs
isSet bool
}
func (v NullableLoadbalancerOptionLogs) Get() *LoadbalancerOptionLogs {
return v.value
}
func (v *NullableLoadbalancerOptionLogs) Set(val *LoadbalancerOptionLogs) {
v.value = val
v.isSet = true
}
func (v NullableLoadbalancerOptionLogs) IsSet() bool {
return v.isSet
}
func (v *NullableLoadbalancerOptionLogs) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLoadbalancerOptionLogs(val *LoadbalancerOptionLogs) *NullableLoadbalancerOptionLogs {
return &NullableLoadbalancerOptionLogs{value: val, isSet: true}
}
func (v NullableLoadbalancerOptionLogs) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLoadbalancerOptionLogs) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

View 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 LoadbalancerOptionMetrics type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LoadbalancerOptionMetrics{}
/*
types and functions for credentialsRef
*/
// isNotNullableString
type LoadbalancerOptionMetricsGetCredentialsRefAttributeType = *string
func getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(arg LoadbalancerOptionMetricsGetCredentialsRefAttributeType) (ret LoadbalancerOptionMetricsGetCredentialsRefRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadbalancerOptionMetricsGetCredentialsRefAttributeType(arg *LoadbalancerOptionMetricsGetCredentialsRefAttributeType, val LoadbalancerOptionMetricsGetCredentialsRefRetType) {
*arg = &val
}
type LoadbalancerOptionMetricsGetCredentialsRefArgType = string
type LoadbalancerOptionMetricsGetCredentialsRefRetType = string
/*
types and functions for pushUrl
*/
// isNotNullableString
type LoadbalancerOptionMetricsGetPushUrlAttributeType = *string
func getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(arg LoadbalancerOptionMetricsGetPushUrlAttributeType) (ret LoadbalancerOptionMetricsGetPushUrlRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadbalancerOptionMetricsGetPushUrlAttributeType(arg *LoadbalancerOptionMetricsGetPushUrlAttributeType, val LoadbalancerOptionMetricsGetPushUrlRetType) {
*arg = &val
}
type LoadbalancerOptionMetricsGetPushUrlArgType = string
type LoadbalancerOptionMetricsGetPushUrlRetType = string
// LoadbalancerOptionMetrics struct for LoadbalancerOptionMetrics
type LoadbalancerOptionMetrics struct {
// Credentials reference for metrics. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the metrics solution the push URL points to. Then this enables monitoring via remote write for the Application Load Balancer.
CredentialsRef LoadbalancerOptionMetricsGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"`
// The Observability(Metrics)/Prometheus remote write push URL you want the metrics to be shipped to.
PushUrl LoadbalancerOptionMetricsGetPushUrlAttributeType `json:"pushUrl,omitempty"`
}
// NewLoadbalancerOptionMetrics instantiates a new LoadbalancerOptionMetrics object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewLoadbalancerOptionMetrics() *LoadbalancerOptionMetrics {
this := LoadbalancerOptionMetrics{}
return &this
}
// NewLoadbalancerOptionMetricsWithDefaults instantiates a new LoadbalancerOptionMetrics object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewLoadbalancerOptionMetricsWithDefaults() *LoadbalancerOptionMetrics {
this := LoadbalancerOptionMetrics{}
return &this
}
// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise.
func (o *LoadbalancerOptionMetrics) GetCredentialsRef() (res LoadbalancerOptionMetricsGetCredentialsRefRetType) {
res, _ = o.GetCredentialsRefOk()
return
}
// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadbalancerOptionMetrics) GetCredentialsRefOk() (ret LoadbalancerOptionMetricsGetCredentialsRefRetType, ok bool) {
return getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(o.CredentialsRef)
}
// HasCredentialsRef returns a boolean if a field has been set.
func (o *LoadbalancerOptionMetrics) HasCredentialsRef() bool {
_, ok := o.GetCredentialsRefOk()
return ok
}
// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field.
func (o *LoadbalancerOptionMetrics) SetCredentialsRef(v LoadbalancerOptionMetricsGetCredentialsRefRetType) {
setLoadbalancerOptionMetricsGetCredentialsRefAttributeType(&o.CredentialsRef, v)
}
// GetPushUrl returns the PushUrl field value if set, zero value otherwise.
func (o *LoadbalancerOptionMetrics) GetPushUrl() (res LoadbalancerOptionMetricsGetPushUrlRetType) {
res, _ = o.GetPushUrlOk()
return
}
// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadbalancerOptionMetrics) GetPushUrlOk() (ret LoadbalancerOptionMetricsGetPushUrlRetType, ok bool) {
return getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(o.PushUrl)
}
// HasPushUrl returns a boolean if a field has been set.
func (o *LoadbalancerOptionMetrics) HasPushUrl() bool {
_, ok := o.GetPushUrlOk()
return ok
}
// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field.
func (o *LoadbalancerOptionMetrics) SetPushUrl(v LoadbalancerOptionMetricsGetPushUrlRetType) {
setLoadbalancerOptionMetricsGetPushUrlAttributeType(&o.PushUrl, v)
}
func (o LoadbalancerOptionMetrics) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok {
toSerialize["CredentialsRef"] = val
}
if val, ok := getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(o.PushUrl); ok {
toSerialize["PushUrl"] = val
}
return toSerialize, nil
}
type NullableLoadbalancerOptionMetrics struct {
value *LoadbalancerOptionMetrics
isSet bool
}
func (v NullableLoadbalancerOptionMetrics) Get() *LoadbalancerOptionMetrics {
return v.value
}
func (v *NullableLoadbalancerOptionMetrics) Set(val *LoadbalancerOptionMetrics) {
v.value = val
v.isSet = true
}
func (v NullableLoadbalancerOptionMetrics) IsSet() bool {
return v.isSet
}
func (v *NullableLoadbalancerOptionMetrics) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLoadbalancerOptionMetrics(val *LoadbalancerOptionMetrics) *NullableLoadbalancerOptionMetrics {
return &NullableLoadbalancerOptionMetrics{value: val, isSet: true}
}
func (v NullableLoadbalancerOptionMetrics) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLoadbalancerOptionMetrics) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

View file

@ -0,0 +1,174 @@
/*
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 LoadbalancerOptionObservability type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LoadbalancerOptionObservability{}
/*
types and functions for logs
*/
// isModel
type LoadbalancerOptionObservabilityGetLogsAttributeType = *LoadbalancerOptionLogs
type LoadbalancerOptionObservabilityGetLogsArgType = LoadbalancerOptionLogs
type LoadbalancerOptionObservabilityGetLogsRetType = LoadbalancerOptionLogs
func getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(arg LoadbalancerOptionObservabilityGetLogsAttributeType) (ret LoadbalancerOptionObservabilityGetLogsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadbalancerOptionObservabilityGetLogsAttributeType(arg *LoadbalancerOptionObservabilityGetLogsAttributeType, val LoadbalancerOptionObservabilityGetLogsRetType) {
*arg = &val
}
/*
types and functions for metrics
*/
// isModel
type LoadbalancerOptionObservabilityGetMetricsAttributeType = *LoadbalancerOptionMetrics
type LoadbalancerOptionObservabilityGetMetricsArgType = LoadbalancerOptionMetrics
type LoadbalancerOptionObservabilityGetMetricsRetType = LoadbalancerOptionMetrics
func getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(arg LoadbalancerOptionObservabilityGetMetricsAttributeType) (ret LoadbalancerOptionObservabilityGetMetricsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setLoadbalancerOptionObservabilityGetMetricsAttributeType(arg *LoadbalancerOptionObservabilityGetMetricsAttributeType, val LoadbalancerOptionObservabilityGetMetricsRetType) {
*arg = &val
}
// LoadbalancerOptionObservability We offer Load Balancer observability via STACKIT Observability or external solutions.
type LoadbalancerOptionObservability struct {
Logs LoadbalancerOptionObservabilityGetLogsAttributeType `json:"logs,omitempty"`
Metrics LoadbalancerOptionObservabilityGetMetricsAttributeType `json:"metrics,omitempty"`
}
// NewLoadbalancerOptionObservability instantiates a new LoadbalancerOptionObservability object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewLoadbalancerOptionObservability() *LoadbalancerOptionObservability {
this := LoadbalancerOptionObservability{}
return &this
}
// NewLoadbalancerOptionObservabilityWithDefaults instantiates a new LoadbalancerOptionObservability object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewLoadbalancerOptionObservabilityWithDefaults() *LoadbalancerOptionObservability {
this := LoadbalancerOptionObservability{}
return &this
}
// GetLogs returns the Logs field value if set, zero value otherwise.
func (o *LoadbalancerOptionObservability) GetLogs() (res LoadbalancerOptionObservabilityGetLogsRetType) {
res, _ = o.GetLogsOk()
return
}
// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadbalancerOptionObservability) GetLogsOk() (ret LoadbalancerOptionObservabilityGetLogsRetType, ok bool) {
return getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(o.Logs)
}
// HasLogs returns a boolean if a field has been set.
func (o *LoadbalancerOptionObservability) HasLogs() bool {
_, ok := o.GetLogsOk()
return ok
}
// SetLogs gets a reference to the given LoadbalancerOptionLogs and assigns it to the Logs field.
func (o *LoadbalancerOptionObservability) SetLogs(v LoadbalancerOptionObservabilityGetLogsRetType) {
setLoadbalancerOptionObservabilityGetLogsAttributeType(&o.Logs, v)
}
// GetMetrics returns the Metrics field value if set, zero value otherwise.
func (o *LoadbalancerOptionObservability) GetMetrics() (res LoadbalancerOptionObservabilityGetMetricsRetType) {
res, _ = o.GetMetricsOk()
return
}
// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LoadbalancerOptionObservability) GetMetricsOk() (ret LoadbalancerOptionObservabilityGetMetricsRetType, ok bool) {
return getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(o.Metrics)
}
// HasMetrics returns a boolean if a field has been set.
func (o *LoadbalancerOptionObservability) HasMetrics() bool {
_, ok := o.GetMetricsOk()
return ok
}
// SetMetrics gets a reference to the given LoadbalancerOptionMetrics and assigns it to the Metrics field.
func (o *LoadbalancerOptionObservability) SetMetrics(v LoadbalancerOptionObservabilityGetMetricsRetType) {
setLoadbalancerOptionObservabilityGetMetricsAttributeType(&o.Metrics, v)
}
func (o LoadbalancerOptionObservability) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getLoadbalancerOptionObservabilityGetLogsAttributeTypeOk(o.Logs); ok {
toSerialize["Logs"] = val
}
if val, ok := getLoadbalancerOptionObservabilityGetMetricsAttributeTypeOk(o.Metrics); ok {
toSerialize["Metrics"] = val
}
return toSerialize, nil
}
type NullableLoadbalancerOptionObservability struct {
value *LoadbalancerOptionObservability
isSet bool
}
func (v NullableLoadbalancerOptionObservability) Get() *LoadbalancerOptionObservability {
return v.value
}
func (v *NullableLoadbalancerOptionObservability) Set(val *LoadbalancerOptionObservability) {
v.value = val
v.isSet = true
}
func (v NullableLoadbalancerOptionObservability) IsSet() bool {
return v.isSet
}
func (v *NullableLoadbalancerOptionObservability) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLoadbalancerOptionObservability(val *LoadbalancerOptionObservability) *NullableLoadbalancerOptionObservability {
return &NullableLoadbalancerOptionObservability{value: val, isSet: true}
}
func (v NullableLoadbalancerOptionObservability) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLoadbalancerOptionObservability) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

View file

@ -0,0 +1,286 @@
/*
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 Network type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Network{}
/*
types and functions for networkId
*/
// isNotNullableString
type NetworkGetNetworkIdAttributeType = *string
func getNetworkGetNetworkIdAttributeTypeOk(arg NetworkGetNetworkIdAttributeType) (ret NetworkGetNetworkIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setNetworkGetNetworkIdAttributeType(arg *NetworkGetNetworkIdAttributeType, val NetworkGetNetworkIdRetType) {
*arg = &val
}
type NetworkGetNetworkIdArgType = string
type NetworkGetNetworkIdRetType = string
/*
types and functions for role
*/
// isEnum
// NetworkRole The role defines how the Application Load Balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported.
// value type for enums
type NetworkRole string
// List of Role
const (
NETWORKROLE_UNSPECIFIED NetworkRole = "ROLE_UNSPECIFIED"
NETWORKROLE_LISTENERS_AND_TARGETS NetworkRole = "ROLE_LISTENERS_AND_TARGETS"
NETWORKROLE_LISTENERS NetworkRole = "ROLE_LISTENERS"
NETWORKROLE_TARGETS NetworkRole = "ROLE_TARGETS"
)
// All allowed values of Network enum
var AllowedNetworkRoleEnumValues = []NetworkRole{
"ROLE_UNSPECIFIED",
"ROLE_LISTENERS_AND_TARGETS",
"ROLE_LISTENERS",
"ROLE_TARGETS",
}
func (v *NetworkRole) UnmarshalJSON(src []byte) error {
// use a type alias to prevent infinite recursion during unmarshal,
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
type TmpJson NetworkRole
var value TmpJson
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
// Allow unmarshalling zero value for testing purposes
var zeroValue TmpJson
if value == zeroValue {
return nil
}
enumTypeValue := NetworkRole(value)
for _, existing := range AllowedNetworkRoleEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid Network", value)
}
// NewNetworkRoleFromValue returns a pointer to a valid NetworkRole
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewNetworkRoleFromValue(v NetworkRole) (*NetworkRole, error) {
ev := NetworkRole(v)
if ev.IsValid() {
return &ev, nil
} else {
return nil, fmt.Errorf("invalid value '%v' for NetworkRole: valid values are %v", v, AllowedNetworkRoleEnumValues)
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v NetworkRole) IsValid() bool {
for _, existing := range AllowedNetworkRoleEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to RoleRole value
func (v NetworkRole) Ptr() *NetworkRole {
return &v
}
type NullableNetworkRole struct {
value *NetworkRole
isSet bool
}
func (v NullableNetworkRole) Get() *NetworkRole {
return v.value
}
func (v *NullableNetworkRole) Set(val *NetworkRole) {
v.value = val
v.isSet = true
}
func (v NullableNetworkRole) IsSet() bool {
return v.isSet
}
func (v *NullableNetworkRole) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNetworkRole(val *NetworkRole) *NullableNetworkRole {
return &NullableNetworkRole{value: val, isSet: true}
}
func (v NullableNetworkRole) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNetworkRole) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
type NetworkGetRoleAttributeType = *NetworkRole
type NetworkGetRoleArgType = NetworkRole
type NetworkGetRoleRetType = NetworkRole
func getNetworkGetRoleAttributeTypeOk(arg NetworkGetRoleAttributeType) (ret NetworkGetRoleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setNetworkGetRoleAttributeType(arg *NetworkGetRoleAttributeType, val NetworkGetRoleRetType) {
*arg = &val
}
// Network struct for Network
type Network struct {
// Openstack network ID
NetworkId NetworkGetNetworkIdAttributeType `json:"networkId,omitempty"`
// The role defines how the Application Load Balancer is using the network. Currently only ROLE_LISTENERS_AND_TARGETS is supported.
Role NetworkGetRoleAttributeType `json:"role,omitempty"`
}
// NewNetwork instantiates a new Network object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewNetwork() *Network {
this := Network{}
return &this
}
// NewNetworkWithDefaults instantiates a new Network object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewNetworkWithDefaults() *Network {
this := Network{}
return &this
}
// GetNetworkId returns the NetworkId field value if set, zero value otherwise.
func (o *Network) GetNetworkId() (res NetworkGetNetworkIdRetType) {
res, _ = o.GetNetworkIdOk()
return
}
// GetNetworkIdOk returns a tuple with the NetworkId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Network) GetNetworkIdOk() (ret NetworkGetNetworkIdRetType, ok bool) {
return getNetworkGetNetworkIdAttributeTypeOk(o.NetworkId)
}
// HasNetworkId returns a boolean if a field has been set.
func (o *Network) HasNetworkId() bool {
_, ok := o.GetNetworkIdOk()
return ok
}
// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field.
func (o *Network) SetNetworkId(v NetworkGetNetworkIdRetType) {
setNetworkGetNetworkIdAttributeType(&o.NetworkId, v)
}
// GetRole returns the Role field value if set, zero value otherwise.
func (o *Network) GetRole() (res NetworkGetRoleRetType) {
res, _ = o.GetRoleOk()
return
}
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Network) GetRoleOk() (ret NetworkGetRoleRetType, ok bool) {
return getNetworkGetRoleAttributeTypeOk(o.Role)
}
// HasRole returns a boolean if a field has been set.
func (o *Network) HasRole() bool {
_, ok := o.GetRoleOk()
return ok
}
// SetRole gets a reference to the given string and assigns it to the Role field.
func (o *Network) SetRole(v NetworkGetRoleRetType) {
setNetworkGetRoleAttributeType(&o.Role, v)
}
func (o Network) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getNetworkGetNetworkIdAttributeTypeOk(o.NetworkId); ok {
toSerialize["NetworkId"] = val
}
if val, ok := getNetworkGetRoleAttributeTypeOk(o.Role); ok {
toSerialize["Role"] = val
}
return toSerialize, nil
}
type NullableNetwork struct {
value *Network
isSet bool
}
func (v NullableNetwork) Get() *Network {
return v.value
}
func (v *NullableNetwork) Set(val *Network) {
v.value = val
v.isSet = true
}
func (v NullableNetwork) IsSet() bool {
return v.isSet
}
func (v *NullableNetwork) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNetwork(val *Network) *NullableNetwork {
return &NullableNetwork{value: val, isSet: true}
}
func (v NullableNetwork) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNetwork) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,72 @@
/*
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 TestNetworkRole_UnmarshalJSON(t *testing.T) {
type args struct {
src []byte
}
tests := []struct {
name string
args args
wantErr bool
}{
{
name: `success - possible enum value no. 1`,
args: args{
src: []byte(`"ROLE_UNSPECIFIED"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 2`,
args: args{
src: []byte(`"ROLE_LISTENERS_AND_TARGETS"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 3`,
args: args{
src: []byte(`"ROLE_LISTENERS"`),
},
wantErr: false,
},
{
name: `success - possible enum value no. 4`,
args: args{
src: []byte(`"ROLE_TARGETS"`),
},
wantErr: false,
},
{
name: "fail",
args: args{
src: []byte("\"FOOBAR\""),
},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
v := NetworkRole("")
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}

178
pkg/albbeta/model_path.go Normal file
View 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 Path type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Path{}
/*
types and functions for exact
*/
// isNotNullableString
type PathGetExactAttributeType = *string
func getPathGetExactAttributeTypeOk(arg PathGetExactAttributeType) (ret PathGetExactRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPathGetExactAttributeType(arg *PathGetExactAttributeType, val PathGetExactRetType) {
*arg = &val
}
type PathGetExactArgType = string
type PathGetExactRetType = string
/*
types and functions for prefix
*/
// isNotNullableString
type PathGetPrefixAttributeType = *string
func getPathGetPrefixAttributeTypeOk(arg PathGetPrefixAttributeType) (ret PathGetPrefixRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPathGetPrefixAttributeType(arg *PathGetPrefixAttributeType, val PathGetPrefixRetType) {
*arg = &val
}
type PathGetPrefixArgType = string
type PathGetPrefixRetType = string
// Path struct for Path
type Path struct {
// Exact path match. Only a request path exactly equal to the value will match, e.g. '/foo' matches only '/foo', not '/foo/bar' or '/foobar'.
Exact PathGetExactAttributeType `json:"exact,omitempty"`
// Prefix path match. Only matches on full segment boundaries, e.g. '/foo' matches '/foo' and '/foo/bar' but NOT '/foobar'.
Prefix PathGetPrefixAttributeType `json:"prefix,omitempty"`
}
// NewPath instantiates a new Path object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewPath() *Path {
this := Path{}
return &this
}
// NewPathWithDefaults instantiates a new Path object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewPathWithDefaults() *Path {
this := Path{}
return &this
}
// GetExact returns the Exact field value if set, zero value otherwise.
func (o *Path) GetExact() (res PathGetExactRetType) {
res, _ = o.GetExactOk()
return
}
// GetExactOk returns a tuple with the Exact field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Path) GetExactOk() (ret PathGetExactRetType, ok bool) {
return getPathGetExactAttributeTypeOk(o.Exact)
}
// HasExact returns a boolean if a field has been set.
func (o *Path) HasExact() bool {
_, ok := o.GetExactOk()
return ok
}
// SetExact gets a reference to the given string and assigns it to the Exact field.
func (o *Path) SetExact(v PathGetExactRetType) {
setPathGetExactAttributeType(&o.Exact, v)
}
// GetPrefix returns the Prefix field value if set, zero value otherwise.
func (o *Path) GetPrefix() (res PathGetPrefixRetType) {
res, _ = o.GetPrefixOk()
return
}
// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Path) GetPrefixOk() (ret PathGetPrefixRetType, ok bool) {
return getPathGetPrefixAttributeTypeOk(o.Prefix)
}
// HasPrefix returns a boolean if a field has been set.
func (o *Path) HasPrefix() bool {
_, ok := o.GetPrefixOk()
return ok
}
// SetPrefix gets a reference to the given string and assigns it to the Prefix field.
func (o *Path) SetPrefix(v PathGetPrefixRetType) {
setPathGetPrefixAttributeType(&o.Prefix, v)
}
func (o Path) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getPathGetExactAttributeTypeOk(o.Exact); ok {
toSerialize["Exact"] = val
}
if val, ok := getPathGetPrefixAttributeTypeOk(o.Prefix); ok {
toSerialize["Prefix"] = val
}
return toSerialize, nil
}
type NullablePath struct {
value *Path
isSet bool
}
func (v NullablePath) Get() *Path {
return v.value
}
func (v *NullablePath) Set(val *Path) {
v.value = val
v.isSet = true
}
func (v NullablePath) IsSet() bool {
return v.isSet
}
func (v *NullablePath) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePath(val *Path) *NullablePath {
return &NullablePath{value: val, isSet: true}
}
func (v NullablePath) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePath) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

View file

@ -0,0 +1,374 @@
/*
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 PlanDetails type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PlanDetails{}
/*
types and functions for description
*/
// isNotNullableString
type PlanDetailsGetDescriptionAttributeType = *string
func getPlanDetailsGetDescriptionAttributeTypeOk(arg PlanDetailsGetDescriptionAttributeType) (ret PlanDetailsGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPlanDetailsGetDescriptionAttributeType(arg *PlanDetailsGetDescriptionAttributeType, val PlanDetailsGetDescriptionRetType) {
*arg = &val
}
type PlanDetailsGetDescriptionArgType = string
type PlanDetailsGetDescriptionRetType = string
/*
types and functions for flavorName
*/
// isNotNullableString
type PlanDetailsGetFlavorNameAttributeType = *string
func getPlanDetailsGetFlavorNameAttributeTypeOk(arg PlanDetailsGetFlavorNameAttributeType) (ret PlanDetailsGetFlavorNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPlanDetailsGetFlavorNameAttributeType(arg *PlanDetailsGetFlavorNameAttributeType, val PlanDetailsGetFlavorNameRetType) {
*arg = &val
}
type PlanDetailsGetFlavorNameArgType = string
type PlanDetailsGetFlavorNameRetType = string
/*
types and functions for maxConnections
*/
// isInteger
type PlanDetailsGetMaxConnectionsAttributeType = *int64
type PlanDetailsGetMaxConnectionsArgType = int64
type PlanDetailsGetMaxConnectionsRetType = int64
func getPlanDetailsGetMaxConnectionsAttributeTypeOk(arg PlanDetailsGetMaxConnectionsAttributeType) (ret PlanDetailsGetMaxConnectionsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPlanDetailsGetMaxConnectionsAttributeType(arg *PlanDetailsGetMaxConnectionsAttributeType, val PlanDetailsGetMaxConnectionsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type PlanDetailsGetNameAttributeType = *string
func getPlanDetailsGetNameAttributeTypeOk(arg PlanDetailsGetNameAttributeType) (ret PlanDetailsGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPlanDetailsGetNameAttributeType(arg *PlanDetailsGetNameAttributeType, val PlanDetailsGetNameRetType) {
*arg = &val
}
type PlanDetailsGetNameArgType = string
type PlanDetailsGetNameRetType = string
/*
types and functions for planId
*/
// isNotNullableString
type PlanDetailsGetPlanIdAttributeType = *string
func getPlanDetailsGetPlanIdAttributeTypeOk(arg PlanDetailsGetPlanIdAttributeType) (ret PlanDetailsGetPlanIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPlanDetailsGetPlanIdAttributeType(arg *PlanDetailsGetPlanIdAttributeType, val PlanDetailsGetPlanIdRetType) {
*arg = &val
}
type PlanDetailsGetPlanIdArgType = string
type PlanDetailsGetPlanIdRetType = string
/*
types and functions for region
*/
// isNotNullableString
type PlanDetailsGetRegionAttributeType = *string
func getPlanDetailsGetRegionAttributeTypeOk(arg PlanDetailsGetRegionAttributeType) (ret PlanDetailsGetRegionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPlanDetailsGetRegionAttributeType(arg *PlanDetailsGetRegionAttributeType, val PlanDetailsGetRegionRetType) {
*arg = &val
}
type PlanDetailsGetRegionArgType = string
type PlanDetailsGetRegionRetType = string
// PlanDetails struct for PlanDetails
type PlanDetails struct {
// Description
Description PlanDetailsGetDescriptionAttributeType `json:"description,omitempty"`
// Flavor Name
FlavorName PlanDetailsGetFlavorNameAttributeType `json:"flavorName,omitempty"`
// Maximum number of concurrent connections per application load balancer VM instance.
// Can be cast to int32 without loss of precision.
MaxConnections PlanDetailsGetMaxConnectionsAttributeType `json:"maxConnections,omitempty"`
// Service Plan Name
Name PlanDetailsGetNameAttributeType `json:"name,omitempty"`
// Service Plan Identifier
PlanId PlanDetailsGetPlanIdAttributeType `json:"planId,omitempty"`
// Region this Plan is available in
Region PlanDetailsGetRegionAttributeType `json:"region,omitempty"`
}
// NewPlanDetails instantiates a new PlanDetails object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewPlanDetails() *PlanDetails {
this := PlanDetails{}
return &this
}
// NewPlanDetailsWithDefaults instantiates a new PlanDetails object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewPlanDetailsWithDefaults() *PlanDetails {
this := PlanDetails{}
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *PlanDetails) GetDescription() (res PlanDetailsGetDescriptionRetType) {
res, _ = o.GetDescriptionOk()
return
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlanDetails) GetDescriptionOk() (ret PlanDetailsGetDescriptionRetType, ok bool) {
return getPlanDetailsGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *PlanDetails) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *PlanDetails) SetDescription(v PlanDetailsGetDescriptionRetType) {
setPlanDetailsGetDescriptionAttributeType(&o.Description, v)
}
// GetFlavorName returns the FlavorName field value if set, zero value otherwise.
func (o *PlanDetails) GetFlavorName() (res PlanDetailsGetFlavorNameRetType) {
res, _ = o.GetFlavorNameOk()
return
}
// GetFlavorNameOk returns a tuple with the FlavorName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlanDetails) GetFlavorNameOk() (ret PlanDetailsGetFlavorNameRetType, ok bool) {
return getPlanDetailsGetFlavorNameAttributeTypeOk(o.FlavorName)
}
// HasFlavorName returns a boolean if a field has been set.
func (o *PlanDetails) HasFlavorName() bool {
_, ok := o.GetFlavorNameOk()
return ok
}
// SetFlavorName gets a reference to the given string and assigns it to the FlavorName field.
func (o *PlanDetails) SetFlavorName(v PlanDetailsGetFlavorNameRetType) {
setPlanDetailsGetFlavorNameAttributeType(&o.FlavorName, v)
}
// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise.
func (o *PlanDetails) GetMaxConnections() (res PlanDetailsGetMaxConnectionsRetType) {
res, _ = o.GetMaxConnectionsOk()
return
}
// GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlanDetails) GetMaxConnectionsOk() (ret PlanDetailsGetMaxConnectionsRetType, ok bool) {
return getPlanDetailsGetMaxConnectionsAttributeTypeOk(o.MaxConnections)
}
// HasMaxConnections returns a boolean if a field has been set.
func (o *PlanDetails) HasMaxConnections() bool {
_, ok := o.GetMaxConnectionsOk()
return ok
}
// SetMaxConnections gets a reference to the given int64 and assigns it to the MaxConnections field.
func (o *PlanDetails) SetMaxConnections(v PlanDetailsGetMaxConnectionsRetType) {
setPlanDetailsGetMaxConnectionsAttributeType(&o.MaxConnections, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *PlanDetails) GetName() (res PlanDetailsGetNameRetType) {
res, _ = o.GetNameOk()
return
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlanDetails) GetNameOk() (ret PlanDetailsGetNameRetType, ok bool) {
return getPlanDetailsGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *PlanDetails) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *PlanDetails) SetName(v PlanDetailsGetNameRetType) {
setPlanDetailsGetNameAttributeType(&o.Name, v)
}
// GetPlanId returns the PlanId field value if set, zero value otherwise.
func (o *PlanDetails) GetPlanId() (res PlanDetailsGetPlanIdRetType) {
res, _ = o.GetPlanIdOk()
return
}
// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlanDetails) GetPlanIdOk() (ret PlanDetailsGetPlanIdRetType, ok bool) {
return getPlanDetailsGetPlanIdAttributeTypeOk(o.PlanId)
}
// HasPlanId returns a boolean if a field has been set.
func (o *PlanDetails) HasPlanId() bool {
_, ok := o.GetPlanIdOk()
return ok
}
// SetPlanId gets a reference to the given string and assigns it to the PlanId field.
func (o *PlanDetails) SetPlanId(v PlanDetailsGetPlanIdRetType) {
setPlanDetailsGetPlanIdAttributeType(&o.PlanId, v)
}
// GetRegion returns the Region field value if set, zero value otherwise.
func (o *PlanDetails) GetRegion() (res PlanDetailsGetRegionRetType) {
res, _ = o.GetRegionOk()
return
}
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlanDetails) GetRegionOk() (ret PlanDetailsGetRegionRetType, ok bool) {
return getPlanDetailsGetRegionAttributeTypeOk(o.Region)
}
// HasRegion returns a boolean if a field has been set.
func (o *PlanDetails) HasRegion() bool {
_, ok := o.GetRegionOk()
return ok
}
// SetRegion gets a reference to the given string and assigns it to the Region field.
func (o *PlanDetails) SetRegion(v PlanDetailsGetRegionRetType) {
setPlanDetailsGetRegionAttributeType(&o.Region, v)
}
func (o PlanDetails) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getPlanDetailsGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getPlanDetailsGetFlavorNameAttributeTypeOk(o.FlavorName); ok {
toSerialize["FlavorName"] = val
}
if val, ok := getPlanDetailsGetMaxConnectionsAttributeTypeOk(o.MaxConnections); ok {
toSerialize["MaxConnections"] = val
}
if val, ok := getPlanDetailsGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getPlanDetailsGetPlanIdAttributeTypeOk(o.PlanId); ok {
toSerialize["PlanId"] = val
}
if val, ok := getPlanDetailsGetRegionAttributeTypeOk(o.Region); ok {
toSerialize["Region"] = val
}
return toSerialize, nil
}
type NullablePlanDetails struct {
value *PlanDetails
isSet bool
}
func (v NullablePlanDetails) Get() *PlanDetails {
return v.value
}
func (v *NullablePlanDetails) Set(val *PlanDetails) {
v.value = val
v.isSet = true
}
func (v NullablePlanDetails) IsSet() bool {
return v.isSet
}
func (v *NullablePlanDetails) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePlanDetails(val *PlanDetails) *NullablePlanDetails {
return &NullablePlanDetails{value: val, isSet: true}
}
func (v NullablePlanDetails) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePlanDetails) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

View 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 ProtocolOptionsHTTP type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProtocolOptionsHTTP{}
/*
types and functions for hosts
*/
// isArray
type ProtocolOptionsHTTPGetHostsAttributeType = *[]HostConfig
type ProtocolOptionsHTTPGetHostsArgType = []HostConfig
type ProtocolOptionsHTTPGetHostsRetType = []HostConfig
func getProtocolOptionsHTTPGetHostsAttributeTypeOk(arg ProtocolOptionsHTTPGetHostsAttributeType) (ret ProtocolOptionsHTTPGetHostsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setProtocolOptionsHTTPGetHostsAttributeType(arg *ProtocolOptionsHTTPGetHostsAttributeType, val ProtocolOptionsHTTPGetHostsRetType) {
*arg = &val
}
// ProtocolOptionsHTTP Configuration for handling HTTP traffic on this listener.
type ProtocolOptionsHTTP struct {
// Defines routing rules grouped by hostname.
Hosts ProtocolOptionsHTTPGetHostsAttributeType `json:"hosts,omitempty"`
}
// NewProtocolOptionsHTTP instantiates a new ProtocolOptionsHTTP object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewProtocolOptionsHTTP() *ProtocolOptionsHTTP {
this := ProtocolOptionsHTTP{}
return &this
}
// NewProtocolOptionsHTTPWithDefaults instantiates a new ProtocolOptionsHTTP object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewProtocolOptionsHTTPWithDefaults() *ProtocolOptionsHTTP {
this := ProtocolOptionsHTTP{}
return &this
}
// GetHosts returns the Hosts field value if set, zero value otherwise.
func (o *ProtocolOptionsHTTP) GetHosts() (res ProtocolOptionsHTTPGetHostsRetType) {
res, _ = o.GetHostsOk()
return
}
// GetHostsOk returns a tuple with the Hosts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProtocolOptionsHTTP) GetHostsOk() (ret ProtocolOptionsHTTPGetHostsRetType, ok bool) {
return getProtocolOptionsHTTPGetHostsAttributeTypeOk(o.Hosts)
}
// HasHosts returns a boolean if a field has been set.
func (o *ProtocolOptionsHTTP) HasHosts() bool {
_, ok := o.GetHostsOk()
return ok
}
// SetHosts gets a reference to the given []HostConfig and assigns it to the Hosts field.
func (o *ProtocolOptionsHTTP) SetHosts(v ProtocolOptionsHTTPGetHostsRetType) {
setProtocolOptionsHTTPGetHostsAttributeType(&o.Hosts, v)
}
func (o ProtocolOptionsHTTP) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getProtocolOptionsHTTPGetHostsAttributeTypeOk(o.Hosts); ok {
toSerialize["Hosts"] = val
}
return toSerialize, nil
}
type NullableProtocolOptionsHTTP struct {
value *ProtocolOptionsHTTP
isSet bool
}
func (v NullableProtocolOptionsHTTP) Get() *ProtocolOptionsHTTP {
return v.value
}
func (v *NullableProtocolOptionsHTTP) Set(val *ProtocolOptionsHTTP) {
v.value = val
v.isSet = true
}
func (v NullableProtocolOptionsHTTP) IsSet() bool {
return v.isSet
}
func (v *NullableProtocolOptionsHTTP) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProtocolOptionsHTTP(val *ProtocolOptionsHTTP) *NullableProtocolOptionsHTTP {
return &NullableProtocolOptionsHTTP{value: val, isSet: true}
}
func (v NullableProtocolOptionsHTTP) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProtocolOptionsHTTP) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

View 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 ProtocolOptionsHTTPS type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProtocolOptionsHTTPS{}
/*
types and functions for certificateConfig
*/
// isModel
type ProtocolOptionsHTTPSGetCertificateConfigAttributeType = *CertificateConfig
type ProtocolOptionsHTTPSGetCertificateConfigArgType = CertificateConfig
type ProtocolOptionsHTTPSGetCertificateConfigRetType = CertificateConfig
func getProtocolOptionsHTTPSGetCertificateConfigAttributeTypeOk(arg ProtocolOptionsHTTPSGetCertificateConfigAttributeType) (ret ProtocolOptionsHTTPSGetCertificateConfigRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setProtocolOptionsHTTPSGetCertificateConfigAttributeType(arg *ProtocolOptionsHTTPSGetCertificateConfigAttributeType, val ProtocolOptionsHTTPSGetCertificateConfigRetType) {
*arg = &val
}
// ProtocolOptionsHTTPS Configuration for handling HTTPS traffic on this listener.
type ProtocolOptionsHTTPS struct {
CertificateConfig ProtocolOptionsHTTPSGetCertificateConfigAttributeType `json:"certificateConfig,omitempty"`
}
// NewProtocolOptionsHTTPS instantiates a new ProtocolOptionsHTTPS object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewProtocolOptionsHTTPS() *ProtocolOptionsHTTPS {
this := ProtocolOptionsHTTPS{}
return &this
}
// NewProtocolOptionsHTTPSWithDefaults instantiates a new ProtocolOptionsHTTPS object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewProtocolOptionsHTTPSWithDefaults() *ProtocolOptionsHTTPS {
this := ProtocolOptionsHTTPS{}
return &this
}
// GetCertificateConfig returns the CertificateConfig field value if set, zero value otherwise.
func (o *ProtocolOptionsHTTPS) GetCertificateConfig() (res ProtocolOptionsHTTPSGetCertificateConfigRetType) {
res, _ = o.GetCertificateConfigOk()
return
}
// GetCertificateConfigOk returns a tuple with the CertificateConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProtocolOptionsHTTPS) GetCertificateConfigOk() (ret ProtocolOptionsHTTPSGetCertificateConfigRetType, ok bool) {
return getProtocolOptionsHTTPSGetCertificateConfigAttributeTypeOk(o.CertificateConfig)
}
// HasCertificateConfig returns a boolean if a field has been set.
func (o *ProtocolOptionsHTTPS) HasCertificateConfig() bool {
_, ok := o.GetCertificateConfigOk()
return ok
}
// SetCertificateConfig gets a reference to the given CertificateConfig and assigns it to the CertificateConfig field.
func (o *ProtocolOptionsHTTPS) SetCertificateConfig(v ProtocolOptionsHTTPSGetCertificateConfigRetType) {
setProtocolOptionsHTTPSGetCertificateConfigAttributeType(&o.CertificateConfig, v)
}
func (o ProtocolOptionsHTTPS) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getProtocolOptionsHTTPSGetCertificateConfigAttributeTypeOk(o.CertificateConfig); ok {
toSerialize["CertificateConfig"] = val
}
return toSerialize, nil
}
type NullableProtocolOptionsHTTPS struct {
value *ProtocolOptionsHTTPS
isSet bool
}
func (v NullableProtocolOptionsHTTPS) Get() *ProtocolOptionsHTTPS {
return v.value
}
func (v *NullableProtocolOptionsHTTPS) Set(val *ProtocolOptionsHTTPS) {
v.value = val
v.isSet = true
}
func (v NullableProtocolOptionsHTTPS) IsSet() bool {
return v.isSet
}
func (v *NullableProtocolOptionsHTTPS) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProtocolOptionsHTTPS(val *ProtocolOptionsHTTPS) *NullableProtocolOptionsHTTPS {
return &NullableProtocolOptionsHTTPS{value: val, isSet: true}
}
func (v NullableProtocolOptionsHTTPS) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProtocolOptionsHTTPS) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

View 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 QueryParameter type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &QueryParameter{}
/*
types and functions for exactMatch
*/
// isNotNullableString
type QueryParameterGetExactMatchAttributeType = *string
func getQueryParameterGetExactMatchAttributeTypeOk(arg QueryParameterGetExactMatchAttributeType) (ret QueryParameterGetExactMatchRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setQueryParameterGetExactMatchAttributeType(arg *QueryParameterGetExactMatchAttributeType, val QueryParameterGetExactMatchRetType) {
*arg = &val
}
type QueryParameterGetExactMatchArgType = string
type QueryParameterGetExactMatchRetType = string
/*
types and functions for name
*/
// isNotNullableString
type QueryParameterGetNameAttributeType = *string
func getQueryParameterGetNameAttributeTypeOk(arg QueryParameterGetNameAttributeType) (ret QueryParameterGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setQueryParameterGetNameAttributeType(arg *QueryParameterGetNameAttributeType, val QueryParameterGetNameRetType) {
*arg = &val
}
type QueryParameterGetNameArgType = string
type QueryParameterGetNameRetType = string
// QueryParameter struct for QueryParameter
type QueryParameter struct {
// Exact match for the parameter value.
ExactMatch QueryParameterGetExactMatchAttributeType `json:"exactMatch,omitempty"`
// Parameter name.
Name QueryParameterGetNameAttributeType `json:"name,omitempty"`
}
// NewQueryParameter instantiates a new QueryParameter object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewQueryParameter() *QueryParameter {
this := QueryParameter{}
return &this
}
// NewQueryParameterWithDefaults instantiates a new QueryParameter object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewQueryParameterWithDefaults() *QueryParameter {
this := QueryParameter{}
return &this
}
// GetExactMatch returns the ExactMatch field value if set, zero value otherwise.
func (o *QueryParameter) GetExactMatch() (res QueryParameterGetExactMatchRetType) {
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 *QueryParameter) GetExactMatchOk() (ret QueryParameterGetExactMatchRetType, ok bool) {
return getQueryParameterGetExactMatchAttributeTypeOk(o.ExactMatch)
}
// HasExactMatch returns a boolean if a field has been set.
func (o *QueryParameter) HasExactMatch() bool {
_, ok := o.GetExactMatchOk()
return ok
}
// SetExactMatch gets a reference to the given string and assigns it to the ExactMatch field.
func (o *QueryParameter) SetExactMatch(v QueryParameterGetExactMatchRetType) {
setQueryParameterGetExactMatchAttributeType(&o.ExactMatch, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *QueryParameter) GetName() (res QueryParameterGetNameRetType) {
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 *QueryParameter) GetNameOk() (ret QueryParameterGetNameRetType, ok bool) {
return getQueryParameterGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *QueryParameter) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *QueryParameter) SetName(v QueryParameterGetNameRetType) {
setQueryParameterGetNameAttributeType(&o.Name, v)
}
func (o QueryParameter) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getQueryParameterGetExactMatchAttributeTypeOk(o.ExactMatch); ok {
toSerialize["ExactMatch"] = val
}
if val, ok := getQueryParameterGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
return toSerialize, nil
}
type NullableQueryParameter struct {
value *QueryParameter
isSet bool
}
func (v NullableQueryParameter) Get() *QueryParameter {
return v.value
}
func (v *NullableQueryParameter) Set(val *QueryParameter) {
v.value = val
v.isSet = true
}
func (v NullableQueryParameter) IsSet() bool {
return v.isSet
}
func (v *NullableQueryParameter) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableQueryParameter(val *QueryParameter) *NullableQueryParameter {
return &NullableQueryParameter{value: val, isSet: true}
}
func (v NullableQueryParameter) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableQueryParameter) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

416
pkg/albbeta/model_rule.go Normal file
View file

@ -0,0 +1,416 @@
/*
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 Rule type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Rule{}
/*
types and functions for cookiePersistence
*/
// isModel
type RuleGetCookiePersistenceAttributeType = *CookiePersistence
type RuleGetCookiePersistenceArgType = CookiePersistence
type RuleGetCookiePersistenceRetType = CookiePersistence
func getRuleGetCookiePersistenceAttributeTypeOk(arg RuleGetCookiePersistenceAttributeType) (ret RuleGetCookiePersistenceRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRuleGetCookiePersistenceAttributeType(arg *RuleGetCookiePersistenceAttributeType, val RuleGetCookiePersistenceRetType) {
*arg = &val
}
/*
types and functions for headers
*/
// isArray
type RuleGetHeadersAttributeType = *[]HttpHeader
type RuleGetHeadersArgType = []HttpHeader
type RuleGetHeadersRetType = []HttpHeader
func getRuleGetHeadersAttributeTypeOk(arg RuleGetHeadersAttributeType) (ret RuleGetHeadersRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRuleGetHeadersAttributeType(arg *RuleGetHeadersAttributeType, val RuleGetHeadersRetType) {
*arg = &val
}
/*
types and functions for path
*/
// isModel
type RuleGetPathAttributeType = *Path
type RuleGetPathArgType = Path
type RuleGetPathRetType = Path
func getRuleGetPathAttributeTypeOk(arg RuleGetPathAttributeType) (ret RuleGetPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRuleGetPathAttributeType(arg *RuleGetPathAttributeType, val RuleGetPathRetType) {
*arg = &val
}
/*
types and functions for pathPrefix
*/
// isNotNullableString
type RuleGetPathPrefixAttributeType = *string
func getRuleGetPathPrefixAttributeTypeOk(arg RuleGetPathPrefixAttributeType) (ret RuleGetPathPrefixRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRuleGetPathPrefixAttributeType(arg *RuleGetPathPrefixAttributeType, val RuleGetPathPrefixRetType) {
*arg = &val
}
type RuleGetPathPrefixArgType = string
type RuleGetPathPrefixRetType = string
/*
types and functions for queryParameters
*/
// isArray
type RuleGetQueryParametersAttributeType = *[]QueryParameter
type RuleGetQueryParametersArgType = []QueryParameter
type RuleGetQueryParametersRetType = []QueryParameter
func getRuleGetQueryParametersAttributeTypeOk(arg RuleGetQueryParametersAttributeType) (ret RuleGetQueryParametersRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRuleGetQueryParametersAttributeType(arg *RuleGetQueryParametersAttributeType, val RuleGetQueryParametersRetType) {
*arg = &val
}
/*
types and functions for targetPool
*/
// isNotNullableString
type RuleGetTargetPoolAttributeType = *string
func getRuleGetTargetPoolAttributeTypeOk(arg RuleGetTargetPoolAttributeType) (ret RuleGetTargetPoolRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRuleGetTargetPoolAttributeType(arg *RuleGetTargetPoolAttributeType, val RuleGetTargetPoolRetType) {
*arg = &val
}
type RuleGetTargetPoolArgType = string
type RuleGetTargetPoolRetType = string
/*
types and functions for webSocket
*/
// isBoolean
type RulegetWebSocketAttributeType = *bool
type RulegetWebSocketArgType = bool
type RulegetWebSocketRetType = bool
func getRulegetWebSocketAttributeTypeOk(arg RulegetWebSocketAttributeType) (ret RulegetWebSocketRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRulegetWebSocketAttributeType(arg *RulegetWebSocketAttributeType, val RulegetWebSocketRetType) {
*arg = &val
}
// Rule struct for Rule
type Rule struct {
CookiePersistence RuleGetCookiePersistenceAttributeType `json:"cookiePersistence,omitempty"`
// Headers for the rule.
Headers RuleGetHeadersAttributeType `json:"headers,omitempty"`
Path RuleGetPathAttributeType `json:"path,omitempty"`
// Legacy path prefix match. Optional. If not set, defaults to root path '/'. Cannot be set if 'path' is used. Prefer using 'path.prefix' instead. Only matches on full segment boundaries, e.g. '/foo' matches '/foo' and '/foo/bar' but NOT '/foobar'.
PathPrefix RuleGetPathPrefixAttributeType `json:"pathPrefix,omitempty"`
// Query Parameters for the rule.
QueryParameters RuleGetQueryParametersAttributeType `json:"queryParameters,omitempty"`
// Reference target pool by target pool name.
TargetPool RuleGetTargetPoolAttributeType `json:"targetPool,omitempty"`
// If enabled, when client sends an HTTP request with and Upgrade header, indicating the desire to establish a Websocket connection, if backend server supports WebSocket, it responds with HTTP 101 status code, switching protocols from HTTP to WebSocket. Hence the client and the server can exchange data in real-time using one long-lived TCP connection.
WebSocket RulegetWebSocketAttributeType `json:"webSocket,omitempty"`
}
// NewRule instantiates a new Rule object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewRule() *Rule {
this := Rule{}
return &this
}
// NewRuleWithDefaults instantiates a new Rule object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewRuleWithDefaults() *Rule {
this := Rule{}
return &this
}
// GetCookiePersistence returns the CookiePersistence field value if set, zero value otherwise.
func (o *Rule) GetCookiePersistence() (res RuleGetCookiePersistenceRetType) {
res, _ = o.GetCookiePersistenceOk()
return
}
// GetCookiePersistenceOk returns a tuple with the CookiePersistence field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Rule) GetCookiePersistenceOk() (ret RuleGetCookiePersistenceRetType, ok bool) {
return getRuleGetCookiePersistenceAttributeTypeOk(o.CookiePersistence)
}
// HasCookiePersistence returns a boolean if a field has been set.
func (o *Rule) HasCookiePersistence() bool {
_, ok := o.GetCookiePersistenceOk()
return ok
}
// SetCookiePersistence gets a reference to the given CookiePersistence and assigns it to the CookiePersistence field.
func (o *Rule) SetCookiePersistence(v RuleGetCookiePersistenceRetType) {
setRuleGetCookiePersistenceAttributeType(&o.CookiePersistence, v)
}
// GetHeaders returns the Headers field value if set, zero value otherwise.
func (o *Rule) GetHeaders() (res RuleGetHeadersRetType) {
res, _ = o.GetHeadersOk()
return
}
// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Rule) GetHeadersOk() (ret RuleGetHeadersRetType, ok bool) {
return getRuleGetHeadersAttributeTypeOk(o.Headers)
}
// HasHeaders returns a boolean if a field has been set.
func (o *Rule) HasHeaders() bool {
_, ok := o.GetHeadersOk()
return ok
}
// SetHeaders gets a reference to the given []HttpHeader and assigns it to the Headers field.
func (o *Rule) SetHeaders(v RuleGetHeadersRetType) {
setRuleGetHeadersAttributeType(&o.Headers, v)
}
// GetPath returns the Path field value if set, zero value otherwise.
func (o *Rule) GetPath() (res RuleGetPathRetType) {
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 *Rule) GetPathOk() (ret RuleGetPathRetType, ok bool) {
return getRuleGetPathAttributeTypeOk(o.Path)
}
// HasPath returns a boolean if a field has been set.
func (o *Rule) HasPath() bool {
_, ok := o.GetPathOk()
return ok
}
// SetPath gets a reference to the given Path and assigns it to the Path field.
func (o *Rule) SetPath(v RuleGetPathRetType) {
setRuleGetPathAttributeType(&o.Path, v)
}
// GetPathPrefix returns the PathPrefix field value if set, zero value otherwise.
func (o *Rule) GetPathPrefix() (res RuleGetPathPrefixRetType) {
res, _ = o.GetPathPrefixOk()
return
}
// GetPathPrefixOk returns a tuple with the PathPrefix field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Rule) GetPathPrefixOk() (ret RuleGetPathPrefixRetType, ok bool) {
return getRuleGetPathPrefixAttributeTypeOk(o.PathPrefix)
}
// HasPathPrefix returns a boolean if a field has been set.
func (o *Rule) HasPathPrefix() bool {
_, ok := o.GetPathPrefixOk()
return ok
}
// SetPathPrefix gets a reference to the given string and assigns it to the PathPrefix field.
func (o *Rule) SetPathPrefix(v RuleGetPathPrefixRetType) {
setRuleGetPathPrefixAttributeType(&o.PathPrefix, v)
}
// GetQueryParameters returns the QueryParameters field value if set, zero value otherwise.
func (o *Rule) GetQueryParameters() (res RuleGetQueryParametersRetType) {
res, _ = o.GetQueryParametersOk()
return
}
// GetQueryParametersOk returns a tuple with the QueryParameters field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Rule) GetQueryParametersOk() (ret RuleGetQueryParametersRetType, ok bool) {
return getRuleGetQueryParametersAttributeTypeOk(o.QueryParameters)
}
// HasQueryParameters returns a boolean if a field has been set.
func (o *Rule) HasQueryParameters() bool {
_, ok := o.GetQueryParametersOk()
return ok
}
// SetQueryParameters gets a reference to the given []QueryParameter and assigns it to the QueryParameters field.
func (o *Rule) SetQueryParameters(v RuleGetQueryParametersRetType) {
setRuleGetQueryParametersAttributeType(&o.QueryParameters, v)
}
// GetTargetPool returns the TargetPool field value if set, zero value otherwise.
func (o *Rule) GetTargetPool() (res RuleGetTargetPoolRetType) {
res, _ = o.GetTargetPoolOk()
return
}
// GetTargetPoolOk returns a tuple with the TargetPool field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Rule) GetTargetPoolOk() (ret RuleGetTargetPoolRetType, ok bool) {
return getRuleGetTargetPoolAttributeTypeOk(o.TargetPool)
}
// HasTargetPool returns a boolean if a field has been set.
func (o *Rule) HasTargetPool() bool {
_, ok := o.GetTargetPoolOk()
return ok
}
// SetTargetPool gets a reference to the given string and assigns it to the TargetPool field.
func (o *Rule) SetTargetPool(v RuleGetTargetPoolRetType) {
setRuleGetTargetPoolAttributeType(&o.TargetPool, v)
}
// GetWebSocket returns the WebSocket field value if set, zero value otherwise.
func (o *Rule) GetWebSocket() (res RulegetWebSocketRetType) {
res, _ = o.GetWebSocketOk()
return
}
// GetWebSocketOk returns a tuple with the WebSocket field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Rule) GetWebSocketOk() (ret RulegetWebSocketRetType, ok bool) {
return getRulegetWebSocketAttributeTypeOk(o.WebSocket)
}
// HasWebSocket returns a boolean if a field has been set.
func (o *Rule) HasWebSocket() bool {
_, ok := o.GetWebSocketOk()
return ok
}
// SetWebSocket gets a reference to the given bool and assigns it to the WebSocket field.
func (o *Rule) SetWebSocket(v RulegetWebSocketRetType) {
setRulegetWebSocketAttributeType(&o.WebSocket, v)
}
func (o Rule) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getRuleGetCookiePersistenceAttributeTypeOk(o.CookiePersistence); ok {
toSerialize["CookiePersistence"] = val
}
if val, ok := getRuleGetHeadersAttributeTypeOk(o.Headers); ok {
toSerialize["Headers"] = val
}
if val, ok := getRuleGetPathAttributeTypeOk(o.Path); ok {
toSerialize["Path"] = val
}
if val, ok := getRuleGetPathPrefixAttributeTypeOk(o.PathPrefix); ok {
toSerialize["PathPrefix"] = val
}
if val, ok := getRuleGetQueryParametersAttributeTypeOk(o.QueryParameters); ok {
toSerialize["QueryParameters"] = val
}
if val, ok := getRuleGetTargetPoolAttributeTypeOk(o.TargetPool); ok {
toSerialize["TargetPool"] = val
}
if val, ok := getRulegetWebSocketAttributeTypeOk(o.WebSocket); ok {
toSerialize["WebSocket"] = val
}
return toSerialize, nil
}
type NullableRule struct {
value *Rule
isSet bool
}
func (v NullableRule) Get() *Rule {
return v.value
}
func (v *NullableRule) Set(val *Rule) {
v.value = val
v.isSet = true
}
func (v NullableRule) IsSet() bool {
return v.isSet
}
func (v *NullableRule) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRule(val *Rule) *NullableRule {
return &NullableRule{value: val, isSet: true}
}
func (v NullableRule) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRule) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

View 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 SecurityGroup type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SecurityGroup{}
/*
types and functions for id
*/
// isNotNullableString
type SecurityGroupGetIdAttributeType = *string
func getSecurityGroupGetIdAttributeTypeOk(arg SecurityGroupGetIdAttributeType) (ret SecurityGroupGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setSecurityGroupGetIdAttributeType(arg *SecurityGroupGetIdAttributeType, val SecurityGroupGetIdRetType) {
*arg = &val
}
type SecurityGroupGetIdArgType = string
type SecurityGroupGetIdRetType = string
/*
types and functions for name
*/
// isNotNullableString
type SecurityGroupGetNameAttributeType = *string
func getSecurityGroupGetNameAttributeTypeOk(arg SecurityGroupGetNameAttributeType) (ret SecurityGroupGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setSecurityGroupGetNameAttributeType(arg *SecurityGroupGetNameAttributeType, val SecurityGroupGetNameRetType) {
*arg = &val
}
type SecurityGroupGetNameArgType = string
type SecurityGroupGetNameRetType = string
// SecurityGroup struct for SecurityGroup
type SecurityGroup struct {
// ID of the security Group
Id SecurityGroupGetIdAttributeType `json:"id,omitempty"`
// Name of the security Group
Name SecurityGroupGetNameAttributeType `json:"name,omitempty"`
}
// NewSecurityGroup instantiates a new SecurityGroup object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewSecurityGroup() *SecurityGroup {
this := SecurityGroup{}
return &this
}
// NewSecurityGroupWithDefaults instantiates a new SecurityGroup object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewSecurityGroupWithDefaults() *SecurityGroup {
this := SecurityGroup{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *SecurityGroup) GetId() (res SecurityGroupGetIdRetType) {
res, _ = o.GetIdOk()
return
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecurityGroup) GetIdOk() (ret SecurityGroupGetIdRetType, ok bool) {
return getSecurityGroupGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *SecurityGroup) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *SecurityGroup) SetId(v SecurityGroupGetIdRetType) {
setSecurityGroupGetIdAttributeType(&o.Id, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *SecurityGroup) GetName() (res SecurityGroupGetNameRetType) {
res, _ = o.GetNameOk()
return
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SecurityGroup) GetNameOk() (ret SecurityGroupGetNameRetType, ok bool) {
return getSecurityGroupGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *SecurityGroup) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *SecurityGroup) SetName(v SecurityGroupGetNameRetType) {
setSecurityGroupGetNameAttributeType(&o.Name, v)
}
func (o SecurityGroup) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getSecurityGroupGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getSecurityGroupGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
return toSerialize, nil
}
type NullableSecurityGroup struct {
value *SecurityGroup
isSet bool
}
func (v NullableSecurityGroup) Get() *SecurityGroup {
return v.value
}
func (v *NullableSecurityGroup) Set(val *SecurityGroup) {
v.value = val
v.isSet = true
}
func (v NullableSecurityGroup) IsSet() bool {
return v.isSet
}
func (v *NullableSecurityGroup) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSecurityGroup(val *SecurityGroup) *NullableSecurityGroup {
return &NullableSecurityGroup{value: val, isSet: true}
}
func (v NullableSecurityGroup) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSecurityGroup) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

226
pkg/albbeta/model_status.go Normal file
View file

@ -0,0 +1,226 @@
/*
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 Status type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Status{}
/*
types and functions for code
*/
// isInteger
type StatusGetCodeAttributeType = *int64
type StatusGetCodeArgType = int64
type StatusGetCodeRetType = int64
func getStatusGetCodeAttributeTypeOk(arg StatusGetCodeAttributeType) (ret StatusGetCodeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStatusGetCodeAttributeType(arg *StatusGetCodeAttributeType, val StatusGetCodeRetType) {
*arg = &val
}
/*
types and functions for details
*/
// isArray
type StatusGetDetailsAttributeType = *[]GoogleProtobufAny
type StatusGetDetailsArgType = []GoogleProtobufAny
type StatusGetDetailsRetType = []GoogleProtobufAny
func getStatusGetDetailsAttributeTypeOk(arg StatusGetDetailsAttributeType) (ret StatusGetDetailsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStatusGetDetailsAttributeType(arg *StatusGetDetailsAttributeType, val StatusGetDetailsRetType) {
*arg = &val
}
/*
types and functions for message
*/
// isNotNullableString
type StatusGetMessageAttributeType = *string
func getStatusGetMessageAttributeTypeOk(arg StatusGetMessageAttributeType) (ret StatusGetMessageRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStatusGetMessageAttributeType(arg *StatusGetMessageAttributeType, val StatusGetMessageRetType) {
*arg = &val
}
type StatusGetMessageArgType = string
type StatusGetMessageRetType = string
// Status The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
type Status struct {
// The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
// Can be cast to int32 without loss of precision.
Code StatusGetCodeAttributeType `json:"code,omitempty"`
// A list of messages that carry the error details. There is a common set of message types for APIs to use.
Details StatusGetDetailsAttributeType `json:"details,omitempty"`
// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
Message StatusGetMessageAttributeType `json:"message,omitempty"`
}
// NewStatus instantiates a new Status object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewStatus() *Status {
this := Status{}
return &this
}
// NewStatusWithDefaults instantiates a new Status object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewStatusWithDefaults() *Status {
this := Status{}
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *Status) GetCode() (res StatusGetCodeRetType) {
res, _ = o.GetCodeOk()
return
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Status) GetCodeOk() (ret StatusGetCodeRetType, ok bool) {
return getStatusGetCodeAttributeTypeOk(o.Code)
}
// HasCode returns a boolean if a field has been set.
func (o *Status) HasCode() bool {
_, ok := o.GetCodeOk()
return ok
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *Status) SetCode(v StatusGetCodeRetType) {
setStatusGetCodeAttributeType(&o.Code, v)
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *Status) GetDetails() (res StatusGetDetailsRetType) {
res, _ = o.GetDetailsOk()
return
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Status) GetDetailsOk() (ret StatusGetDetailsRetType, ok bool) {
return getStatusGetDetailsAttributeTypeOk(o.Details)
}
// HasDetails returns a boolean if a field has been set.
func (o *Status) HasDetails() bool {
_, ok := o.GetDetailsOk()
return ok
}
// SetDetails gets a reference to the given []GoogleProtobufAny and assigns it to the Details field.
func (o *Status) SetDetails(v StatusGetDetailsRetType) {
setStatusGetDetailsAttributeType(&o.Details, v)
}
// GetMessage returns the Message field value if set, zero value otherwise.
func (o *Status) GetMessage() (res StatusGetMessageRetType) {
res, _ = o.GetMessageOk()
return
}
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Status) GetMessageOk() (ret StatusGetMessageRetType, ok bool) {
return getStatusGetMessageAttributeTypeOk(o.Message)
}
// HasMessage returns a boolean if a field has been set.
func (o *Status) HasMessage() bool {
_, ok := o.GetMessageOk()
return ok
}
// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *Status) SetMessage(v StatusGetMessageRetType) {
setStatusGetMessageAttributeType(&o.Message, v)
}
func (o Status) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getStatusGetCodeAttributeTypeOk(o.Code); ok {
toSerialize["Code"] = val
}
if val, ok := getStatusGetDetailsAttributeTypeOk(o.Details); ok {
toSerialize["Details"] = val
}
if val, ok := getStatusGetMessageAttributeTypeOk(o.Message); ok {
toSerialize["Message"] = val
}
return toSerialize, nil
}
type NullableStatus struct {
value *Status
isSet bool
}
func (v NullableStatus) Get() *Status {
return v.value
}
func (v *NullableStatus) Set(val *Status) {
v.value = val
v.isSet = true
}
func (v NullableStatus) IsSet() bool {
return v.isSet
}
func (v *NullableStatus) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStatus(val *Status) *NullableStatus {
return &NullableStatus{value: val, isSet: true}
}
func (v NullableStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStatus) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View 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

Some files were not shown because too many files have changed in this diff Show more