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