171 lines
5 KiB
Go
171 lines
5 KiB
Go
/*
|
|
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 DestinationCIDRv6 type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DestinationCIDRv6{}
|
|
|
|
/*
|
|
types and functions for type
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type DestinationCIDRv6GetTypeAttributeType = *string
|
|
|
|
func getDestinationCIDRv6GetTypeAttributeTypeOk(arg DestinationCIDRv6GetTypeAttributeType) (ret DestinationCIDRv6GetTypeRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setDestinationCIDRv6GetTypeAttributeType(arg *DestinationCIDRv6GetTypeAttributeType, val DestinationCIDRv6GetTypeRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type DestinationCIDRv6GetTypeArgType = string
|
|
type DestinationCIDRv6GetTypeRetType = string
|
|
|
|
/*
|
|
types and functions for value
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type DestinationCIDRv6GetValueAttributeType = *string
|
|
|
|
func getDestinationCIDRv6GetValueAttributeTypeOk(arg DestinationCIDRv6GetValueAttributeType) (ret DestinationCIDRv6GetValueRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setDestinationCIDRv6GetValueAttributeType(arg *DestinationCIDRv6GetValueAttributeType, val DestinationCIDRv6GetValueRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type DestinationCIDRv6GetValueArgType = string
|
|
type DestinationCIDRv6GetValueRetType = string
|
|
|
|
// DestinationCIDRv6 IPv6 Classless Inter-Domain Routing (CIDR) Object.
|
|
type DestinationCIDRv6 struct {
|
|
// REQUIRED
|
|
Type DestinationCIDRv6GetTypeAttributeType `json:"type" required:"true"`
|
|
// An CIDRv6 string.
|
|
// REQUIRED
|
|
Value DestinationCIDRv6GetValueAttributeType `json:"value" required:"true"`
|
|
}
|
|
|
|
type _DestinationCIDRv6 DestinationCIDRv6
|
|
|
|
// NewDestinationCIDRv6 instantiates a new DestinationCIDRv6 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 NewDestinationCIDRv6(types DestinationCIDRv6GetTypeArgType, value DestinationCIDRv6GetValueArgType) *DestinationCIDRv6 {
|
|
this := DestinationCIDRv6{}
|
|
setDestinationCIDRv6GetTypeAttributeType(&this.Type, types)
|
|
setDestinationCIDRv6GetValueAttributeType(&this.Value, value)
|
|
return &this
|
|
}
|
|
|
|
// NewDestinationCIDRv6WithDefaults instantiates a new DestinationCIDRv6 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 NewDestinationCIDRv6WithDefaults() *DestinationCIDRv6 {
|
|
this := DestinationCIDRv6{}
|
|
return &this
|
|
}
|
|
|
|
// GetType returns the Type field value
|
|
func (o *DestinationCIDRv6) GetType() (ret DestinationCIDRv6GetTypeRetType) {
|
|
ret, _ = o.GetTypeOk()
|
|
return ret
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationCIDRv6) GetTypeOk() (ret DestinationCIDRv6GetTypeRetType, ok bool) {
|
|
return getDestinationCIDRv6GetTypeAttributeTypeOk(o.Type)
|
|
}
|
|
|
|
// SetType sets field value
|
|
func (o *DestinationCIDRv6) SetType(v DestinationCIDRv6GetTypeRetType) {
|
|
setDestinationCIDRv6GetTypeAttributeType(&o.Type, v)
|
|
}
|
|
|
|
// GetValue returns the Value field value
|
|
func (o *DestinationCIDRv6) GetValue() (ret DestinationCIDRv6GetValueRetType) {
|
|
ret, _ = o.GetValueOk()
|
|
return ret
|
|
}
|
|
|
|
// GetValueOk returns a tuple with the Value field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationCIDRv6) GetValueOk() (ret DestinationCIDRv6GetValueRetType, ok bool) {
|
|
return getDestinationCIDRv6GetValueAttributeTypeOk(o.Value)
|
|
}
|
|
|
|
// SetValue sets field value
|
|
func (o *DestinationCIDRv6) SetValue(v DestinationCIDRv6GetValueRetType) {
|
|
setDestinationCIDRv6GetValueAttributeType(&o.Value, v)
|
|
}
|
|
|
|
func (o DestinationCIDRv6) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getDestinationCIDRv6GetTypeAttributeTypeOk(o.Type); ok {
|
|
toSerialize["Type"] = val
|
|
}
|
|
if val, ok := getDestinationCIDRv6GetValueAttributeTypeOk(o.Value); ok {
|
|
toSerialize["Value"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableDestinationCIDRv6 struct {
|
|
value *DestinationCIDRv6
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDestinationCIDRv6) Get() *DestinationCIDRv6 {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDestinationCIDRv6) Set(val *DestinationCIDRv6) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDestinationCIDRv6) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDestinationCIDRv6) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDestinationCIDRv6(val *DestinationCIDRv6) *NullableDestinationCIDRv6 {
|
|
return &NullableDestinationCIDRv6{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDestinationCIDRv6) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDestinationCIDRv6) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|