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

764 lines
25 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 CreateNicPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateNicPayload{}
/*
types and functions for allowedAddresses
*/
// isArray
type CreateNicPayloadGetAllowedAddressesAttributeType = *[]AllowedAddressesInner
type CreateNicPayloadGetAllowedAddressesArgType = []AllowedAddressesInner
type CreateNicPayloadGetAllowedAddressesRetType = []AllowedAddressesInner
func getCreateNicPayloadGetAllowedAddressesAttributeTypeOk(arg CreateNicPayloadGetAllowedAddressesAttributeType) (ret CreateNicPayloadGetAllowedAddressesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetAllowedAddressesAttributeType(arg *CreateNicPayloadGetAllowedAddressesAttributeType, val CreateNicPayloadGetAllowedAddressesRetType) {
*arg = &val
}
/*
types and functions for description
*/
// isNotNullableString
type CreateNicPayloadGetDescriptionAttributeType = *string
func getCreateNicPayloadGetDescriptionAttributeTypeOk(arg CreateNicPayloadGetDescriptionAttributeType) (ret CreateNicPayloadGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetDescriptionAttributeType(arg *CreateNicPayloadGetDescriptionAttributeType, val CreateNicPayloadGetDescriptionRetType) {
*arg = &val
}
type CreateNicPayloadGetDescriptionArgType = string
type CreateNicPayloadGetDescriptionRetType = string
/*
types and functions for device
*/
// isNotNullableString
type CreateNicPayloadGetDeviceAttributeType = *string
func getCreateNicPayloadGetDeviceAttributeTypeOk(arg CreateNicPayloadGetDeviceAttributeType) (ret CreateNicPayloadGetDeviceRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetDeviceAttributeType(arg *CreateNicPayloadGetDeviceAttributeType, val CreateNicPayloadGetDeviceRetType) {
*arg = &val
}
type CreateNicPayloadGetDeviceArgType = string
type CreateNicPayloadGetDeviceRetType = string
/*
types and functions for id
*/
// isNotNullableString
type CreateNicPayloadGetIdAttributeType = *string
func getCreateNicPayloadGetIdAttributeTypeOk(arg CreateNicPayloadGetIdAttributeType) (ret CreateNicPayloadGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetIdAttributeType(arg *CreateNicPayloadGetIdAttributeType, val CreateNicPayloadGetIdRetType) {
*arg = &val
}
type CreateNicPayloadGetIdArgType = string
type CreateNicPayloadGetIdRetType = string
/*
types and functions for ipv4
*/
// isNotNullableString
type CreateNicPayloadGetIpv4AttributeType = *string
func getCreateNicPayloadGetIpv4AttributeTypeOk(arg CreateNicPayloadGetIpv4AttributeType) (ret CreateNicPayloadGetIpv4RetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetIpv4AttributeType(arg *CreateNicPayloadGetIpv4AttributeType, val CreateNicPayloadGetIpv4RetType) {
*arg = &val
}
type CreateNicPayloadGetIpv4ArgType = string
type CreateNicPayloadGetIpv4RetType = string
/*
types and functions for ipv6
*/
// isNotNullableString
type CreateNicPayloadGetIpv6AttributeType = *string
func getCreateNicPayloadGetIpv6AttributeTypeOk(arg CreateNicPayloadGetIpv6AttributeType) (ret CreateNicPayloadGetIpv6RetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetIpv6AttributeType(arg *CreateNicPayloadGetIpv6AttributeType, val CreateNicPayloadGetIpv6RetType) {
*arg = &val
}
type CreateNicPayloadGetIpv6ArgType = string
type CreateNicPayloadGetIpv6RetType = string
/*
types and functions for labels
*/
// isFreeform
type CreateNicPayloadGetLabelsAttributeType = *map[string]interface{}
type CreateNicPayloadGetLabelsArgType = map[string]interface{}
type CreateNicPayloadGetLabelsRetType = map[string]interface{}
func getCreateNicPayloadGetLabelsAttributeTypeOk(arg CreateNicPayloadGetLabelsAttributeType) (ret CreateNicPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetLabelsAttributeType(arg *CreateNicPayloadGetLabelsAttributeType, val CreateNicPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mac
*/
// isNotNullableString
type CreateNicPayloadGetMacAttributeType = *string
func getCreateNicPayloadGetMacAttributeTypeOk(arg CreateNicPayloadGetMacAttributeType) (ret CreateNicPayloadGetMacRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetMacAttributeType(arg *CreateNicPayloadGetMacAttributeType, val CreateNicPayloadGetMacRetType) {
*arg = &val
}
type CreateNicPayloadGetMacArgType = string
type CreateNicPayloadGetMacRetType = string
/*
types and functions for name
*/
// isNotNullableString
type CreateNicPayloadGetNameAttributeType = *string
func getCreateNicPayloadGetNameAttributeTypeOk(arg CreateNicPayloadGetNameAttributeType) (ret CreateNicPayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetNameAttributeType(arg *CreateNicPayloadGetNameAttributeType, val CreateNicPayloadGetNameRetType) {
*arg = &val
}
type CreateNicPayloadGetNameArgType = string
type CreateNicPayloadGetNameRetType = string
/*
types and functions for networkId
*/
// isNotNullableString
type CreateNicPayloadGetNetworkIdAttributeType = *string
func getCreateNicPayloadGetNetworkIdAttributeTypeOk(arg CreateNicPayloadGetNetworkIdAttributeType) (ret CreateNicPayloadGetNetworkIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetNetworkIdAttributeType(arg *CreateNicPayloadGetNetworkIdAttributeType, val CreateNicPayloadGetNetworkIdRetType) {
*arg = &val
}
type CreateNicPayloadGetNetworkIdArgType = string
type CreateNicPayloadGetNetworkIdRetType = string
/*
types and functions for nicSecurity
*/
// isBoolean
type CreateNicPayloadgetNicSecurityAttributeType = *bool
type CreateNicPayloadgetNicSecurityArgType = bool
type CreateNicPayloadgetNicSecurityRetType = bool
func getCreateNicPayloadgetNicSecurityAttributeTypeOk(arg CreateNicPayloadgetNicSecurityAttributeType) (ret CreateNicPayloadgetNicSecurityRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadgetNicSecurityAttributeType(arg *CreateNicPayloadgetNicSecurityAttributeType, val CreateNicPayloadgetNicSecurityRetType) {
*arg = &val
}
/*
types and functions for securityGroups
*/
// isArray
type CreateNicPayloadGetSecurityGroupsAttributeType = *[]string
type CreateNicPayloadGetSecurityGroupsArgType = []string
type CreateNicPayloadGetSecurityGroupsRetType = []string
func getCreateNicPayloadGetSecurityGroupsAttributeTypeOk(arg CreateNicPayloadGetSecurityGroupsAttributeType) (ret CreateNicPayloadGetSecurityGroupsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetSecurityGroupsAttributeType(arg *CreateNicPayloadGetSecurityGroupsAttributeType, val CreateNicPayloadGetSecurityGroupsRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
type CreateNicPayloadGetStatusAttributeType = *string
func getCreateNicPayloadGetStatusAttributeTypeOk(arg CreateNicPayloadGetStatusAttributeType) (ret CreateNicPayloadGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetStatusAttributeType(arg *CreateNicPayloadGetStatusAttributeType, val CreateNicPayloadGetStatusRetType) {
*arg = &val
}
type CreateNicPayloadGetStatusArgType = string
type CreateNicPayloadGetStatusRetType = string
/*
types and functions for type
*/
// isNotNullableString
type CreateNicPayloadGetTypeAttributeType = *string
func getCreateNicPayloadGetTypeAttributeTypeOk(arg CreateNicPayloadGetTypeAttributeType) (ret CreateNicPayloadGetTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateNicPayloadGetTypeAttributeType(arg *CreateNicPayloadGetTypeAttributeType, val CreateNicPayloadGetTypeRetType) {
*arg = &val
}
type CreateNicPayloadGetTypeArgType = string
type CreateNicPayloadGetTypeRetType = string
// CreateNicPayload Object that represents a network interface.
type CreateNicPayload struct {
// A list of IPs or CIDR notations.
AllowedAddresses CreateNicPayloadGetAllowedAddressesAttributeType `json:"allowedAddresses,omitempty"`
// Description Object. Allows string up to 255 Characters.
Description CreateNicPayloadGetDescriptionAttributeType `json:"description,omitempty"`
// Universally Unique Identifier (UUID).
Device CreateNicPayloadGetDeviceAttributeType `json:"device,omitempty"`
// Universally Unique Identifier (UUID).
Id CreateNicPayloadGetIdAttributeType `json:"id,omitempty"`
// Object that represents an IP address.
Ipv4 CreateNicPayloadGetIpv4AttributeType `json:"ipv4,omitempty"`
// String that represents an IPv6 address.
Ipv6 CreateNicPayloadGetIpv6AttributeType `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 CreateNicPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// Object that represents an MAC address.
Mac CreateNicPayloadGetMacAttributeType `json:"mac,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
Name CreateNicPayloadGetNameAttributeType `json:"name,omitempty"`
// Universally Unique Identifier (UUID).
NetworkId CreateNicPayloadGetNetworkIdAttributeType `json:"networkId,omitempty"`
// If this is set to false, then no security groups will apply to this network interface.
NicSecurity CreateNicPayloadgetNicSecurityAttributeType `json:"nicSecurity,omitempty"`
// A list of UUIDs.
SecurityGroups CreateNicPayloadGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"`
// Possible values: `ACTIVE`, `DOWN`.
Status CreateNicPayloadGetStatusAttributeType `json:"status,omitempty"`
// Possible values: `server`, `metadata`, `gateway`, `none`.
Type CreateNicPayloadGetTypeAttributeType `json:"type,omitempty"`
}
// NewCreateNicPayload instantiates a new CreateNicPayload 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 NewCreateNicPayload() *CreateNicPayload {
this := CreateNicPayload{}
return &this
}
// NewCreateNicPayloadWithDefaults instantiates a new CreateNicPayload 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 NewCreateNicPayloadWithDefaults() *CreateNicPayload {
this := CreateNicPayload{}
var nicSecurity bool = true
this.NicSecurity = &nicSecurity
return &this
}
// GetAllowedAddresses returns the AllowedAddresses field value if set, zero value otherwise.
func (o *CreateNicPayload) GetAllowedAddresses() (res CreateNicPayloadGetAllowedAddressesRetType) {
res, _ = o.GetAllowedAddressesOk()
return
}
// GetAllowedAddressesOk returns a tuple with the AllowedAddresses field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNicPayload) GetAllowedAddressesOk() (ret CreateNicPayloadGetAllowedAddressesRetType, ok bool) {
return getCreateNicPayloadGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses)
}
// HasAllowedAddresses returns a boolean if a field has been set.
func (o *CreateNicPayload) HasAllowedAddresses() bool {
_, ok := o.GetAllowedAddressesOk()
return ok
}
// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field.
func (o *CreateNicPayload) SetAllowedAddresses(v CreateNicPayloadGetAllowedAddressesRetType) {
setCreateNicPayloadGetAllowedAddressesAttributeType(&o.AllowedAddresses, v)
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *CreateNicPayload) GetDescription() (res CreateNicPayloadGetDescriptionRetType) {
res, _ = o.GetDescriptionOk()
return
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNicPayload) GetDescriptionOk() (ret CreateNicPayloadGetDescriptionRetType, ok bool) {
return getCreateNicPayloadGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *CreateNicPayload) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CreateNicPayload) SetDescription(v CreateNicPayloadGetDescriptionRetType) {
setCreateNicPayloadGetDescriptionAttributeType(&o.Description, v)
}
// GetDevice returns the Device field value if set, zero value otherwise.
func (o *CreateNicPayload) GetDevice() (res CreateNicPayloadGetDeviceRetType) {
res, _ = o.GetDeviceOk()
return
}
// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNicPayload) GetDeviceOk() (ret CreateNicPayloadGetDeviceRetType, ok bool) {
return getCreateNicPayloadGetDeviceAttributeTypeOk(o.Device)
}
// HasDevice returns a boolean if a field has been set.
func (o *CreateNicPayload) HasDevice() bool {
_, ok := o.GetDeviceOk()
return ok
}
// SetDevice gets a reference to the given string and assigns it to the Device field.
func (o *CreateNicPayload) SetDevice(v CreateNicPayloadGetDeviceRetType) {
setCreateNicPayloadGetDeviceAttributeType(&o.Device, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CreateNicPayload) GetId() (res CreateNicPayloadGetIdRetType) {
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 *CreateNicPayload) GetIdOk() (ret CreateNicPayloadGetIdRetType, ok bool) {
return getCreateNicPayloadGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *CreateNicPayload) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *CreateNicPayload) SetId(v CreateNicPayloadGetIdRetType) {
setCreateNicPayloadGetIdAttributeType(&o.Id, v)
}
// GetIpv4 returns the Ipv4 field value if set, zero value otherwise.
func (o *CreateNicPayload) GetIpv4() (res CreateNicPayloadGetIpv4RetType) {
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 *CreateNicPayload) GetIpv4Ok() (ret CreateNicPayloadGetIpv4RetType, ok bool) {
return getCreateNicPayloadGetIpv4AttributeTypeOk(o.Ipv4)
}
// HasIpv4 returns a boolean if a field has been set.
func (o *CreateNicPayload) HasIpv4() bool {
_, ok := o.GetIpv4Ok()
return ok
}
// SetIpv4 gets a reference to the given string and assigns it to the Ipv4 field.
func (o *CreateNicPayload) SetIpv4(v CreateNicPayloadGetIpv4RetType) {
setCreateNicPayloadGetIpv4AttributeType(&o.Ipv4, v)
}
// GetIpv6 returns the Ipv6 field value if set, zero value otherwise.
func (o *CreateNicPayload) GetIpv6() (res CreateNicPayloadGetIpv6RetType) {
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 *CreateNicPayload) GetIpv6Ok() (ret CreateNicPayloadGetIpv6RetType, ok bool) {
return getCreateNicPayloadGetIpv6AttributeTypeOk(o.Ipv6)
}
// HasIpv6 returns a boolean if a field has been set.
func (o *CreateNicPayload) HasIpv6() bool {
_, ok := o.GetIpv6Ok()
return ok
}
// SetIpv6 gets a reference to the given string and assigns it to the Ipv6 field.
func (o *CreateNicPayload) SetIpv6(v CreateNicPayloadGetIpv6RetType) {
setCreateNicPayloadGetIpv6AttributeType(&o.Ipv6, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateNicPayload) GetLabels() (res CreateNicPayloadGetLabelsRetType) {
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 *CreateNicPayload) GetLabelsOk() (ret CreateNicPayloadGetLabelsRetType, ok bool) {
return getCreateNicPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateNicPayload) 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 *CreateNicPayload) SetLabels(v CreateNicPayloadGetLabelsRetType) {
setCreateNicPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetMac returns the Mac field value if set, zero value otherwise.
func (o *CreateNicPayload) GetMac() (res CreateNicPayloadGetMacRetType) {
res, _ = o.GetMacOk()
return
}
// GetMacOk returns a tuple with the Mac field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNicPayload) GetMacOk() (ret CreateNicPayloadGetMacRetType, ok bool) {
return getCreateNicPayloadGetMacAttributeTypeOk(o.Mac)
}
// HasMac returns a boolean if a field has been set.
func (o *CreateNicPayload) HasMac() bool {
_, ok := o.GetMacOk()
return ok
}
// SetMac gets a reference to the given string and assigns it to the Mac field.
func (o *CreateNicPayload) SetMac(v CreateNicPayloadGetMacRetType) {
setCreateNicPayloadGetMacAttributeType(&o.Mac, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateNicPayload) GetName() (res CreateNicPayloadGetNameRetType) {
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 *CreateNicPayload) GetNameOk() (ret CreateNicPayloadGetNameRetType, ok bool) {
return getCreateNicPayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateNicPayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateNicPayload) SetName(v CreateNicPayloadGetNameRetType) {
setCreateNicPayloadGetNameAttributeType(&o.Name, v)
}
// GetNetworkId returns the NetworkId field value if set, zero value otherwise.
func (o *CreateNicPayload) GetNetworkId() (res CreateNicPayloadGetNetworkIdRetType) {
res, _ = o.GetNetworkIdOk()
return
}
// GetNetworkIdOk returns a tuple with the NetworkId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNicPayload) GetNetworkIdOk() (ret CreateNicPayloadGetNetworkIdRetType, ok bool) {
return getCreateNicPayloadGetNetworkIdAttributeTypeOk(o.NetworkId)
}
// HasNetworkId returns a boolean if a field has been set.
func (o *CreateNicPayload) HasNetworkId() bool {
_, ok := o.GetNetworkIdOk()
return ok
}
// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field.
func (o *CreateNicPayload) SetNetworkId(v CreateNicPayloadGetNetworkIdRetType) {
setCreateNicPayloadGetNetworkIdAttributeType(&o.NetworkId, v)
}
// GetNicSecurity returns the NicSecurity field value if set, zero value otherwise.
func (o *CreateNicPayload) GetNicSecurity() (res CreateNicPayloadgetNicSecurityRetType) {
res, _ = o.GetNicSecurityOk()
return
}
// GetNicSecurityOk returns a tuple with the NicSecurity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNicPayload) GetNicSecurityOk() (ret CreateNicPayloadgetNicSecurityRetType, ok bool) {
return getCreateNicPayloadgetNicSecurityAttributeTypeOk(o.NicSecurity)
}
// HasNicSecurity returns a boolean if a field has been set.
func (o *CreateNicPayload) HasNicSecurity() bool {
_, ok := o.GetNicSecurityOk()
return ok
}
// SetNicSecurity gets a reference to the given bool and assigns it to the NicSecurity field.
func (o *CreateNicPayload) SetNicSecurity(v CreateNicPayloadgetNicSecurityRetType) {
setCreateNicPayloadgetNicSecurityAttributeType(&o.NicSecurity, v)
}
// GetSecurityGroups returns the SecurityGroups field value if set, zero value otherwise.
func (o *CreateNicPayload) GetSecurityGroups() (res CreateNicPayloadGetSecurityGroupsRetType) {
res, _ = o.GetSecurityGroupsOk()
return
}
// GetSecurityGroupsOk returns a tuple with the SecurityGroups field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNicPayload) GetSecurityGroupsOk() (ret CreateNicPayloadGetSecurityGroupsRetType, ok bool) {
return getCreateNicPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups)
}
// HasSecurityGroups returns a boolean if a field has been set.
func (o *CreateNicPayload) HasSecurityGroups() bool {
_, ok := o.GetSecurityGroupsOk()
return ok
}
// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field.
func (o *CreateNicPayload) SetSecurityGroups(v CreateNicPayloadGetSecurityGroupsRetType) {
setCreateNicPayloadGetSecurityGroupsAttributeType(&o.SecurityGroups, v)
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *CreateNicPayload) GetStatus() (res CreateNicPayloadGetStatusRetType) {
res, _ = o.GetStatusOk()
return
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNicPayload) GetStatusOk() (ret CreateNicPayloadGetStatusRetType, ok bool) {
return getCreateNicPayloadGetStatusAttributeTypeOk(o.Status)
}
// HasStatus returns a boolean if a field has been set.
func (o *CreateNicPayload) HasStatus() bool {
_, ok := o.GetStatusOk()
return ok
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *CreateNicPayload) SetStatus(v CreateNicPayloadGetStatusRetType) {
setCreateNicPayloadGetStatusAttributeType(&o.Status, v)
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *CreateNicPayload) GetType() (res CreateNicPayloadGetTypeRetType) {
res, _ = o.GetTypeOk()
return
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateNicPayload) GetTypeOk() (ret CreateNicPayloadGetTypeRetType, ok bool) {
return getCreateNicPayloadGetTypeAttributeTypeOk(o.Type)
}
// HasType returns a boolean if a field has been set.
func (o *CreateNicPayload) HasType() bool {
_, ok := o.GetTypeOk()
return ok
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *CreateNicPayload) SetType(v CreateNicPayloadGetTypeRetType) {
setCreateNicPayloadGetTypeAttributeType(&o.Type, v)
}
func (o CreateNicPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateNicPayloadGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses); ok {
toSerialize["AllowedAddresses"] = val
}
if val, ok := getCreateNicPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getCreateNicPayloadGetDeviceAttributeTypeOk(o.Device); ok {
toSerialize["Device"] = val
}
if val, ok := getCreateNicPayloadGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getCreateNicPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok {
toSerialize["Ipv4"] = val
}
if val, ok := getCreateNicPayloadGetIpv6AttributeTypeOk(o.Ipv6); ok {
toSerialize["Ipv6"] = val
}
if val, ok := getCreateNicPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateNicPayloadGetMacAttributeTypeOk(o.Mac); ok {
toSerialize["Mac"] = val
}
if val, ok := getCreateNicPayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateNicPayloadGetNetworkIdAttributeTypeOk(o.NetworkId); ok {
toSerialize["NetworkId"] = val
}
if val, ok := getCreateNicPayloadgetNicSecurityAttributeTypeOk(o.NicSecurity); ok {
toSerialize["NicSecurity"] = val
}
if val, ok := getCreateNicPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok {
toSerialize["SecurityGroups"] = val
}
if val, ok := getCreateNicPayloadGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getCreateNicPayloadGetTypeAttributeTypeOk(o.Type); ok {
toSerialize["Type"] = val
}
return toSerialize, nil
}
type NullableCreateNicPayload struct {
value *CreateNicPayload
isSet bool
}
func (v NullableCreateNicPayload) Get() *CreateNicPayload {
return v.value
}
func (v *NullableCreateNicPayload) Set(val *CreateNicPayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateNicPayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateNicPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateNicPayload(val *CreateNicPayload) *NullableCreateNicPayload {
return &NullableCreateNicPayload{value: val, isSet: true}
}
func (v NullableCreateNicPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateNicPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}