370 lines
13 KiB
Go
370 lines
13 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 UpdateNicPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &UpdateNicPayload{}
|
|
|
|
/*
|
|
types and functions for allowedAddresses
|
|
*/
|
|
|
|
// isArray
|
|
type UpdateNicPayloadGetAllowedAddressesAttributeType = *[]AllowedAddressesInner
|
|
type UpdateNicPayloadGetAllowedAddressesArgType = []AllowedAddressesInner
|
|
type UpdateNicPayloadGetAllowedAddressesRetType = []AllowedAddressesInner
|
|
|
|
func getUpdateNicPayloadGetAllowedAddressesAttributeTypeOk(arg UpdateNicPayloadGetAllowedAddressesAttributeType) (ret UpdateNicPayloadGetAllowedAddressesRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateNicPayloadGetAllowedAddressesAttributeType(arg *UpdateNicPayloadGetAllowedAddressesAttributeType, val UpdateNicPayloadGetAllowedAddressesRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for description
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type UpdateNicPayloadGetDescriptionAttributeType = *string
|
|
|
|
func getUpdateNicPayloadGetDescriptionAttributeTypeOk(arg UpdateNicPayloadGetDescriptionAttributeType) (ret UpdateNicPayloadGetDescriptionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateNicPayloadGetDescriptionAttributeType(arg *UpdateNicPayloadGetDescriptionAttributeType, val UpdateNicPayloadGetDescriptionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type UpdateNicPayloadGetDescriptionArgType = string
|
|
type UpdateNicPayloadGetDescriptionRetType = string
|
|
|
|
/*
|
|
types and functions for labels
|
|
*/
|
|
|
|
// isFreeform
|
|
type UpdateNicPayloadGetLabelsAttributeType = *map[string]interface{}
|
|
type UpdateNicPayloadGetLabelsArgType = map[string]interface{}
|
|
type UpdateNicPayloadGetLabelsRetType = map[string]interface{}
|
|
|
|
func getUpdateNicPayloadGetLabelsAttributeTypeOk(arg UpdateNicPayloadGetLabelsAttributeType) (ret UpdateNicPayloadGetLabelsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateNicPayloadGetLabelsAttributeType(arg *UpdateNicPayloadGetLabelsAttributeType, val UpdateNicPayloadGetLabelsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type UpdateNicPayloadGetNameAttributeType = *string
|
|
|
|
func getUpdateNicPayloadGetNameAttributeTypeOk(arg UpdateNicPayloadGetNameAttributeType) (ret UpdateNicPayloadGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateNicPayloadGetNameAttributeType(arg *UpdateNicPayloadGetNameAttributeType, val UpdateNicPayloadGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type UpdateNicPayloadGetNameArgType = string
|
|
type UpdateNicPayloadGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for nicSecurity
|
|
*/
|
|
|
|
// isBoolean
|
|
type UpdateNicPayloadgetNicSecurityAttributeType = *bool
|
|
type UpdateNicPayloadgetNicSecurityArgType = bool
|
|
type UpdateNicPayloadgetNicSecurityRetType = bool
|
|
|
|
func getUpdateNicPayloadgetNicSecurityAttributeTypeOk(arg UpdateNicPayloadgetNicSecurityAttributeType) (ret UpdateNicPayloadgetNicSecurityRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateNicPayloadgetNicSecurityAttributeType(arg *UpdateNicPayloadgetNicSecurityAttributeType, val UpdateNicPayloadgetNicSecurityRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for securityGroups
|
|
*/
|
|
|
|
// isArray
|
|
type UpdateNicPayloadGetSecurityGroupsAttributeType = *[]string
|
|
type UpdateNicPayloadGetSecurityGroupsArgType = []string
|
|
type UpdateNicPayloadGetSecurityGroupsRetType = []string
|
|
|
|
func getUpdateNicPayloadGetSecurityGroupsAttributeTypeOk(arg UpdateNicPayloadGetSecurityGroupsAttributeType) (ret UpdateNicPayloadGetSecurityGroupsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateNicPayloadGetSecurityGroupsAttributeType(arg *UpdateNicPayloadGetSecurityGroupsAttributeType, val UpdateNicPayloadGetSecurityGroupsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// UpdateNicPayload Object that represents a network interface update.
|
|
type UpdateNicPayload struct {
|
|
// A list of IPs or CIDR notations.
|
|
AllowedAddresses UpdateNicPayloadGetAllowedAddressesAttributeType `json:"allowedAddresses,omitempty"`
|
|
// Description Object. Allows string up to 255 Characters.
|
|
Description UpdateNicPayloadGetDescriptionAttributeType `json:"description,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 UpdateNicPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
|
// The name for a General Object. Matches Names and also UUIDs.
|
|
Name UpdateNicPayloadGetNameAttributeType `json:"name,omitempty"`
|
|
// If this is set to false, then no security groups will apply to this network interface.
|
|
NicSecurity UpdateNicPayloadgetNicSecurityAttributeType `json:"nicSecurity,omitempty"`
|
|
// A list of UUIDs.
|
|
SecurityGroups UpdateNicPayloadGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"`
|
|
}
|
|
|
|
// NewUpdateNicPayload instantiates a new UpdateNicPayload 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 NewUpdateNicPayload() *UpdateNicPayload {
|
|
this := UpdateNicPayload{}
|
|
return &this
|
|
}
|
|
|
|
// NewUpdateNicPayloadWithDefaults instantiates a new UpdateNicPayload 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 NewUpdateNicPayloadWithDefaults() *UpdateNicPayload {
|
|
this := UpdateNicPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetAllowedAddresses returns the AllowedAddresses field value if set, zero value otherwise.
|
|
func (o *UpdateNicPayload) GetAllowedAddresses() (res UpdateNicPayloadGetAllowedAddressesRetType) {
|
|
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 *UpdateNicPayload) GetAllowedAddressesOk() (ret UpdateNicPayloadGetAllowedAddressesRetType, ok bool) {
|
|
return getUpdateNicPayloadGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses)
|
|
}
|
|
|
|
// HasAllowedAddresses returns a boolean if a field has been set.
|
|
func (o *UpdateNicPayload) HasAllowedAddresses() bool {
|
|
_, ok := o.GetAllowedAddressesOk()
|
|
return ok
|
|
}
|
|
|
|
// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field.
|
|
func (o *UpdateNicPayload) SetAllowedAddresses(v UpdateNicPayloadGetAllowedAddressesRetType) {
|
|
setUpdateNicPayloadGetAllowedAddressesAttributeType(&o.AllowedAddresses, v)
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *UpdateNicPayload) GetDescription() (res UpdateNicPayloadGetDescriptionRetType) {
|
|
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 *UpdateNicPayload) GetDescriptionOk() (ret UpdateNicPayloadGetDescriptionRetType, ok bool) {
|
|
return getUpdateNicPayloadGetDescriptionAttributeTypeOk(o.Description)
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *UpdateNicPayload) HasDescription() bool {
|
|
_, ok := o.GetDescriptionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *UpdateNicPayload) SetDescription(v UpdateNicPayloadGetDescriptionRetType) {
|
|
setUpdateNicPayloadGetDescriptionAttributeType(&o.Description, v)
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
|
func (o *UpdateNicPayload) GetLabels() (res UpdateNicPayloadGetLabelsRetType) {
|
|
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 *UpdateNicPayload) GetLabelsOk() (ret UpdateNicPayloadGetLabelsRetType, ok bool) {
|
|
return getUpdateNicPayloadGetLabelsAttributeTypeOk(o.Labels)
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *UpdateNicPayload) 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 *UpdateNicPayload) SetLabels(v UpdateNicPayloadGetLabelsRetType) {
|
|
setUpdateNicPayloadGetLabelsAttributeType(&o.Labels, v)
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *UpdateNicPayload) GetName() (res UpdateNicPayloadGetNameRetType) {
|
|
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 *UpdateNicPayload) GetNameOk() (ret UpdateNicPayloadGetNameRetType, ok bool) {
|
|
return getUpdateNicPayloadGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *UpdateNicPayload) HasName() bool {
|
|
_, ok := o.GetNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *UpdateNicPayload) SetName(v UpdateNicPayloadGetNameRetType) {
|
|
setUpdateNicPayloadGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetNicSecurity returns the NicSecurity field value if set, zero value otherwise.
|
|
func (o *UpdateNicPayload) GetNicSecurity() (res UpdateNicPayloadgetNicSecurityRetType) {
|
|
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 *UpdateNicPayload) GetNicSecurityOk() (ret UpdateNicPayloadgetNicSecurityRetType, ok bool) {
|
|
return getUpdateNicPayloadgetNicSecurityAttributeTypeOk(o.NicSecurity)
|
|
}
|
|
|
|
// HasNicSecurity returns a boolean if a field has been set.
|
|
func (o *UpdateNicPayload) HasNicSecurity() bool {
|
|
_, ok := o.GetNicSecurityOk()
|
|
return ok
|
|
}
|
|
|
|
// SetNicSecurity gets a reference to the given bool and assigns it to the NicSecurity field.
|
|
func (o *UpdateNicPayload) SetNicSecurity(v UpdateNicPayloadgetNicSecurityRetType) {
|
|
setUpdateNicPayloadgetNicSecurityAttributeType(&o.NicSecurity, v)
|
|
}
|
|
|
|
// GetSecurityGroups returns the SecurityGroups field value if set, zero value otherwise.
|
|
func (o *UpdateNicPayload) GetSecurityGroups() (res UpdateNicPayloadGetSecurityGroupsRetType) {
|
|
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 *UpdateNicPayload) GetSecurityGroupsOk() (ret UpdateNicPayloadGetSecurityGroupsRetType, ok bool) {
|
|
return getUpdateNicPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups)
|
|
}
|
|
|
|
// HasSecurityGroups returns a boolean if a field has been set.
|
|
func (o *UpdateNicPayload) HasSecurityGroups() bool {
|
|
_, ok := o.GetSecurityGroupsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field.
|
|
func (o *UpdateNicPayload) SetSecurityGroups(v UpdateNicPayloadGetSecurityGroupsRetType) {
|
|
setUpdateNicPayloadGetSecurityGroupsAttributeType(&o.SecurityGroups, v)
|
|
}
|
|
|
|
func (o UpdateNicPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getUpdateNicPayloadGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses); ok {
|
|
toSerialize["AllowedAddresses"] = val
|
|
}
|
|
if val, ok := getUpdateNicPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
|
|
toSerialize["Description"] = val
|
|
}
|
|
if val, ok := getUpdateNicPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
|
toSerialize["Labels"] = val
|
|
}
|
|
if val, ok := getUpdateNicPayloadGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getUpdateNicPayloadgetNicSecurityAttributeTypeOk(o.NicSecurity); ok {
|
|
toSerialize["NicSecurity"] = val
|
|
}
|
|
if val, ok := getUpdateNicPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok {
|
|
toSerialize["SecurityGroups"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableUpdateNicPayload struct {
|
|
value *UpdateNicPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableUpdateNicPayload) Get() *UpdateNicPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableUpdateNicPayload) Set(val *UpdateNicPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableUpdateNicPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableUpdateNicPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableUpdateNicPayload(val *UpdateNicPayload) *NullableUpdateNicPayload {
|
|
return &NullableUpdateNicPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableUpdateNicPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableUpdateNicPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|