## 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
5.5 KiB
Go
178 lines
5.5 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 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)
|
|
}
|