## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
178 lines
6.7 KiB
Go
178 lines
6.7 KiB
Go
/*
|
|
STACKIT Application Load Balancer API
|
|
|
|
### DEPRECATED! This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each application load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
|
|
|
|
API version: 2beta2.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package albbeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the LoadbalancerOptionMetrics type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &LoadbalancerOptionMetrics{}
|
|
|
|
/*
|
|
types and functions for credentialsRef
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type LoadbalancerOptionMetricsGetCredentialsRefAttributeType = *string
|
|
|
|
func getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(arg LoadbalancerOptionMetricsGetCredentialsRefAttributeType) (ret LoadbalancerOptionMetricsGetCredentialsRefRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLoadbalancerOptionMetricsGetCredentialsRefAttributeType(arg *LoadbalancerOptionMetricsGetCredentialsRefAttributeType, val LoadbalancerOptionMetricsGetCredentialsRefRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type LoadbalancerOptionMetricsGetCredentialsRefArgType = string
|
|
type LoadbalancerOptionMetricsGetCredentialsRefRetType = string
|
|
|
|
/*
|
|
types and functions for pushUrl
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type LoadbalancerOptionMetricsGetPushUrlAttributeType = *string
|
|
|
|
func getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(arg LoadbalancerOptionMetricsGetPushUrlAttributeType) (ret LoadbalancerOptionMetricsGetPushUrlRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setLoadbalancerOptionMetricsGetPushUrlAttributeType(arg *LoadbalancerOptionMetricsGetPushUrlAttributeType, val LoadbalancerOptionMetricsGetPushUrlRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type LoadbalancerOptionMetricsGetPushUrlArgType = string
|
|
type LoadbalancerOptionMetricsGetPushUrlRetType = string
|
|
|
|
// LoadbalancerOptionMetrics struct for LoadbalancerOptionMetrics
|
|
type LoadbalancerOptionMetrics struct {
|
|
// Credentials reference for metrics. This reference is created via the observability create endpoint and the credential needs to contain the basic auth username and password for the metrics solution the push URL points to. Then this enables monitoring via remote write for the Application Load Balancer.
|
|
CredentialsRef LoadbalancerOptionMetricsGetCredentialsRefAttributeType `json:"credentialsRef,omitempty"`
|
|
// The Observability(Metrics)/Prometheus remote write push URL you want the metrics to be shipped to.
|
|
PushUrl LoadbalancerOptionMetricsGetPushUrlAttributeType `json:"pushUrl,omitempty"`
|
|
}
|
|
|
|
// NewLoadbalancerOptionMetrics instantiates a new LoadbalancerOptionMetrics object
|
|
// This constructor will assign default values to properties that have it defined,
|
|
// and makes sure properties required by API are set, but the set of arguments
|
|
// will change when the set of required properties is changed
|
|
func NewLoadbalancerOptionMetrics() *LoadbalancerOptionMetrics {
|
|
this := LoadbalancerOptionMetrics{}
|
|
return &this
|
|
}
|
|
|
|
// NewLoadbalancerOptionMetricsWithDefaults instantiates a new LoadbalancerOptionMetrics object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewLoadbalancerOptionMetricsWithDefaults() *LoadbalancerOptionMetrics {
|
|
this := LoadbalancerOptionMetrics{}
|
|
return &this
|
|
}
|
|
|
|
// GetCredentialsRef returns the CredentialsRef field value if set, zero value otherwise.
|
|
func (o *LoadbalancerOptionMetrics) GetCredentialsRef() (res LoadbalancerOptionMetricsGetCredentialsRefRetType) {
|
|
res, _ = o.GetCredentialsRefOk()
|
|
return
|
|
}
|
|
|
|
// GetCredentialsRefOk returns a tuple with the CredentialsRef field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LoadbalancerOptionMetrics) GetCredentialsRefOk() (ret LoadbalancerOptionMetricsGetCredentialsRefRetType, ok bool) {
|
|
return getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(o.CredentialsRef)
|
|
}
|
|
|
|
// HasCredentialsRef returns a boolean if a field has been set.
|
|
func (o *LoadbalancerOptionMetrics) HasCredentialsRef() bool {
|
|
_, ok := o.GetCredentialsRefOk()
|
|
return ok
|
|
}
|
|
|
|
// SetCredentialsRef gets a reference to the given string and assigns it to the CredentialsRef field.
|
|
func (o *LoadbalancerOptionMetrics) SetCredentialsRef(v LoadbalancerOptionMetricsGetCredentialsRefRetType) {
|
|
setLoadbalancerOptionMetricsGetCredentialsRefAttributeType(&o.CredentialsRef, v)
|
|
}
|
|
|
|
// GetPushUrl returns the PushUrl field value if set, zero value otherwise.
|
|
func (o *LoadbalancerOptionMetrics) GetPushUrl() (res LoadbalancerOptionMetricsGetPushUrlRetType) {
|
|
res, _ = o.GetPushUrlOk()
|
|
return
|
|
}
|
|
|
|
// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LoadbalancerOptionMetrics) GetPushUrlOk() (ret LoadbalancerOptionMetricsGetPushUrlRetType, ok bool) {
|
|
return getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(o.PushUrl)
|
|
}
|
|
|
|
// HasPushUrl returns a boolean if a field has been set.
|
|
func (o *LoadbalancerOptionMetrics) HasPushUrl() bool {
|
|
_, ok := o.GetPushUrlOk()
|
|
return ok
|
|
}
|
|
|
|
// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field.
|
|
func (o *LoadbalancerOptionMetrics) SetPushUrl(v LoadbalancerOptionMetricsGetPushUrlRetType) {
|
|
setLoadbalancerOptionMetricsGetPushUrlAttributeType(&o.PushUrl, v)
|
|
}
|
|
|
|
func (o LoadbalancerOptionMetrics) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getLoadbalancerOptionMetricsGetCredentialsRefAttributeTypeOk(o.CredentialsRef); ok {
|
|
toSerialize["CredentialsRef"] = val
|
|
}
|
|
if val, ok := getLoadbalancerOptionMetricsGetPushUrlAttributeTypeOk(o.PushUrl); ok {
|
|
toSerialize["PushUrl"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableLoadbalancerOptionMetrics struct {
|
|
value *LoadbalancerOptionMetrics
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableLoadbalancerOptionMetrics) Get() *LoadbalancerOptionMetrics {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableLoadbalancerOptionMetrics) Set(val *LoadbalancerOptionMetrics) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableLoadbalancerOptionMetrics) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableLoadbalancerOptionMetrics) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableLoadbalancerOptionMetrics(val *LoadbalancerOptionMetrics) *NullableLoadbalancerOptionMetrics {
|
|
return &NullableLoadbalancerOptionMetrics{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableLoadbalancerOptionMetrics) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableLoadbalancerOptionMetrics) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|