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

290 lines
9.8 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 UpdatePublicIPPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdatePublicIPPayload{}
/*
types and functions for id
*/
// isNotNullableString
type UpdatePublicIPPayloadGetIdAttributeType = *string
func getUpdatePublicIPPayloadGetIdAttributeTypeOk(arg UpdatePublicIPPayloadGetIdAttributeType) (ret UpdatePublicIPPayloadGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdatePublicIPPayloadGetIdAttributeType(arg *UpdatePublicIPPayloadGetIdAttributeType, val UpdatePublicIPPayloadGetIdRetType) {
*arg = &val
}
type UpdatePublicIPPayloadGetIdArgType = string
type UpdatePublicIPPayloadGetIdRetType = string
/*
types and functions for ip
*/
// isNotNullableString
type UpdatePublicIPPayloadGetIpAttributeType = *string
func getUpdatePublicIPPayloadGetIpAttributeTypeOk(arg UpdatePublicIPPayloadGetIpAttributeType) (ret UpdatePublicIPPayloadGetIpRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdatePublicIPPayloadGetIpAttributeType(arg *UpdatePublicIPPayloadGetIpAttributeType, val UpdatePublicIPPayloadGetIpRetType) {
*arg = &val
}
type UpdatePublicIPPayloadGetIpArgType = string
type UpdatePublicIPPayloadGetIpRetType = string
/*
types and functions for labels
*/
// isFreeform
type UpdatePublicIPPayloadGetLabelsAttributeType = *map[string]interface{}
type UpdatePublicIPPayloadGetLabelsArgType = map[string]interface{}
type UpdatePublicIPPayloadGetLabelsRetType = map[string]interface{}
func getUpdatePublicIPPayloadGetLabelsAttributeTypeOk(arg UpdatePublicIPPayloadGetLabelsAttributeType) (ret UpdatePublicIPPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdatePublicIPPayloadGetLabelsAttributeType(arg *UpdatePublicIPPayloadGetLabelsAttributeType, val UpdatePublicIPPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for networkInterface
*/
// isNullableString
type UpdatePublicIPPayloadGetNetworkInterfaceAttributeType = *NullableString
func getUpdatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(arg UpdatePublicIPPayloadGetNetworkInterfaceAttributeType) (ret UpdatePublicIPPayloadGetNetworkInterfaceRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setUpdatePublicIPPayloadGetNetworkInterfaceAttributeType(arg *UpdatePublicIPPayloadGetNetworkInterfaceAttributeType, val UpdatePublicIPPayloadGetNetworkInterfaceRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type UpdatePublicIPPayloadGetNetworkInterfaceArgType = *string
type UpdatePublicIPPayloadGetNetworkInterfaceRetType = *string
// UpdatePublicIPPayload Object that represents a public IP.
type UpdatePublicIPPayload struct {
// Universally Unique Identifier (UUID).
Id UpdatePublicIPPayloadGetIdAttributeType `json:"id,omitempty"`
// String that represents an IPv4 address.
Ip UpdatePublicIPPayloadGetIpAttributeType `json:"ip,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 UpdatePublicIPPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// Universally Unique Identifier (UUID).
NetworkInterface UpdatePublicIPPayloadGetNetworkInterfaceAttributeType `json:"networkInterface,omitempty"`
}
// NewUpdatePublicIPPayload instantiates a new UpdatePublicIPPayload 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 NewUpdatePublicIPPayload() *UpdatePublicIPPayload {
this := UpdatePublicIPPayload{}
return &this
}
// NewUpdatePublicIPPayloadWithDefaults instantiates a new UpdatePublicIPPayload 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 NewUpdatePublicIPPayloadWithDefaults() *UpdatePublicIPPayload {
this := UpdatePublicIPPayload{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *UpdatePublicIPPayload) GetId() (res UpdatePublicIPPayloadGetIdRetType) {
res, _ = o.GetIdOk()
return
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdatePublicIPPayload) GetIdOk() (ret UpdatePublicIPPayloadGetIdRetType, ok bool) {
return getUpdatePublicIPPayloadGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *UpdatePublicIPPayload) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *UpdatePublicIPPayload) SetId(v UpdatePublicIPPayloadGetIdRetType) {
setUpdatePublicIPPayloadGetIdAttributeType(&o.Id, v)
}
// GetIp returns the Ip field value if set, zero value otherwise.
func (o *UpdatePublicIPPayload) GetIp() (res UpdatePublicIPPayloadGetIpRetType) {
res, _ = o.GetIpOk()
return
}
// GetIpOk returns a tuple with the Ip field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdatePublicIPPayload) GetIpOk() (ret UpdatePublicIPPayloadGetIpRetType, ok bool) {
return getUpdatePublicIPPayloadGetIpAttributeTypeOk(o.Ip)
}
// HasIp returns a boolean if a field has been set.
func (o *UpdatePublicIPPayload) HasIp() bool {
_, ok := o.GetIpOk()
return ok
}
// SetIp gets a reference to the given string and assigns it to the Ip field.
func (o *UpdatePublicIPPayload) SetIp(v UpdatePublicIPPayloadGetIpRetType) {
setUpdatePublicIPPayloadGetIpAttributeType(&o.Ip, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *UpdatePublicIPPayload) GetLabels() (res UpdatePublicIPPayloadGetLabelsRetType) {
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 *UpdatePublicIPPayload) GetLabelsOk() (ret UpdatePublicIPPayloadGetLabelsRetType, ok bool) {
return getUpdatePublicIPPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdatePublicIPPayload) 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 *UpdatePublicIPPayload) SetLabels(v UpdatePublicIPPayloadGetLabelsRetType) {
setUpdatePublicIPPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetNetworkInterface returns the NetworkInterface field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdatePublicIPPayload) GetNetworkInterface() (res UpdatePublicIPPayloadGetNetworkInterfaceRetType) {
res, _ = o.GetNetworkInterfaceOk()
return
}
// GetNetworkInterfaceOk returns a tuple with the NetworkInterface 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 *UpdatePublicIPPayload) GetNetworkInterfaceOk() (ret UpdatePublicIPPayloadGetNetworkInterfaceRetType, ok bool) {
return getUpdatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface)
}
// HasNetworkInterface returns a boolean if a field has been set.
func (o *UpdatePublicIPPayload) HasNetworkInterface() bool {
_, ok := o.GetNetworkInterfaceOk()
return ok
}
// SetNetworkInterface gets a reference to the given string and assigns it to the NetworkInterface field.
func (o *UpdatePublicIPPayload) SetNetworkInterface(v UpdatePublicIPPayloadGetNetworkInterfaceRetType) {
setUpdatePublicIPPayloadGetNetworkInterfaceAttributeType(&o.NetworkInterface, v)
}
// SetNetworkInterfaceNil sets the value for NetworkInterface to be an explicit nil
func (o *UpdatePublicIPPayload) SetNetworkInterfaceNil() {
o.NetworkInterface = nil
}
// UnsetNetworkInterface ensures that no value is present for NetworkInterface, not even an explicit nil
func (o *UpdatePublicIPPayload) UnsetNetworkInterface() {
o.NetworkInterface = nil
}
func (o UpdatePublicIPPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdatePublicIPPayloadGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getUpdatePublicIPPayloadGetIpAttributeTypeOk(o.Ip); ok {
toSerialize["Ip"] = val
}
if val, ok := getUpdatePublicIPPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getUpdatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface); ok {
toSerialize["NetworkInterface"] = val
}
return toSerialize, nil
}
type NullableUpdatePublicIPPayload struct {
value *UpdatePublicIPPayload
isSet bool
}
func (v NullableUpdatePublicIPPayload) Get() *UpdatePublicIPPayload {
return v.value
}
func (v *NullableUpdatePublicIPPayload) Set(val *UpdatePublicIPPayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdatePublicIPPayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdatePublicIPPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdatePublicIPPayload(val *UpdatePublicIPPayload) *NullableUpdatePublicIPPayload {
return &NullableUpdatePublicIPPayload{value: val, isSet: true}
}
func (v NullableUpdatePublicIPPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdatePublicIPPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}