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

416 lines
15 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 PartialUpdateNetworkPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PartialUpdateNetworkPayload{}
/*
types and functions for dhcp
*/
// isBoolean
type PartialUpdateNetworkPayloadgetDhcpAttributeType = *bool
type PartialUpdateNetworkPayloadgetDhcpArgType = bool
type PartialUpdateNetworkPayloadgetDhcpRetType = bool
func getPartialUpdateNetworkPayloadgetDhcpAttributeTypeOk(arg PartialUpdateNetworkPayloadgetDhcpAttributeType) (ret PartialUpdateNetworkPayloadgetDhcpRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPartialUpdateNetworkPayloadgetDhcpAttributeType(arg *PartialUpdateNetworkPayloadgetDhcpAttributeType, val PartialUpdateNetworkPayloadgetDhcpRetType) {
*arg = &val
}
/*
types and functions for ipv4
*/
// isModel
type PartialUpdateNetworkPayloadGetIpv4AttributeType = *UpdateNetworkIPv4Body
type PartialUpdateNetworkPayloadGetIpv4ArgType = UpdateNetworkIPv4Body
type PartialUpdateNetworkPayloadGetIpv4RetType = UpdateNetworkIPv4Body
func getPartialUpdateNetworkPayloadGetIpv4AttributeTypeOk(arg PartialUpdateNetworkPayloadGetIpv4AttributeType) (ret PartialUpdateNetworkPayloadGetIpv4RetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPartialUpdateNetworkPayloadGetIpv4AttributeType(arg *PartialUpdateNetworkPayloadGetIpv4AttributeType, val PartialUpdateNetworkPayloadGetIpv4RetType) {
*arg = &val
}
/*
types and functions for ipv6
*/
// isModel
type PartialUpdateNetworkPayloadGetIpv6AttributeType = *UpdateNetworkIPv6Body
type PartialUpdateNetworkPayloadGetIpv6ArgType = UpdateNetworkIPv6Body
type PartialUpdateNetworkPayloadGetIpv6RetType = UpdateNetworkIPv6Body
func getPartialUpdateNetworkPayloadGetIpv6AttributeTypeOk(arg PartialUpdateNetworkPayloadGetIpv6AttributeType) (ret PartialUpdateNetworkPayloadGetIpv6RetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPartialUpdateNetworkPayloadGetIpv6AttributeType(arg *PartialUpdateNetworkPayloadGetIpv6AttributeType, val PartialUpdateNetworkPayloadGetIpv6RetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isFreeform
type PartialUpdateNetworkPayloadGetLabelsAttributeType = *map[string]interface{}
type PartialUpdateNetworkPayloadGetLabelsArgType = map[string]interface{}
type PartialUpdateNetworkPayloadGetLabelsRetType = map[string]interface{}
func getPartialUpdateNetworkPayloadGetLabelsAttributeTypeOk(arg PartialUpdateNetworkPayloadGetLabelsAttributeType) (ret PartialUpdateNetworkPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPartialUpdateNetworkPayloadGetLabelsAttributeType(arg *PartialUpdateNetworkPayloadGetLabelsAttributeType, val PartialUpdateNetworkPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type PartialUpdateNetworkPayloadGetNameAttributeType = *string
func getPartialUpdateNetworkPayloadGetNameAttributeTypeOk(arg PartialUpdateNetworkPayloadGetNameAttributeType) (ret PartialUpdateNetworkPayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPartialUpdateNetworkPayloadGetNameAttributeType(arg *PartialUpdateNetworkPayloadGetNameAttributeType, val PartialUpdateNetworkPayloadGetNameRetType) {
*arg = &val
}
type PartialUpdateNetworkPayloadGetNameArgType = string
type PartialUpdateNetworkPayloadGetNameRetType = string
/*
types and functions for routed
*/
// isBoolean
type PartialUpdateNetworkPayloadgetRoutedAttributeType = *bool
type PartialUpdateNetworkPayloadgetRoutedArgType = bool
type PartialUpdateNetworkPayloadgetRoutedRetType = bool
func getPartialUpdateNetworkPayloadgetRoutedAttributeTypeOk(arg PartialUpdateNetworkPayloadgetRoutedAttributeType) (ret PartialUpdateNetworkPayloadgetRoutedRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPartialUpdateNetworkPayloadgetRoutedAttributeType(arg *PartialUpdateNetworkPayloadgetRoutedAttributeType, val PartialUpdateNetworkPayloadgetRoutedRetType) {
*arg = &val
}
/*
types and functions for routingTableId
*/
// isNotNullableString
type PartialUpdateNetworkPayloadGetRoutingTableIdAttributeType = *string
func getPartialUpdateNetworkPayloadGetRoutingTableIdAttributeTypeOk(arg PartialUpdateNetworkPayloadGetRoutingTableIdAttributeType) (ret PartialUpdateNetworkPayloadGetRoutingTableIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPartialUpdateNetworkPayloadGetRoutingTableIdAttributeType(arg *PartialUpdateNetworkPayloadGetRoutingTableIdAttributeType, val PartialUpdateNetworkPayloadGetRoutingTableIdRetType) {
*arg = &val
}
type PartialUpdateNetworkPayloadGetRoutingTableIdArgType = string
type PartialUpdateNetworkPayloadGetRoutingTableIdRetType = string
// PartialUpdateNetworkPayload Object that represents the request body for a network update.
type PartialUpdateNetworkPayload struct {
// Enable or disable DHCP for a network.
Dhcp PartialUpdateNetworkPayloadgetDhcpAttributeType `json:"dhcp,omitempty"`
Ipv4 PartialUpdateNetworkPayloadGetIpv4AttributeType `json:"ipv4,omitempty"`
Ipv6 PartialUpdateNetworkPayloadGetIpv6AttributeType `json:"ipv6,omitempty"`
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
Labels PartialUpdateNetworkPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
Name PartialUpdateNetworkPayloadGetNameAttributeType `json:"name,omitempty"`
// Shows if the network is routed and therefore accessible from other networks.
Routed PartialUpdateNetworkPayloadgetRoutedAttributeType `json:"routed,omitempty"`
// Universally Unique Identifier (UUID).
RoutingTableId PartialUpdateNetworkPayloadGetRoutingTableIdAttributeType `json:"routingTableId,omitempty"`
}
// NewPartialUpdateNetworkPayload instantiates a new PartialUpdateNetworkPayload 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 NewPartialUpdateNetworkPayload() *PartialUpdateNetworkPayload {
this := PartialUpdateNetworkPayload{}
return &this
}
// NewPartialUpdateNetworkPayloadWithDefaults instantiates a new PartialUpdateNetworkPayload 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 NewPartialUpdateNetworkPayloadWithDefaults() *PartialUpdateNetworkPayload {
this := PartialUpdateNetworkPayload{}
return &this
}
// GetDhcp returns the Dhcp field value if set, zero value otherwise.
func (o *PartialUpdateNetworkPayload) GetDhcp() (res PartialUpdateNetworkPayloadgetDhcpRetType) {
res, _ = o.GetDhcpOk()
return
}
// GetDhcpOk returns a tuple with the Dhcp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PartialUpdateNetworkPayload) GetDhcpOk() (ret PartialUpdateNetworkPayloadgetDhcpRetType, ok bool) {
return getPartialUpdateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp)
}
// HasDhcp returns a boolean if a field has been set.
func (o *PartialUpdateNetworkPayload) HasDhcp() bool {
_, ok := o.GetDhcpOk()
return ok
}
// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field.
func (o *PartialUpdateNetworkPayload) SetDhcp(v PartialUpdateNetworkPayloadgetDhcpRetType) {
setPartialUpdateNetworkPayloadgetDhcpAttributeType(&o.Dhcp, v)
}
// GetIpv4 returns the Ipv4 field value if set, zero value otherwise.
func (o *PartialUpdateNetworkPayload) GetIpv4() (res PartialUpdateNetworkPayloadGetIpv4RetType) {
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 *PartialUpdateNetworkPayload) GetIpv4Ok() (ret PartialUpdateNetworkPayloadGetIpv4RetType, ok bool) {
return getPartialUpdateNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4)
}
// HasIpv4 returns a boolean if a field has been set.
func (o *PartialUpdateNetworkPayload) HasIpv4() bool {
_, ok := o.GetIpv4Ok()
return ok
}
// SetIpv4 gets a reference to the given UpdateNetworkIPv4Body and assigns it to the Ipv4 field.
func (o *PartialUpdateNetworkPayload) SetIpv4(v PartialUpdateNetworkPayloadGetIpv4RetType) {
setPartialUpdateNetworkPayloadGetIpv4AttributeType(&o.Ipv4, v)
}
// GetIpv6 returns the Ipv6 field value if set, zero value otherwise.
func (o *PartialUpdateNetworkPayload) GetIpv6() (res PartialUpdateNetworkPayloadGetIpv6RetType) {
res, _ = o.GetIpv6Ok()
return
}
// GetIpv6Ok returns a tuple with the Ipv6 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PartialUpdateNetworkPayload) GetIpv6Ok() (ret PartialUpdateNetworkPayloadGetIpv6RetType, ok bool) {
return getPartialUpdateNetworkPayloadGetIpv6AttributeTypeOk(o.Ipv6)
}
// HasIpv6 returns a boolean if a field has been set.
func (o *PartialUpdateNetworkPayload) HasIpv6() bool {
_, ok := o.GetIpv6Ok()
return ok
}
// SetIpv6 gets a reference to the given UpdateNetworkIPv6Body and assigns it to the Ipv6 field.
func (o *PartialUpdateNetworkPayload) SetIpv6(v PartialUpdateNetworkPayloadGetIpv6RetType) {
setPartialUpdateNetworkPayloadGetIpv6AttributeType(&o.Ipv6, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *PartialUpdateNetworkPayload) GetLabels() (res PartialUpdateNetworkPayloadGetLabelsRetType) {
res, _ = o.GetLabelsOk()
return
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PartialUpdateNetworkPayload) GetLabelsOk() (ret PartialUpdateNetworkPayloadGetLabelsRetType, ok bool) {
return getPartialUpdateNetworkPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *PartialUpdateNetworkPayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
func (o *PartialUpdateNetworkPayload) SetLabels(v PartialUpdateNetworkPayloadGetLabelsRetType) {
setPartialUpdateNetworkPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *PartialUpdateNetworkPayload) GetName() (res PartialUpdateNetworkPayloadGetNameRetType) {
res, _ = o.GetNameOk()
return
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PartialUpdateNetworkPayload) GetNameOk() (ret PartialUpdateNetworkPayloadGetNameRetType, ok bool) {
return getPartialUpdateNetworkPayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *PartialUpdateNetworkPayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *PartialUpdateNetworkPayload) SetName(v PartialUpdateNetworkPayloadGetNameRetType) {
setPartialUpdateNetworkPayloadGetNameAttributeType(&o.Name, v)
}
// GetRouted returns the Routed field value if set, zero value otherwise.
func (o *PartialUpdateNetworkPayload) GetRouted() (res PartialUpdateNetworkPayloadgetRoutedRetType) {
res, _ = o.GetRoutedOk()
return
}
// GetRoutedOk returns a tuple with the Routed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PartialUpdateNetworkPayload) GetRoutedOk() (ret PartialUpdateNetworkPayloadgetRoutedRetType, ok bool) {
return getPartialUpdateNetworkPayloadgetRoutedAttributeTypeOk(o.Routed)
}
// HasRouted returns a boolean if a field has been set.
func (o *PartialUpdateNetworkPayload) HasRouted() bool {
_, ok := o.GetRoutedOk()
return ok
}
// SetRouted gets a reference to the given bool and assigns it to the Routed field.
func (o *PartialUpdateNetworkPayload) SetRouted(v PartialUpdateNetworkPayloadgetRoutedRetType) {
setPartialUpdateNetworkPayloadgetRoutedAttributeType(&o.Routed, v)
}
// GetRoutingTableId returns the RoutingTableId field value if set, zero value otherwise.
func (o *PartialUpdateNetworkPayload) GetRoutingTableId() (res PartialUpdateNetworkPayloadGetRoutingTableIdRetType) {
res, _ = o.GetRoutingTableIdOk()
return
}
// GetRoutingTableIdOk returns a tuple with the RoutingTableId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PartialUpdateNetworkPayload) GetRoutingTableIdOk() (ret PartialUpdateNetworkPayloadGetRoutingTableIdRetType, ok bool) {
return getPartialUpdateNetworkPayloadGetRoutingTableIdAttributeTypeOk(o.RoutingTableId)
}
// HasRoutingTableId returns a boolean if a field has been set.
func (o *PartialUpdateNetworkPayload) HasRoutingTableId() bool {
_, ok := o.GetRoutingTableIdOk()
return ok
}
// SetRoutingTableId gets a reference to the given string and assigns it to the RoutingTableId field.
func (o *PartialUpdateNetworkPayload) SetRoutingTableId(v PartialUpdateNetworkPayloadGetRoutingTableIdRetType) {
setPartialUpdateNetworkPayloadGetRoutingTableIdAttributeType(&o.RoutingTableId, v)
}
func (o PartialUpdateNetworkPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getPartialUpdateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok {
toSerialize["Dhcp"] = val
}
if val, ok := getPartialUpdateNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok {
toSerialize["Ipv4"] = val
}
if val, ok := getPartialUpdateNetworkPayloadGetIpv6AttributeTypeOk(o.Ipv6); ok {
toSerialize["Ipv6"] = val
}
if val, ok := getPartialUpdateNetworkPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getPartialUpdateNetworkPayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getPartialUpdateNetworkPayloadgetRoutedAttributeTypeOk(o.Routed); ok {
toSerialize["Routed"] = val
}
if val, ok := getPartialUpdateNetworkPayloadGetRoutingTableIdAttributeTypeOk(o.RoutingTableId); ok {
toSerialize["RoutingTableId"] = val
}
return toSerialize, nil
}
type NullablePartialUpdateNetworkPayload struct {
value *PartialUpdateNetworkPayload
isSet bool
}
func (v NullablePartialUpdateNetworkPayload) Get() *PartialUpdateNetworkPayload {
return v.value
}
func (v *NullablePartialUpdateNetworkPayload) Set(val *PartialUpdateNetworkPayload) {
v.value = val
v.isSet = true
}
func (v NullablePartialUpdateNetworkPayload) IsSet() bool {
return v.isSet
}
func (v *NullablePartialUpdateNetworkPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePartialUpdateNetworkPayload(val *PartialUpdateNetworkPayload) *NullablePartialUpdateNetworkPayload {
return &NullablePartialUpdateNetworkPayload{value: val, isSet: true}
}
func (v NullablePartialUpdateNetworkPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePartialUpdateNetworkPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}