290 lines
9.8 KiB
Go
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 CreatePublicIPPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CreatePublicIPPayload{}
|
|
|
|
/*
|
|
types and functions for id
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreatePublicIPPayloadGetIdAttributeType = *string
|
|
|
|
func getCreatePublicIPPayloadGetIdAttributeTypeOk(arg CreatePublicIPPayloadGetIdAttributeType) (ret CreatePublicIPPayloadGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreatePublicIPPayloadGetIdAttributeType(arg *CreatePublicIPPayloadGetIdAttributeType, val CreatePublicIPPayloadGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreatePublicIPPayloadGetIdArgType = string
|
|
type CreatePublicIPPayloadGetIdRetType = string
|
|
|
|
/*
|
|
types and functions for ip
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreatePublicIPPayloadGetIpAttributeType = *string
|
|
|
|
func getCreatePublicIPPayloadGetIpAttributeTypeOk(arg CreatePublicIPPayloadGetIpAttributeType) (ret CreatePublicIPPayloadGetIpRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreatePublicIPPayloadGetIpAttributeType(arg *CreatePublicIPPayloadGetIpAttributeType, val CreatePublicIPPayloadGetIpRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreatePublicIPPayloadGetIpArgType = string
|
|
type CreatePublicIPPayloadGetIpRetType = string
|
|
|
|
/*
|
|
types and functions for labels
|
|
*/
|
|
|
|
// isFreeform
|
|
type CreatePublicIPPayloadGetLabelsAttributeType = *map[string]interface{}
|
|
type CreatePublicIPPayloadGetLabelsArgType = map[string]interface{}
|
|
type CreatePublicIPPayloadGetLabelsRetType = map[string]interface{}
|
|
|
|
func getCreatePublicIPPayloadGetLabelsAttributeTypeOk(arg CreatePublicIPPayloadGetLabelsAttributeType) (ret CreatePublicIPPayloadGetLabelsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreatePublicIPPayloadGetLabelsAttributeType(arg *CreatePublicIPPayloadGetLabelsAttributeType, val CreatePublicIPPayloadGetLabelsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for networkInterface
|
|
*/
|
|
|
|
// isNullableString
|
|
type CreatePublicIPPayloadGetNetworkInterfaceAttributeType = *NullableString
|
|
|
|
func getCreatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(arg CreatePublicIPPayloadGetNetworkInterfaceAttributeType) (ret CreatePublicIPPayloadGetNetworkInterfaceRetType, ok bool) {
|
|
if arg == nil {
|
|
return nil, false
|
|
}
|
|
return arg.Get(), true
|
|
}
|
|
|
|
func setCreatePublicIPPayloadGetNetworkInterfaceAttributeType(arg *CreatePublicIPPayloadGetNetworkInterfaceAttributeType, val CreatePublicIPPayloadGetNetworkInterfaceRetType) {
|
|
if IsNil(*arg) {
|
|
*arg = NewNullableString(val)
|
|
} else {
|
|
(*arg).Set(val)
|
|
}
|
|
}
|
|
|
|
type CreatePublicIPPayloadGetNetworkInterfaceArgType = *string
|
|
type CreatePublicIPPayloadGetNetworkInterfaceRetType = *string
|
|
|
|
// CreatePublicIPPayload Object that represents a public IP.
|
|
type CreatePublicIPPayload struct {
|
|
// Universally Unique Identifier (UUID).
|
|
Id CreatePublicIPPayloadGetIdAttributeType `json:"id,omitempty"`
|
|
// String that represents an IPv4 address.
|
|
Ip CreatePublicIPPayloadGetIpAttributeType `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 CreatePublicIPPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
|
// Universally Unique Identifier (UUID).
|
|
NetworkInterface CreatePublicIPPayloadGetNetworkInterfaceAttributeType `json:"networkInterface,omitempty"`
|
|
}
|
|
|
|
// NewCreatePublicIPPayload instantiates a new CreatePublicIPPayload 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 NewCreatePublicIPPayload() *CreatePublicIPPayload {
|
|
this := CreatePublicIPPayload{}
|
|
return &this
|
|
}
|
|
|
|
// NewCreatePublicIPPayloadWithDefaults instantiates a new CreatePublicIPPayload 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 NewCreatePublicIPPayloadWithDefaults() *CreatePublicIPPayload {
|
|
this := CreatePublicIPPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *CreatePublicIPPayload) GetId() (res CreatePublicIPPayloadGetIdRetType) {
|
|
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 *CreatePublicIPPayload) GetIdOk() (ret CreatePublicIPPayloadGetIdRetType, ok bool) {
|
|
return getCreatePublicIPPayloadGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *CreatePublicIPPayload) HasId() bool {
|
|
_, ok := o.GetIdOk()
|
|
return ok
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *CreatePublicIPPayload) SetId(v CreatePublicIPPayloadGetIdRetType) {
|
|
setCreatePublicIPPayloadGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetIp returns the Ip field value if set, zero value otherwise.
|
|
func (o *CreatePublicIPPayload) GetIp() (res CreatePublicIPPayloadGetIpRetType) {
|
|
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 *CreatePublicIPPayload) GetIpOk() (ret CreatePublicIPPayloadGetIpRetType, ok bool) {
|
|
return getCreatePublicIPPayloadGetIpAttributeTypeOk(o.Ip)
|
|
}
|
|
|
|
// HasIp returns a boolean if a field has been set.
|
|
func (o *CreatePublicIPPayload) HasIp() bool {
|
|
_, ok := o.GetIpOk()
|
|
return ok
|
|
}
|
|
|
|
// SetIp gets a reference to the given string and assigns it to the Ip field.
|
|
func (o *CreatePublicIPPayload) SetIp(v CreatePublicIPPayloadGetIpRetType) {
|
|
setCreatePublicIPPayloadGetIpAttributeType(&o.Ip, v)
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
|
func (o *CreatePublicIPPayload) GetLabels() (res CreatePublicIPPayloadGetLabelsRetType) {
|
|
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 *CreatePublicIPPayload) GetLabelsOk() (ret CreatePublicIPPayloadGetLabelsRetType, ok bool) {
|
|
return getCreatePublicIPPayloadGetLabelsAttributeTypeOk(o.Labels)
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *CreatePublicIPPayload) 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 *CreatePublicIPPayload) SetLabels(v CreatePublicIPPayloadGetLabelsRetType) {
|
|
setCreatePublicIPPayloadGetLabelsAttributeType(&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 *CreatePublicIPPayload) GetNetworkInterface() (res CreatePublicIPPayloadGetNetworkInterfaceRetType) {
|
|
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 *CreatePublicIPPayload) GetNetworkInterfaceOk() (ret CreatePublicIPPayloadGetNetworkInterfaceRetType, ok bool) {
|
|
return getCreatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface)
|
|
}
|
|
|
|
// HasNetworkInterface returns a boolean if a field has been set.
|
|
func (o *CreatePublicIPPayload) HasNetworkInterface() bool {
|
|
_, ok := o.GetNetworkInterfaceOk()
|
|
return ok
|
|
}
|
|
|
|
// SetNetworkInterface gets a reference to the given string and assigns it to the NetworkInterface field.
|
|
func (o *CreatePublicIPPayload) SetNetworkInterface(v CreatePublicIPPayloadGetNetworkInterfaceRetType) {
|
|
setCreatePublicIPPayloadGetNetworkInterfaceAttributeType(&o.NetworkInterface, v)
|
|
}
|
|
|
|
// SetNetworkInterfaceNil sets the value for NetworkInterface to be an explicit nil
|
|
func (o *CreatePublicIPPayload) SetNetworkInterfaceNil() {
|
|
o.NetworkInterface = nil
|
|
}
|
|
|
|
// UnsetNetworkInterface ensures that no value is present for NetworkInterface, not even an explicit nil
|
|
func (o *CreatePublicIPPayload) UnsetNetworkInterface() {
|
|
o.NetworkInterface = nil
|
|
}
|
|
|
|
func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getCreatePublicIPPayloadGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getCreatePublicIPPayloadGetIpAttributeTypeOk(o.Ip); ok {
|
|
toSerialize["Ip"] = val
|
|
}
|
|
if val, ok := getCreatePublicIPPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
|
toSerialize["Labels"] = val
|
|
}
|
|
if val, ok := getCreatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface); ok {
|
|
toSerialize["NetworkInterface"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableCreatePublicIPPayload struct {
|
|
value *CreatePublicIPPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCreatePublicIPPayload) Get() *CreatePublicIPPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCreatePublicIPPayload) Set(val *CreatePublicIPPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCreatePublicIPPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCreatePublicIPPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCreatePublicIPPayload(val *CreatePublicIPPayload) *NullableCreatePublicIPPayload {
|
|
return &NullableCreatePublicIPPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCreatePublicIPPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCreatePublicIPPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|