## 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>
226 lines
7 KiB
Go
226 lines
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 Status type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Status{}
|
|
|
|
/*
|
|
types and functions for code
|
|
*/
|
|
|
|
// isInteger
|
|
type StatusGetCodeAttributeType = *int64
|
|
type StatusGetCodeArgType = int64
|
|
type StatusGetCodeRetType = int64
|
|
|
|
func getStatusGetCodeAttributeTypeOk(arg StatusGetCodeAttributeType) (ret StatusGetCodeRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setStatusGetCodeAttributeType(arg *StatusGetCodeAttributeType, val StatusGetCodeRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for details
|
|
*/
|
|
|
|
// isArray
|
|
type StatusGetDetailsAttributeType = *[]GoogleProtobufAny
|
|
type StatusGetDetailsArgType = []GoogleProtobufAny
|
|
type StatusGetDetailsRetType = []GoogleProtobufAny
|
|
|
|
func getStatusGetDetailsAttributeTypeOk(arg StatusGetDetailsAttributeType) (ret StatusGetDetailsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setStatusGetDetailsAttributeType(arg *StatusGetDetailsAttributeType, val StatusGetDetailsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for message
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type StatusGetMessageAttributeType = *string
|
|
|
|
func getStatusGetMessageAttributeTypeOk(arg StatusGetMessageAttributeType) (ret StatusGetMessageRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setStatusGetMessageAttributeType(arg *StatusGetMessageAttributeType, val StatusGetMessageRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type StatusGetMessageArgType = string
|
|
type StatusGetMessageRetType = string
|
|
|
|
// Status The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
type Status struct {
|
|
// The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
|
|
// Can be cast to int32 without loss of precision.
|
|
Code StatusGetCodeAttributeType `json:"code,omitempty"`
|
|
// A list of messages that carry the error details. There is a common set of message types for APIs to use.
|
|
Details StatusGetDetailsAttributeType `json:"details,omitempty"`
|
|
// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
|
|
Message StatusGetMessageAttributeType `json:"message,omitempty"`
|
|
}
|
|
|
|
// NewStatus instantiates a new Status 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 NewStatus() *Status {
|
|
this := Status{}
|
|
return &this
|
|
}
|
|
|
|
// NewStatusWithDefaults instantiates a new Status 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 NewStatusWithDefaults() *Status {
|
|
this := Status{}
|
|
return &this
|
|
}
|
|
|
|
// GetCode returns the Code field value if set, zero value otherwise.
|
|
func (o *Status) GetCode() (res StatusGetCodeRetType) {
|
|
res, _ = o.GetCodeOk()
|
|
return
|
|
}
|
|
|
|
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Status) GetCodeOk() (ret StatusGetCodeRetType, ok bool) {
|
|
return getStatusGetCodeAttributeTypeOk(o.Code)
|
|
}
|
|
|
|
// HasCode returns a boolean if a field has been set.
|
|
func (o *Status) HasCode() bool {
|
|
_, ok := o.GetCodeOk()
|
|
return ok
|
|
}
|
|
|
|
// SetCode gets a reference to the given int64 and assigns it to the Code field.
|
|
func (o *Status) SetCode(v StatusGetCodeRetType) {
|
|
setStatusGetCodeAttributeType(&o.Code, v)
|
|
}
|
|
|
|
// GetDetails returns the Details field value if set, zero value otherwise.
|
|
func (o *Status) GetDetails() (res StatusGetDetailsRetType) {
|
|
res, _ = o.GetDetailsOk()
|
|
return
|
|
}
|
|
|
|
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Status) GetDetailsOk() (ret StatusGetDetailsRetType, ok bool) {
|
|
return getStatusGetDetailsAttributeTypeOk(o.Details)
|
|
}
|
|
|
|
// HasDetails returns a boolean if a field has been set.
|
|
func (o *Status) HasDetails() bool {
|
|
_, ok := o.GetDetailsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDetails gets a reference to the given []GoogleProtobufAny and assigns it to the Details field.
|
|
func (o *Status) SetDetails(v StatusGetDetailsRetType) {
|
|
setStatusGetDetailsAttributeType(&o.Details, v)
|
|
}
|
|
|
|
// GetMessage returns the Message field value if set, zero value otherwise.
|
|
func (o *Status) GetMessage() (res StatusGetMessageRetType) {
|
|
res, _ = o.GetMessageOk()
|
|
return
|
|
}
|
|
|
|
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Status) GetMessageOk() (ret StatusGetMessageRetType, ok bool) {
|
|
return getStatusGetMessageAttributeTypeOk(o.Message)
|
|
}
|
|
|
|
// HasMessage returns a boolean if a field has been set.
|
|
func (o *Status) HasMessage() bool {
|
|
_, ok := o.GetMessageOk()
|
|
return ok
|
|
}
|
|
|
|
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
|
func (o *Status) SetMessage(v StatusGetMessageRetType) {
|
|
setStatusGetMessageAttributeType(&o.Message, v)
|
|
}
|
|
|
|
func (o Status) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getStatusGetCodeAttributeTypeOk(o.Code); ok {
|
|
toSerialize["Code"] = val
|
|
}
|
|
if val, ok := getStatusGetDetailsAttributeTypeOk(o.Details); ok {
|
|
toSerialize["Details"] = val
|
|
}
|
|
if val, ok := getStatusGetMessageAttributeTypeOk(o.Message); ok {
|
|
toSerialize["Message"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableStatus struct {
|
|
value *Status
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableStatus) Get() *Status {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableStatus) Set(val *Status) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableStatus) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableStatus) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableStatus(val *Status) *NullableStatus {
|
|
return &NullableStatus{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableStatus) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableStatus) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|