fix: refactor package generation (#10)
Some checks failed
Publish / Check GoReleaser config (push) Successful in 5s
Release / goreleaser (push) Failing after 27s
Publish / Publish provider (push) Failing after 6m43s

## 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: #10
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 16:00:09 +00:00 committed by Marcel_Henselin
parent 37ba538a8e
commit 0a21d9f0f2
Signed by: tf-provider.git.onstackit.cloud
GPG key ID: 6D7E8A1ED8955A9C
1473 changed files with 1443 additions and 296913 deletions

0
pkg/.gitkeep Normal file
View file

View file

@ -1 +0,0 @@
6.6.0

File diff suppressed because it is too large Load diff

View file

@ -1,767 +0,0 @@
/*
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")
}
})
}

View file

@ -1,628 +0,0 @@
/*
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

@ -1,38 +0,0 @@
/*
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

@ -1,372 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,128 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,178 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,227 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,127 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,961 +0,0 @@
/*
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

@ -1,178 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,178 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,79 +0,0 @@
/*
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

@ -1,276 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,127 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,227 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,137 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,177 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,178 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,177 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,127 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,176 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,127 +0,0 @@
/*
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

@ -1,11 +0,0 @@
/*
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

@ -1,476 +0,0 @@
/*
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

@ -1,65 +0,0 @@
/*
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

@ -1,961 +0,0 @@
/*
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

@ -1,296 +0,0 @@
/*
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"
)