## 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>
227 lines
7.6 KiB
Go
227 lines
7.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 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)
|
|
}
|