192 lines
6.4 KiB
Go
192 lines
6.4 KiB
Go
/*
|
|
STACKIT IaaS API
|
|
|
|
This API allows you to create and modify IaaS resources.
|
|
|
|
API version: 2alpha1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package iaasalpha
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the UpdateNetworkIPv6Body type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &UpdateNetworkIPv6Body{}
|
|
|
|
/*
|
|
types and functions for gateway
|
|
*/
|
|
|
|
// isNullableString
|
|
type UpdateNetworkIPv6BodyGetGatewayAttributeType = *NullableString
|
|
|
|
func getUpdateNetworkIPv6BodyGetGatewayAttributeTypeOk(arg UpdateNetworkIPv6BodyGetGatewayAttributeType) (ret UpdateNetworkIPv6BodyGetGatewayRetType, ok bool) {
|
|
if arg == nil {
|
|
return nil, false
|
|
}
|
|
return arg.Get(), true
|
|
}
|
|
|
|
func setUpdateNetworkIPv6BodyGetGatewayAttributeType(arg *UpdateNetworkIPv6BodyGetGatewayAttributeType, val UpdateNetworkIPv6BodyGetGatewayRetType) {
|
|
if IsNil(*arg) {
|
|
*arg = NewNullableString(val)
|
|
} else {
|
|
(*arg).Set(val)
|
|
}
|
|
}
|
|
|
|
type UpdateNetworkIPv6BodyGetGatewayArgType = *string
|
|
type UpdateNetworkIPv6BodyGetGatewayRetType = *string
|
|
|
|
/*
|
|
types and functions for nameservers
|
|
*/
|
|
|
|
// isArray
|
|
type UpdateNetworkIPv6BodyGetNameserversAttributeType = *[]string
|
|
type UpdateNetworkIPv6BodyGetNameserversArgType = []string
|
|
type UpdateNetworkIPv6BodyGetNameserversRetType = []string
|
|
|
|
func getUpdateNetworkIPv6BodyGetNameserversAttributeTypeOk(arg UpdateNetworkIPv6BodyGetNameserversAttributeType) (ret UpdateNetworkIPv6BodyGetNameserversRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateNetworkIPv6BodyGetNameserversAttributeType(arg *UpdateNetworkIPv6BodyGetNameserversAttributeType, val UpdateNetworkIPv6BodyGetNameserversRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// UpdateNetworkIPv6Body The config object for a IPv6 network update.
|
|
type UpdateNetworkIPv6Body struct {
|
|
// The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.
|
|
Gateway UpdateNetworkIPv6BodyGetGatewayAttributeType `json:"gateway,omitempty"`
|
|
// A list containing DNS Servers/Nameservers for IPv6.
|
|
Nameservers UpdateNetworkIPv6BodyGetNameserversAttributeType `json:"nameservers,omitempty"`
|
|
}
|
|
|
|
// NewUpdateNetworkIPv6Body instantiates a new UpdateNetworkIPv6Body 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 NewUpdateNetworkIPv6Body() *UpdateNetworkIPv6Body {
|
|
this := UpdateNetworkIPv6Body{}
|
|
return &this
|
|
}
|
|
|
|
// NewUpdateNetworkIPv6BodyWithDefaults instantiates a new UpdateNetworkIPv6Body 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 NewUpdateNetworkIPv6BodyWithDefaults() *UpdateNetworkIPv6Body {
|
|
this := UpdateNetworkIPv6Body{}
|
|
return &this
|
|
}
|
|
|
|
// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *UpdateNetworkIPv6Body) GetGateway() (res UpdateNetworkIPv6BodyGetGatewayRetType) {
|
|
res, _ = o.GetGatewayOk()
|
|
return
|
|
}
|
|
|
|
// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *UpdateNetworkIPv6Body) GetGatewayOk() (ret UpdateNetworkIPv6BodyGetGatewayRetType, ok bool) {
|
|
return getUpdateNetworkIPv6BodyGetGatewayAttributeTypeOk(o.Gateway)
|
|
}
|
|
|
|
// HasGateway returns a boolean if a field has been set.
|
|
func (o *UpdateNetworkIPv6Body) HasGateway() bool {
|
|
_, ok := o.GetGatewayOk()
|
|
return ok
|
|
}
|
|
|
|
// SetGateway gets a reference to the given string and assigns it to the Gateway field.
|
|
func (o *UpdateNetworkIPv6Body) SetGateway(v UpdateNetworkIPv6BodyGetGatewayRetType) {
|
|
setUpdateNetworkIPv6BodyGetGatewayAttributeType(&o.Gateway, v)
|
|
}
|
|
|
|
// SetGatewayNil sets the value for Gateway to be an explicit nil
|
|
func (o *UpdateNetworkIPv6Body) SetGatewayNil() {
|
|
o.Gateway = nil
|
|
}
|
|
|
|
// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil
|
|
func (o *UpdateNetworkIPv6Body) UnsetGateway() {
|
|
o.Gateway = nil
|
|
}
|
|
|
|
// GetNameservers returns the Nameservers field value if set, zero value otherwise.
|
|
func (o *UpdateNetworkIPv6Body) GetNameservers() (res UpdateNetworkIPv6BodyGetNameserversRetType) {
|
|
res, _ = o.GetNameserversOk()
|
|
return
|
|
}
|
|
|
|
// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *UpdateNetworkIPv6Body) GetNameserversOk() (ret UpdateNetworkIPv6BodyGetNameserversRetType, ok bool) {
|
|
return getUpdateNetworkIPv6BodyGetNameserversAttributeTypeOk(o.Nameservers)
|
|
}
|
|
|
|
// HasNameservers returns a boolean if a field has been set.
|
|
func (o *UpdateNetworkIPv6Body) HasNameservers() bool {
|
|
_, ok := o.GetNameserversOk()
|
|
return ok
|
|
}
|
|
|
|
// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field.
|
|
func (o *UpdateNetworkIPv6Body) SetNameservers(v UpdateNetworkIPv6BodyGetNameserversRetType) {
|
|
setUpdateNetworkIPv6BodyGetNameserversAttributeType(&o.Nameservers, v)
|
|
}
|
|
|
|
func (o UpdateNetworkIPv6Body) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getUpdateNetworkIPv6BodyGetGatewayAttributeTypeOk(o.Gateway); ok {
|
|
toSerialize["Gateway"] = val
|
|
}
|
|
if val, ok := getUpdateNetworkIPv6BodyGetNameserversAttributeTypeOk(o.Nameservers); ok {
|
|
toSerialize["Nameservers"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableUpdateNetworkIPv6Body struct {
|
|
value *UpdateNetworkIPv6Body
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableUpdateNetworkIPv6Body) Get() *UpdateNetworkIPv6Body {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableUpdateNetworkIPv6Body) Set(val *UpdateNetworkIPv6Body) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableUpdateNetworkIPv6Body) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableUpdateNetworkIPv6Body) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableUpdateNetworkIPv6Body(val *UpdateNetworkIPv6Body) *NullableUpdateNetworkIPv6Body {
|
|
return &NullableUpdateNetworkIPv6Body{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableUpdateNetworkIPv6Body) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableUpdateNetworkIPv6Body) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|