feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
176
pkg/iaasbeta/model_regional_area.go
Normal file
176
pkg/iaasbeta/model_regional_area.go
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the RegionalArea type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &RegionalArea{}
|
||||
|
||||
/*
|
||||
types and functions for ipv4
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type RegionalAreaGetIpv4AttributeType = *RegionalAreaIPv4
|
||||
type RegionalAreaGetIpv4ArgType = RegionalAreaIPv4
|
||||
type RegionalAreaGetIpv4RetType = RegionalAreaIPv4
|
||||
|
||||
func getRegionalAreaGetIpv4AttributeTypeOk(arg RegionalAreaGetIpv4AttributeType) (ret RegionalAreaGetIpv4RetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setRegionalAreaGetIpv4AttributeType(arg *RegionalAreaGetIpv4AttributeType, val RegionalAreaGetIpv4RetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for status
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type RegionalAreaGetStatusAttributeType = *string
|
||||
|
||||
func getRegionalAreaGetStatusAttributeTypeOk(arg RegionalAreaGetStatusAttributeType) (ret RegionalAreaGetStatusRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setRegionalAreaGetStatusAttributeType(arg *RegionalAreaGetStatusAttributeType, val RegionalAreaGetStatusRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type RegionalAreaGetStatusArgType = string
|
||||
type RegionalAreaGetStatusRetType = string
|
||||
|
||||
// RegionalArea The basic properties of a regional network area.
|
||||
type RegionalArea struct {
|
||||
Ipv4 RegionalAreaGetIpv4AttributeType `json:"ipv4,omitempty"`
|
||||
// The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`.
|
||||
Status RegionalAreaGetStatusAttributeType `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// NewRegionalArea instantiates a new RegionalArea 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 NewRegionalArea() *RegionalArea {
|
||||
this := RegionalArea{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewRegionalAreaWithDefaults instantiates a new RegionalArea 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 NewRegionalAreaWithDefaults() *RegionalArea {
|
||||
this := RegionalArea{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetIpv4 returns the Ipv4 field value if set, zero value otherwise.
|
||||
func (o *RegionalArea) GetIpv4() (res RegionalAreaGetIpv4RetType) {
|
||||
res, _ = o.GetIpv4Ok()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RegionalArea) GetIpv4Ok() (ret RegionalAreaGetIpv4RetType, ok bool) {
|
||||
return getRegionalAreaGetIpv4AttributeTypeOk(o.Ipv4)
|
||||
}
|
||||
|
||||
// HasIpv4 returns a boolean if a field has been set.
|
||||
func (o *RegionalArea) HasIpv4() bool {
|
||||
_, ok := o.GetIpv4Ok()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIpv4 gets a reference to the given RegionalAreaIPv4 and assigns it to the Ipv4 field.
|
||||
func (o *RegionalArea) SetIpv4(v RegionalAreaGetIpv4RetType) {
|
||||
setRegionalAreaGetIpv4AttributeType(&o.Ipv4, v)
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *RegionalArea) GetStatus() (res RegionalAreaGetStatusRetType) {
|
||||
res, _ = o.GetStatusOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RegionalArea) GetStatusOk() (ret RegionalAreaGetStatusRetType, ok bool) {
|
||||
return getRegionalAreaGetStatusAttributeTypeOk(o.Status)
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *RegionalArea) HasStatus() bool {
|
||||
_, ok := o.GetStatusOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *RegionalArea) SetStatus(v RegionalAreaGetStatusRetType) {
|
||||
setRegionalAreaGetStatusAttributeType(&o.Status, v)
|
||||
}
|
||||
|
||||
func (o RegionalArea) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getRegionalAreaGetIpv4AttributeTypeOk(o.Ipv4); ok {
|
||||
toSerialize["Ipv4"] = val
|
||||
}
|
||||
if val, ok := getRegionalAreaGetStatusAttributeTypeOk(o.Status); ok {
|
||||
toSerialize["Status"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableRegionalArea struct {
|
||||
value *RegionalArea
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableRegionalArea) Get() *RegionalArea {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableRegionalArea) Set(val *RegionalArea) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableRegionalArea) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableRegionalArea) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableRegionalArea(val *RegionalArea) *NullableRegionalArea {
|
||||
return &NullableRegionalArea{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableRegionalArea) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableRegionalArea) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue