terraform-provider-stackitp.../pkg/iaasbeta/model_nexthop_ipv6.go
2026-01-21 09:07:29 +01:00

171 lines
4.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 NexthopIPv6 type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &NexthopIPv6{}
/*
types and functions for type
*/
// isNotNullableString
type NexthopIPv6GetTypeAttributeType = *string
func getNexthopIPv6GetTypeAttributeTypeOk(arg NexthopIPv6GetTypeAttributeType) (ret NexthopIPv6GetTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setNexthopIPv6GetTypeAttributeType(arg *NexthopIPv6GetTypeAttributeType, val NexthopIPv6GetTypeRetType) {
*arg = &val
}
type NexthopIPv6GetTypeArgType = string
type NexthopIPv6GetTypeRetType = string
/*
types and functions for value
*/
// isNotNullableString
type NexthopIPv6GetValueAttributeType = *string
func getNexthopIPv6GetValueAttributeTypeOk(arg NexthopIPv6GetValueAttributeType) (ret NexthopIPv6GetValueRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setNexthopIPv6GetValueAttributeType(arg *NexthopIPv6GetValueAttributeType, val NexthopIPv6GetValueRetType) {
*arg = &val
}
type NexthopIPv6GetValueArgType = string
type NexthopIPv6GetValueRetType = string
// NexthopIPv6 Object that represents an IPv6 address.
type NexthopIPv6 struct {
// REQUIRED
Type NexthopIPv6GetTypeAttributeType `json:"type" required:"true"`
// An IPv6 address.
// REQUIRED
Value NexthopIPv6GetValueAttributeType `json:"value" required:"true"`
}
type _NexthopIPv6 NexthopIPv6
// NewNexthopIPv6 instantiates a new NexthopIPv6 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 NewNexthopIPv6(types NexthopIPv6GetTypeArgType, value NexthopIPv6GetValueArgType) *NexthopIPv6 {
this := NexthopIPv6{}
setNexthopIPv6GetTypeAttributeType(&this.Type, types)
setNexthopIPv6GetValueAttributeType(&this.Value, value)
return &this
}
// NewNexthopIPv6WithDefaults instantiates a new NexthopIPv6 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 NewNexthopIPv6WithDefaults() *NexthopIPv6 {
this := NexthopIPv6{}
return &this
}
// GetType returns the Type field value
func (o *NexthopIPv6) GetType() (ret NexthopIPv6GetTypeRetType) {
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 *NexthopIPv6) GetTypeOk() (ret NexthopIPv6GetTypeRetType, ok bool) {
return getNexthopIPv6GetTypeAttributeTypeOk(o.Type)
}
// SetType sets field value
func (o *NexthopIPv6) SetType(v NexthopIPv6GetTypeRetType) {
setNexthopIPv6GetTypeAttributeType(&o.Type, v)
}
// GetValue returns the Value field value
func (o *NexthopIPv6) GetValue() (ret NexthopIPv6GetValueRetType) {
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 *NexthopIPv6) GetValueOk() (ret NexthopIPv6GetValueRetType, ok bool) {
return getNexthopIPv6GetValueAttributeTypeOk(o.Value)
}
// SetValue sets field value
func (o *NexthopIPv6) SetValue(v NexthopIPv6GetValueRetType) {
setNexthopIPv6GetValueAttributeType(&o.Value, v)
}
func (o NexthopIPv6) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getNexthopIPv6GetTypeAttributeTypeOk(o.Type); ok {
toSerialize["Type"] = val
}
if val, ok := getNexthopIPv6GetValueAttributeTypeOk(o.Value); ok {
toSerialize["Value"] = val
}
return toSerialize, nil
}
type NullableNexthopIPv6 struct {
value *NexthopIPv6
isSet bool
}
func (v NullableNexthopIPv6) Get() *NexthopIPv6 {
return v.value
}
func (v *NullableNexthopIPv6) Set(val *NexthopIPv6) {
v.value = val
v.isSet = true
}
func (v NullableNexthopIPv6) IsSet() bool {
return v.isSet
}
func (v *NullableNexthopIPv6) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNexthopIPv6(val *NexthopIPv6) *NullableNexthopIPv6 {
return &NullableNexthopIPv6{value: val, isSet: true}
}
func (v NullableNexthopIPv6) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNexthopIPv6) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}