## 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>
276 lines
9.6 KiB
Go
276 lines
9.6 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 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)
|
|
}
|