diff --git a/services/iaasalpha/model_add_volume_to_server_payload.go b/services/iaasalpha/model_add_volume_to_server_payload.go index d6c9629a9..1e8743892 100644 --- a/services/iaasalpha/model_add_volume_to_server_payload.go +++ b/services/iaasalpha/model_add_volume_to_server_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the AddVolumeToServerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddVolumeToServerPayload{} + // AddVolumeToServerPayload Object that represents a Volume attachment to a server. type AddVolumeToServerPayload struct { // Delete the volume during the termination of the server. Defaults to false. @@ -19,3 +26,170 @@ type AddVolumeToServerPayload struct { // Universally Unique Identifier (UUID). VolumeId *string `json:"volumeId,omitempty"` } + +// NewAddVolumeToServerPayload instantiates a new AddVolumeToServerPayload 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 NewAddVolumeToServerPayload() *AddVolumeToServerPayload { + this := AddVolumeToServerPayload{} + var deleteOnTermination bool = false + this.DeleteOnTermination = &deleteOnTermination + return &this +} + +// NewAddVolumeToServerPayloadWithDefaults instantiates a new AddVolumeToServerPayload 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 NewAddVolumeToServerPayloadWithDefaults() *AddVolumeToServerPayload { + this := AddVolumeToServerPayload{} + var deleteOnTermination bool = false + this.DeleteOnTermination = &deleteOnTermination + return &this +} + +// GetDeleteOnTermination returns the DeleteOnTermination field value if set, zero value otherwise. +func (o *AddVolumeToServerPayload) GetDeleteOnTermination() *bool { + if o == nil || IsNil(o.DeleteOnTermination) { + var ret *bool + return ret + } + return o.DeleteOnTermination +} + +// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddVolumeToServerPayload) GetDeleteOnTerminationOk() (*bool, bool) { + if o == nil || IsNil(o.DeleteOnTermination) { + return nil, false + } + return o.DeleteOnTermination, true +} + +// HasDeleteOnTermination returns a boolean if a field has been set. +func (o *AddVolumeToServerPayload) HasDeleteOnTermination() bool { + if o != nil && !IsNil(o.DeleteOnTermination) { + return true + } + + return false +} + +// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field. +func (o *AddVolumeToServerPayload) SetDeleteOnTermination(v *bool) { + o.DeleteOnTermination = v +} + +// GetServerId returns the ServerId field value if set, zero value otherwise. +func (o *AddVolumeToServerPayload) GetServerId() *string { + if o == nil || IsNil(o.ServerId) { + var ret *string + return ret + } + return o.ServerId +} + +// GetServerIdOk returns a tuple with the ServerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddVolumeToServerPayload) GetServerIdOk() (*string, bool) { + if o == nil || IsNil(o.ServerId) { + return nil, false + } + return o.ServerId, true +} + +// HasServerId returns a boolean if a field has been set. +func (o *AddVolumeToServerPayload) HasServerId() bool { + if o != nil && !IsNil(o.ServerId) { + return true + } + + return false +} + +// SetServerId gets a reference to the given string and assigns it to the ServerId field. +func (o *AddVolumeToServerPayload) SetServerId(v *string) { + o.ServerId = v +} + +// GetVolumeId returns the VolumeId field value if set, zero value otherwise. +func (o *AddVolumeToServerPayload) GetVolumeId() *string { + if o == nil || IsNil(o.VolumeId) { + var ret *string + return ret + } + return o.VolumeId +} + +// GetVolumeIdOk returns a tuple with the VolumeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddVolumeToServerPayload) GetVolumeIdOk() (*string, bool) { + if o == nil || IsNil(o.VolumeId) { + return nil, false + } + return o.VolumeId, true +} + +// HasVolumeId returns a boolean if a field has been set. +func (o *AddVolumeToServerPayload) HasVolumeId() bool { + if o != nil && !IsNil(o.VolumeId) { + return true + } + + return false +} + +// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field. +func (o *AddVolumeToServerPayload) SetVolumeId(v *string) { + o.VolumeId = v +} + +func (o AddVolumeToServerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DeleteOnTermination) { + toSerialize["deleteOnTermination"] = o.DeleteOnTermination + } + if !IsNil(o.ServerId) { + toSerialize["serverId"] = o.ServerId + } + if !IsNil(o.VolumeId) { + toSerialize["volumeId"] = o.VolumeId + } + return toSerialize, nil +} + +type NullableAddVolumeToServerPayload struct { + value *AddVolumeToServerPayload + isSet bool +} + +func (v NullableAddVolumeToServerPayload) Get() *AddVolumeToServerPayload { + return v.value +} + +func (v *NullableAddVolumeToServerPayload) Set(val *AddVolumeToServerPayload) { + v.value = val + v.isSet = true +} + +func (v NullableAddVolumeToServerPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableAddVolumeToServerPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddVolumeToServerPayload(val *AddVolumeToServerPayload) *NullableAddVolumeToServerPayload { + return &NullableAddVolumeToServerPayload{value: val, isSet: true} +} + +func (v NullableAddVolumeToServerPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddVolumeToServerPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_area.go b/services/iaasalpha/model_area.go index a79ee5f82..5a014f1e3 100644 --- a/services/iaasalpha/model_area.go +++ b/services/iaasalpha/model_area.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the Area type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Area{} + // Area The basic properties of a network area. type Area struct { // A list containing DNS Servers/Nameservers for IPv4. @@ -21,3 +28,201 @@ type Area struct { // Classless Inter-Domain Routing (CIDR). TransferNetwork *string `json:"transferNetwork,omitempty"` } + +// NewArea instantiates a new Area 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 NewArea() *Area { + this := Area{} + return &this +} + +// NewAreaWithDefaults instantiates a new Area 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 NewAreaWithDefaults() *Area { + this := Area{} + return &this +} + +// GetDefaultNameservers returns the DefaultNameservers field value if set, zero value otherwise. +func (o *Area) GetDefaultNameservers() *[]string { + if o == nil || IsNil(o.DefaultNameservers) { + var ret *[]string + return ret + } + return o.DefaultNameservers +} + +// GetDefaultNameserversOk returns a tuple with the DefaultNameservers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Area) GetDefaultNameserversOk() (*[]string, bool) { + if o == nil || IsNil(o.DefaultNameservers) { + return nil, false + } + return o.DefaultNameservers, true +} + +// HasDefaultNameservers returns a boolean if a field has been set. +func (o *Area) HasDefaultNameservers() bool { + if o != nil && !IsNil(o.DefaultNameservers) { + return true + } + + return false +} + +// SetDefaultNameservers gets a reference to the given []string and assigns it to the DefaultNameservers field. +func (o *Area) SetDefaultNameservers(v *[]string) { + o.DefaultNameservers = v +} + +// GetNetworkRanges returns the NetworkRanges field value if set, zero value otherwise. +func (o *Area) GetNetworkRanges() *[]NetworkRange { + if o == nil || IsNil(o.NetworkRanges) { + var ret *[]NetworkRange + return ret + } + return o.NetworkRanges +} + +// GetNetworkRangesOk returns a tuple with the NetworkRanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Area) GetNetworkRangesOk() (*[]NetworkRange, bool) { + if o == nil || IsNil(o.NetworkRanges) { + return nil, false + } + return o.NetworkRanges, true +} + +// HasNetworkRanges returns a boolean if a field has been set. +func (o *Area) HasNetworkRanges() bool { + if o != nil && !IsNil(o.NetworkRanges) { + return true + } + + return false +} + +// SetNetworkRanges gets a reference to the given []NetworkRange and assigns it to the NetworkRanges field. +func (o *Area) SetNetworkRanges(v *[]NetworkRange) { + o.NetworkRanges = v +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *Area) GetRoutes() *[]Route { + if o == nil || IsNil(o.Routes) { + var ret *[]Route + return ret + } + return o.Routes +} + +// GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Area) GetRoutesOk() (*[]Route, bool) { + if o == nil || IsNil(o.Routes) { + return nil, false + } + return o.Routes, true +} + +// HasRoutes returns a boolean if a field has been set. +func (o *Area) HasRoutes() bool { + if o != nil && !IsNil(o.Routes) { + return true + } + + return false +} + +// SetRoutes gets a reference to the given []Route and assigns it to the Routes field. +func (o *Area) SetRoutes(v *[]Route) { + o.Routes = v +} + +// GetTransferNetwork returns the TransferNetwork field value if set, zero value otherwise. +func (o *Area) GetTransferNetwork() *string { + if o == nil || IsNil(o.TransferNetwork) { + var ret *string + return ret + } + return o.TransferNetwork +} + +// GetTransferNetworkOk returns a tuple with the TransferNetwork field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Area) GetTransferNetworkOk() (*string, bool) { + if o == nil || IsNil(o.TransferNetwork) { + return nil, false + } + return o.TransferNetwork, true +} + +// HasTransferNetwork returns a boolean if a field has been set. +func (o *Area) HasTransferNetwork() bool { + if o != nil && !IsNil(o.TransferNetwork) { + return true + } + + return false +} + +// SetTransferNetwork gets a reference to the given string and assigns it to the TransferNetwork field. +func (o *Area) SetTransferNetwork(v *string) { + o.TransferNetwork = v +} + +func (o Area) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultNameservers) { + toSerialize["defaultNameservers"] = o.DefaultNameservers + } + if !IsNil(o.NetworkRanges) { + toSerialize["networkRanges"] = o.NetworkRanges + } + if !IsNil(o.Routes) { + toSerialize["routes"] = o.Routes + } + if !IsNil(o.TransferNetwork) { + toSerialize["transferNetwork"] = o.TransferNetwork + } + return toSerialize, nil +} + +type NullableArea struct { + value *Area + isSet bool +} + +func (v NullableArea) Get() *Area { + return v.value +} + +func (v *NullableArea) Set(val *Area) { + v.value = val + v.isSet = true +} + +func (v NullableArea) IsSet() bool { + return v.isSet +} + +func (v *NullableArea) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArea(val *Area) *NullableArea { + return &NullableArea{value: val, isSet: true} +} + +func (v NullableArea) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArea) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_area_config.go b/services/iaasalpha/model_area_config.go index 1cc534b8f..f905e44b9 100644 --- a/services/iaasalpha/model_area_config.go +++ b/services/iaasalpha/model_area_config.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the AreaConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AreaConfig{} + // AreaConfig The basic network area object. type AreaConfig struct { DefaultNameservers *[]string `json:"defaultNameservers,omitempty"` @@ -22,3 +29,185 @@ type AreaConfig struct { // REQUIRED TransferNetwork *string `json:"transferNetwork"` } + +type _AreaConfig AreaConfig + +// NewAreaConfig instantiates a new AreaConfig 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 NewAreaConfig(networkRanges *[]NetworkRange, transferNetwork *string) *AreaConfig { + this := AreaConfig{} + this.NetworkRanges = networkRanges + this.TransferNetwork = transferNetwork + return &this +} + +// NewAreaConfigWithDefaults instantiates a new AreaConfig 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 NewAreaConfigWithDefaults() *AreaConfig { + this := AreaConfig{} + return &this +} + +// GetDefaultNameservers returns the DefaultNameservers field value if set, zero value otherwise. +func (o *AreaConfig) GetDefaultNameservers() *[]string { + if o == nil || IsNil(o.DefaultNameservers) { + var ret *[]string + return ret + } + return o.DefaultNameservers +} + +// GetDefaultNameserversOk returns a tuple with the DefaultNameservers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AreaConfig) GetDefaultNameserversOk() (*[]string, bool) { + if o == nil || IsNil(o.DefaultNameservers) { + return nil, false + } + return o.DefaultNameservers, true +} + +// HasDefaultNameservers returns a boolean if a field has been set. +func (o *AreaConfig) HasDefaultNameservers() bool { + if o != nil && !IsNil(o.DefaultNameservers) { + return true + } + + return false +} + +// SetDefaultNameservers gets a reference to the given []string and assigns it to the DefaultNameservers field. +func (o *AreaConfig) SetDefaultNameservers(v *[]string) { + o.DefaultNameservers = v +} + +// GetNetworkRanges returns the NetworkRanges field value +func (o *AreaConfig) GetNetworkRanges() *[]NetworkRange { + if o == nil { + var ret *[]NetworkRange + return ret + } + + return o.NetworkRanges +} + +// GetNetworkRangesOk returns a tuple with the NetworkRanges field value +// and a boolean to check if the value has been set. +func (o *AreaConfig) GetNetworkRangesOk() (*[]NetworkRange, bool) { + if o == nil { + return nil, false + } + return o.NetworkRanges, true +} + +// SetNetworkRanges sets field value +func (o *AreaConfig) SetNetworkRanges(v *[]NetworkRange) { + o.NetworkRanges = v +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *AreaConfig) GetRoutes() *[]Route { + if o == nil || IsNil(o.Routes) { + var ret *[]Route + return ret + } + return o.Routes +} + +// GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AreaConfig) GetRoutesOk() (*[]Route, bool) { + if o == nil || IsNil(o.Routes) { + return nil, false + } + return o.Routes, true +} + +// HasRoutes returns a boolean if a field has been set. +func (o *AreaConfig) HasRoutes() bool { + if o != nil && !IsNil(o.Routes) { + return true + } + + return false +} + +// SetRoutes gets a reference to the given []Route and assigns it to the Routes field. +func (o *AreaConfig) SetRoutes(v *[]Route) { + o.Routes = v +} + +// GetTransferNetwork returns the TransferNetwork field value +func (o *AreaConfig) GetTransferNetwork() *string { + if o == nil { + var ret *string + return ret + } + + return o.TransferNetwork +} + +// GetTransferNetworkOk returns a tuple with the TransferNetwork field value +// and a boolean to check if the value has been set. +func (o *AreaConfig) GetTransferNetworkOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TransferNetwork, true +} + +// SetTransferNetwork sets field value +func (o *AreaConfig) SetTransferNetwork(v *string) { + o.TransferNetwork = v +} + +func (o AreaConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultNameservers) { + toSerialize["defaultNameservers"] = o.DefaultNameservers + } + toSerialize["networkRanges"] = o.NetworkRanges + if !IsNil(o.Routes) { + toSerialize["routes"] = o.Routes + } + toSerialize["transferNetwork"] = o.TransferNetwork + return toSerialize, nil +} + +type NullableAreaConfig struct { + value *AreaConfig + isSet bool +} + +func (v NullableAreaConfig) Get() *AreaConfig { + return v.value +} + +func (v *NullableAreaConfig) Set(val *AreaConfig) { + v.value = val + v.isSet = true +} + +func (v NullableAreaConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableAreaConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAreaConfig(val *AreaConfig) *NullableAreaConfig { + return &NullableAreaConfig{value: val, isSet: true} +} + +func (v NullableAreaConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAreaConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_area_prefix_config_ipv4.go b/services/iaasalpha/model_area_prefix_config_ipv4.go index dd80d2548..641e394cf 100644 --- a/services/iaasalpha/model_area_prefix_config_ipv4.go +++ b/services/iaasalpha/model_area_prefix_config_ipv4.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the AreaPrefixConfigIPv4 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AreaPrefixConfigIPv4{} + // AreaPrefixConfigIPv4 The IPv4 prefix config for a network area. type AreaPrefixConfigIPv4 struct { // The default prefix length for networks in the network area. @@ -19,3 +26,178 @@ type AreaPrefixConfigIPv4 struct { // The minimal prefix length for networks in the network area. MinPrefixLen *int64 `json:"minPrefixLen,omitempty"` } + +// NewAreaPrefixConfigIPv4 instantiates a new AreaPrefixConfigIPv4 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 NewAreaPrefixConfigIPv4() *AreaPrefixConfigIPv4 { + this := AreaPrefixConfigIPv4{} + var defaultPrefixLen int64 = 25 + this.DefaultPrefixLen = &defaultPrefixLen + var maxPrefixLen int64 = 29 + this.MaxPrefixLen = &maxPrefixLen + var minPrefixLen int64 = 24 + this.MinPrefixLen = &minPrefixLen + return &this +} + +// NewAreaPrefixConfigIPv4WithDefaults instantiates a new AreaPrefixConfigIPv4 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 NewAreaPrefixConfigIPv4WithDefaults() *AreaPrefixConfigIPv4 { + this := AreaPrefixConfigIPv4{} + var defaultPrefixLen int64 = 25 + this.DefaultPrefixLen = &defaultPrefixLen + var maxPrefixLen int64 = 29 + this.MaxPrefixLen = &maxPrefixLen + var minPrefixLen int64 = 24 + this.MinPrefixLen = &minPrefixLen + return &this +} + +// GetDefaultPrefixLen returns the DefaultPrefixLen field value if set, zero value otherwise. +func (o *AreaPrefixConfigIPv4) GetDefaultPrefixLen() *int64 { + if o == nil || IsNil(o.DefaultPrefixLen) { + var ret *int64 + return ret + } + return o.DefaultPrefixLen +} + +// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AreaPrefixConfigIPv4) GetDefaultPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.DefaultPrefixLen) { + return nil, false + } + return o.DefaultPrefixLen, true +} + +// HasDefaultPrefixLen returns a boolean if a field has been set. +func (o *AreaPrefixConfigIPv4) HasDefaultPrefixLen() bool { + if o != nil && !IsNil(o.DefaultPrefixLen) { + return true + } + + return false +} + +// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. +func (o *AreaPrefixConfigIPv4) SetDefaultPrefixLen(v *int64) { + o.DefaultPrefixLen = v +} + +// GetMaxPrefixLen returns the MaxPrefixLen field value if set, zero value otherwise. +func (o *AreaPrefixConfigIPv4) GetMaxPrefixLen() *int64 { + if o == nil || IsNil(o.MaxPrefixLen) { + var ret *int64 + return ret + } + return o.MaxPrefixLen +} + +// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AreaPrefixConfigIPv4) GetMaxPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.MaxPrefixLen) { + return nil, false + } + return o.MaxPrefixLen, true +} + +// HasMaxPrefixLen returns a boolean if a field has been set. +func (o *AreaPrefixConfigIPv4) HasMaxPrefixLen() bool { + if o != nil && !IsNil(o.MaxPrefixLen) { + return true + } + + return false +} + +// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. +func (o *AreaPrefixConfigIPv4) SetMaxPrefixLen(v *int64) { + o.MaxPrefixLen = v +} + +// GetMinPrefixLen returns the MinPrefixLen field value if set, zero value otherwise. +func (o *AreaPrefixConfigIPv4) GetMinPrefixLen() *int64 { + if o == nil || IsNil(o.MinPrefixLen) { + var ret *int64 + return ret + } + return o.MinPrefixLen +} + +// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AreaPrefixConfigIPv4) GetMinPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.MinPrefixLen) { + return nil, false + } + return o.MinPrefixLen, true +} + +// HasMinPrefixLen returns a boolean if a field has been set. +func (o *AreaPrefixConfigIPv4) HasMinPrefixLen() bool { + if o != nil && !IsNil(o.MinPrefixLen) { + return true + } + + return false +} + +// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. +func (o *AreaPrefixConfigIPv4) SetMinPrefixLen(v *int64) { + o.MinPrefixLen = v +} + +func (o AreaPrefixConfigIPv4) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultPrefixLen) { + toSerialize["defaultPrefixLen"] = o.DefaultPrefixLen + } + if !IsNil(o.MaxPrefixLen) { + toSerialize["maxPrefixLen"] = o.MaxPrefixLen + } + if !IsNil(o.MinPrefixLen) { + toSerialize["minPrefixLen"] = o.MinPrefixLen + } + return toSerialize, nil +} + +type NullableAreaPrefixConfigIPv4 struct { + value *AreaPrefixConfigIPv4 + isSet bool +} + +func (v NullableAreaPrefixConfigIPv4) Get() *AreaPrefixConfigIPv4 { + return v.value +} + +func (v *NullableAreaPrefixConfigIPv4) Set(val *AreaPrefixConfigIPv4) { + v.value = val + v.isSet = true +} + +func (v NullableAreaPrefixConfigIPv4) IsSet() bool { + return v.isSet +} + +func (v *NullableAreaPrefixConfigIPv4) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAreaPrefixConfigIPv4(val *AreaPrefixConfigIPv4) *NullableAreaPrefixConfigIPv4 { + return &NullableAreaPrefixConfigIPv4{value: val, isSet: true} +} + +func (v NullableAreaPrefixConfigIPv4) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAreaPrefixConfigIPv4) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_boot_volume.go b/services/iaasalpha/model_boot_volume.go index 18c1f8340..8d557707c 100644 --- a/services/iaasalpha/model_boot_volume.go +++ b/services/iaasalpha/model_boot_volume.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the BootVolume type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BootVolume{} + // BootVolume The boot device for the server. type BootVolume struct { // Delete the volume during the termination of the server. Defaults to false. @@ -22,3 +29,240 @@ type BootVolume struct { Size *int64 `json:"size,omitempty"` Source *BootVolumeSource `json:"source,omitempty"` } + +// NewBootVolume instantiates a new BootVolume 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 NewBootVolume() *BootVolume { + this := BootVolume{} + var deleteOnTermination bool = false + this.DeleteOnTermination = &deleteOnTermination + return &this +} + +// NewBootVolumeWithDefaults instantiates a new BootVolume 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 NewBootVolumeWithDefaults() *BootVolume { + this := BootVolume{} + var deleteOnTermination bool = false + this.DeleteOnTermination = &deleteOnTermination + return &this +} + +// GetDeleteOnTermination returns the DeleteOnTermination field value if set, zero value otherwise. +func (o *BootVolume) GetDeleteOnTermination() *bool { + if o == nil || IsNil(o.DeleteOnTermination) { + var ret *bool + return ret + } + return o.DeleteOnTermination +} + +// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BootVolume) GetDeleteOnTerminationOk() (*bool, bool) { + if o == nil || IsNil(o.DeleteOnTermination) { + return nil, false + } + return o.DeleteOnTermination, true +} + +// HasDeleteOnTermination returns a boolean if a field has been set. +func (o *BootVolume) HasDeleteOnTermination() bool { + if o != nil && !IsNil(o.DeleteOnTermination) { + return true + } + + return false +} + +// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field. +func (o *BootVolume) SetDeleteOnTermination(v *bool) { + o.DeleteOnTermination = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *BootVolume) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *BootVolume) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *BootVolume) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *BootVolume) SetId(v *string) { + o.Id = v +} + +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +func (o *BootVolume) GetPerformanceClass() *string { + if o == nil || IsNil(o.PerformanceClass) { + var ret *string + return ret + } + return o.PerformanceClass +} + +// GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BootVolume) GetPerformanceClassOk() (*string, bool) { + if o == nil || IsNil(o.PerformanceClass) { + return nil, false + } + return o.PerformanceClass, true +} + +// HasPerformanceClass returns a boolean if a field has been set. +func (o *BootVolume) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false +} + +// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. +func (o *BootVolume) SetPerformanceClass(v *string) { + o.PerformanceClass = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *BootVolume) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BootVolume) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *BootVolume) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *BootVolume) SetSize(v *int64) { + o.Size = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *BootVolume) GetSource() *BootVolumeSource { + if o == nil || IsNil(o.Source) { + var ret *BootVolumeSource + return ret + } + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BootVolume) GetSourceOk() (*BootVolumeSource, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *BootVolume) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given BootVolumeSource and assigns it to the Source field. +func (o *BootVolume) SetSource(v *BootVolumeSource) { + o.Source = v +} + +func (o BootVolume) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DeleteOnTermination) { + toSerialize["deleteOnTermination"] = o.DeleteOnTermination + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + return toSerialize, nil +} + +type NullableBootVolume struct { + value *BootVolume + isSet bool +} + +func (v NullableBootVolume) Get() *BootVolume { + return v.value +} + +func (v *NullableBootVolume) Set(val *BootVolume) { + v.value = val + v.isSet = true +} + +func (v NullableBootVolume) IsSet() bool { + return v.isSet +} + +func (v *NullableBootVolume) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBootVolume(val *BootVolume) *NullableBootVolume { + return &NullableBootVolume{value: val, isSet: true} +} + +func (v NullableBootVolume) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBootVolume) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_boot_volume_source.go b/services/iaasalpha/model_boot_volume_source.go index 29c52c81f..c163b12fa 100644 --- a/services/iaasalpha/model_boot_volume_source.go +++ b/services/iaasalpha/model_boot_volume_source.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the BootVolumeSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BootVolumeSource{} + // BootVolumeSource struct for BootVolumeSource type BootVolumeSource struct { // Universally Unique Identifier (UUID). @@ -19,3 +26,115 @@ type BootVolumeSource struct { // REQUIRED Type *string `json:"type"` } + +type _BootVolumeSource BootVolumeSource + +// NewBootVolumeSource instantiates a new BootVolumeSource 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 NewBootVolumeSource(id *string, type_ *string) *BootVolumeSource { + this := BootVolumeSource{} + this.Id = id + this.Type = type_ + return &this +} + +// NewBootVolumeSourceWithDefaults instantiates a new BootVolumeSource 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 NewBootVolumeSourceWithDefaults() *BootVolumeSource { + this := BootVolumeSource{} + return &this +} + +// GetId returns the Id field value +func (o *BootVolumeSource) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *BootVolumeSource) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *BootVolumeSource) SetId(v *string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *BootVolumeSource) GetType() *string { + if o == nil { + var ret *string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *BootVolumeSource) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type, true +} + +// SetType sets field value +func (o *BootVolumeSource) SetType(v *string) { + o.Type = v +} + +func (o BootVolumeSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableBootVolumeSource struct { + value *BootVolumeSource + isSet bool +} + +func (v NullableBootVolumeSource) Get() *BootVolumeSource { + return v.value +} + +func (v *NullableBootVolumeSource) Set(val *BootVolumeSource) { + v.value = val + v.isSet = true +} + +func (v NullableBootVolumeSource) IsSet() bool { + return v.isSet +} + +func (v *NullableBootVolumeSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBootVolumeSource(val *BootVolumeSource) *NullableBootVolumeSource { + return &NullableBootVolumeSource{value: val, isSet: true} +} + +func (v NullableBootVolumeSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBootVolumeSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_area_address_family.go b/services/iaasalpha/model_create_area_address_family.go index 852ff3b95..95a0ec077 100644 --- a/services/iaasalpha/model_create_area_address_family.go +++ b/services/iaasalpha/model_create_area_address_family.go @@ -10,7 +10,107 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the CreateAreaAddressFamily type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateAreaAddressFamily{} + // CreateAreaAddressFamily The addressFamily object for a area create request. type CreateAreaAddressFamily struct { Ipv4 *CreateAreaIPv4 `json:"ipv4,omitempty"` } + +// NewCreateAreaAddressFamily instantiates a new CreateAreaAddressFamily 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 NewCreateAreaAddressFamily() *CreateAreaAddressFamily { + this := CreateAreaAddressFamily{} + return &this +} + +// NewCreateAreaAddressFamilyWithDefaults instantiates a new CreateAreaAddressFamily 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 NewCreateAreaAddressFamilyWithDefaults() *CreateAreaAddressFamily { + this := CreateAreaAddressFamily{} + return &this +} + +// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. +func (o *CreateAreaAddressFamily) GetIpv4() *CreateAreaIPv4 { + if o == nil || IsNil(o.Ipv4) { + var ret *CreateAreaIPv4 + return ret + } + return o.Ipv4 +} + +// 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 *CreateAreaAddressFamily) GetIpv4Ok() (*CreateAreaIPv4, bool) { + if o == nil || IsNil(o.Ipv4) { + return nil, false + } + return o.Ipv4, true +} + +// HasIpv4 returns a boolean if a field has been set. +func (o *CreateAreaAddressFamily) HasIpv4() bool { + if o != nil && !IsNil(o.Ipv4) { + return true + } + + return false +} + +// SetIpv4 gets a reference to the given CreateAreaIPv4 and assigns it to the Ipv4 field. +func (o *CreateAreaAddressFamily) SetIpv4(v *CreateAreaIPv4) { + o.Ipv4 = v +} + +func (o CreateAreaAddressFamily) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ipv4) { + toSerialize["ipv4"] = o.Ipv4 + } + return toSerialize, nil +} + +type NullableCreateAreaAddressFamily struct { + value *CreateAreaAddressFamily + isSet bool +} + +func (v NullableCreateAreaAddressFamily) Get() *CreateAreaAddressFamily { + return v.value +} + +func (v *NullableCreateAreaAddressFamily) Set(val *CreateAreaAddressFamily) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAreaAddressFamily) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAreaAddressFamily) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAreaAddressFamily(val *CreateAreaAddressFamily) *NullableCreateAreaAddressFamily { + return &NullableCreateAreaAddressFamily{value: val, isSet: true} +} + +func (v NullableCreateAreaAddressFamily) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAreaAddressFamily) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_area_ipv4.go b/services/iaasalpha/model_create_area_ipv4.go index 669cb2140..e206d5fe1 100644 --- a/services/iaasalpha/model_create_area_ipv4.go +++ b/services/iaasalpha/model_create_area_ipv4.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the CreateAreaIPv4 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateAreaIPv4{} + // CreateAreaIPv4 The config object for a IPv4 network area. type CreateAreaIPv4 struct { DefaultNameservers *[]string `json:"defaultNameservers,omitempty"` @@ -28,3 +35,302 @@ type CreateAreaIPv4 struct { // The minimal prefix length for networks in the network area. MinPrefixLen *int64 `json:"minPrefixLen,omitempty"` } + +type _CreateAreaIPv4 CreateAreaIPv4 + +// NewCreateAreaIPv4 instantiates a new CreateAreaIPv4 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 NewCreateAreaIPv4(networkRanges *[]NetworkRange, transferNetwork *string) *CreateAreaIPv4 { + this := CreateAreaIPv4{} + this.NetworkRanges = networkRanges + this.TransferNetwork = transferNetwork + var defaultPrefixLen int64 = 25 + this.DefaultPrefixLen = &defaultPrefixLen + var maxPrefixLen int64 = 29 + this.MaxPrefixLen = &maxPrefixLen + var minPrefixLen int64 = 24 + this.MinPrefixLen = &minPrefixLen + return &this +} + +// NewCreateAreaIPv4WithDefaults instantiates a new CreateAreaIPv4 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 NewCreateAreaIPv4WithDefaults() *CreateAreaIPv4 { + this := CreateAreaIPv4{} + var defaultPrefixLen int64 = 25 + this.DefaultPrefixLen = &defaultPrefixLen + var maxPrefixLen int64 = 29 + this.MaxPrefixLen = &maxPrefixLen + var minPrefixLen int64 = 24 + this.MinPrefixLen = &minPrefixLen + return &this +} + +// GetDefaultNameservers returns the DefaultNameservers field value if set, zero value otherwise. +func (o *CreateAreaIPv4) GetDefaultNameservers() *[]string { + if o == nil || IsNil(o.DefaultNameservers) { + var ret *[]string + return ret + } + return o.DefaultNameservers +} + +// GetDefaultNameserversOk returns a tuple with the DefaultNameservers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAreaIPv4) GetDefaultNameserversOk() (*[]string, bool) { + if o == nil || IsNil(o.DefaultNameservers) { + return nil, false + } + return o.DefaultNameservers, true +} + +// HasDefaultNameservers returns a boolean if a field has been set. +func (o *CreateAreaIPv4) HasDefaultNameservers() bool { + if o != nil && !IsNil(o.DefaultNameservers) { + return true + } + + return false +} + +// SetDefaultNameservers gets a reference to the given []string and assigns it to the DefaultNameservers field. +func (o *CreateAreaIPv4) SetDefaultNameservers(v *[]string) { + o.DefaultNameservers = v +} + +// GetNetworkRanges returns the NetworkRanges field value +func (o *CreateAreaIPv4) GetNetworkRanges() *[]NetworkRange { + if o == nil { + var ret *[]NetworkRange + return ret + } + + return o.NetworkRanges +} + +// GetNetworkRangesOk returns a tuple with the NetworkRanges field value +// and a boolean to check if the value has been set. +func (o *CreateAreaIPv4) GetNetworkRangesOk() (*[]NetworkRange, bool) { + if o == nil { + return nil, false + } + return o.NetworkRanges, true +} + +// SetNetworkRanges sets field value +func (o *CreateAreaIPv4) SetNetworkRanges(v *[]NetworkRange) { + o.NetworkRanges = v +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *CreateAreaIPv4) GetRoutes() *[]Route { + if o == nil || IsNil(o.Routes) { + var ret *[]Route + return ret + } + return o.Routes +} + +// GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAreaIPv4) GetRoutesOk() (*[]Route, bool) { + if o == nil || IsNil(o.Routes) { + return nil, false + } + return o.Routes, true +} + +// HasRoutes returns a boolean if a field has been set. +func (o *CreateAreaIPv4) HasRoutes() bool { + if o != nil && !IsNil(o.Routes) { + return true + } + + return false +} + +// SetRoutes gets a reference to the given []Route and assigns it to the Routes field. +func (o *CreateAreaIPv4) SetRoutes(v *[]Route) { + o.Routes = v +} + +// GetTransferNetwork returns the TransferNetwork field value +func (o *CreateAreaIPv4) GetTransferNetwork() *string { + if o == nil { + var ret *string + return ret + } + + return o.TransferNetwork +} + +// GetTransferNetworkOk returns a tuple with the TransferNetwork field value +// and a boolean to check if the value has been set. +func (o *CreateAreaIPv4) GetTransferNetworkOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TransferNetwork, true +} + +// SetTransferNetwork sets field value +func (o *CreateAreaIPv4) SetTransferNetwork(v *string) { + o.TransferNetwork = v +} + +// GetDefaultPrefixLen returns the DefaultPrefixLen field value if set, zero value otherwise. +func (o *CreateAreaIPv4) GetDefaultPrefixLen() *int64 { + if o == nil || IsNil(o.DefaultPrefixLen) { + var ret *int64 + return ret + } + return o.DefaultPrefixLen +} + +// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAreaIPv4) GetDefaultPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.DefaultPrefixLen) { + return nil, false + } + return o.DefaultPrefixLen, true +} + +// HasDefaultPrefixLen returns a boolean if a field has been set. +func (o *CreateAreaIPv4) HasDefaultPrefixLen() bool { + if o != nil && !IsNil(o.DefaultPrefixLen) { + return true + } + + return false +} + +// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. +func (o *CreateAreaIPv4) SetDefaultPrefixLen(v *int64) { + o.DefaultPrefixLen = v +} + +// GetMaxPrefixLen returns the MaxPrefixLen field value if set, zero value otherwise. +func (o *CreateAreaIPv4) GetMaxPrefixLen() *int64 { + if o == nil || IsNil(o.MaxPrefixLen) { + var ret *int64 + return ret + } + return o.MaxPrefixLen +} + +// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAreaIPv4) GetMaxPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.MaxPrefixLen) { + return nil, false + } + return o.MaxPrefixLen, true +} + +// HasMaxPrefixLen returns a boolean if a field has been set. +func (o *CreateAreaIPv4) HasMaxPrefixLen() bool { + if o != nil && !IsNil(o.MaxPrefixLen) { + return true + } + + return false +} + +// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. +func (o *CreateAreaIPv4) SetMaxPrefixLen(v *int64) { + o.MaxPrefixLen = v +} + +// GetMinPrefixLen returns the MinPrefixLen field value if set, zero value otherwise. +func (o *CreateAreaIPv4) GetMinPrefixLen() *int64 { + if o == nil || IsNil(o.MinPrefixLen) { + var ret *int64 + return ret + } + return o.MinPrefixLen +} + +// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAreaIPv4) GetMinPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.MinPrefixLen) { + return nil, false + } + return o.MinPrefixLen, true +} + +// HasMinPrefixLen returns a boolean if a field has been set. +func (o *CreateAreaIPv4) HasMinPrefixLen() bool { + if o != nil && !IsNil(o.MinPrefixLen) { + return true + } + + return false +} + +// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. +func (o *CreateAreaIPv4) SetMinPrefixLen(v *int64) { + o.MinPrefixLen = v +} + +func (o CreateAreaIPv4) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultNameservers) { + toSerialize["defaultNameservers"] = o.DefaultNameservers + } + toSerialize["networkRanges"] = o.NetworkRanges + if !IsNil(o.Routes) { + toSerialize["routes"] = o.Routes + } + toSerialize["transferNetwork"] = o.TransferNetwork + if !IsNil(o.DefaultPrefixLen) { + toSerialize["defaultPrefixLen"] = o.DefaultPrefixLen + } + if !IsNil(o.MaxPrefixLen) { + toSerialize["maxPrefixLen"] = o.MaxPrefixLen + } + if !IsNil(o.MinPrefixLen) { + toSerialize["minPrefixLen"] = o.MinPrefixLen + } + return toSerialize, nil +} + +type NullableCreateAreaIPv4 struct { + value *CreateAreaIPv4 + isSet bool +} + +func (v NullableCreateAreaIPv4) Get() *CreateAreaIPv4 { + return v.value +} + +func (v *NullableCreateAreaIPv4) Set(val *CreateAreaIPv4) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAreaIPv4) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAreaIPv4) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAreaIPv4(val *CreateAreaIPv4) *NullableCreateAreaIPv4 { + return &NullableCreateAreaIPv4{value: val, isSet: true} +} + +func (v NullableCreateAreaIPv4) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAreaIPv4) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_key_pair_payload.go b/services/iaasalpha/model_create_key_pair_payload.go index 9810a9a50..952cb38a8 100644 --- a/services/iaasalpha/model_create_key_pair_payload.go +++ b/services/iaasalpha/model_create_key_pair_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the CreateKeyPairPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateKeyPairPayload{} + // CreateKeyPairPayload Object that represents the public key of an SSH keypair and its name. type CreateKeyPairPayload struct { // Object that represents an SSH keypair MD5 fingerprint. @@ -22,3 +29,194 @@ type CreateKeyPairPayload struct { // REQUIRED PublicKey *string `json:"publicKey"` } + +type _CreateKeyPairPayload CreateKeyPairPayload + +// NewCreateKeyPairPayload instantiates a new CreateKeyPairPayload 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 NewCreateKeyPairPayload(publicKey *string) *CreateKeyPairPayload { + this := CreateKeyPairPayload{} + this.PublicKey = publicKey + return &this +} + +// NewCreateKeyPairPayloadWithDefaults instantiates a new CreateKeyPairPayload 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 NewCreateKeyPairPayloadWithDefaults() *CreateKeyPairPayload { + this := CreateKeyPairPayload{} + return &this +} + +// GetFingerprint returns the Fingerprint field value if set, zero value otherwise. +func (o *CreateKeyPairPayload) GetFingerprint() *string { + if o == nil || IsNil(o.Fingerprint) { + var ret *string + return ret + } + return o.Fingerprint +} + +// GetFingerprintOk returns a tuple with the Fingerprint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateKeyPairPayload) GetFingerprintOk() (*string, bool) { + if o == nil || IsNil(o.Fingerprint) { + return nil, false + } + return o.Fingerprint, true +} + +// HasFingerprint returns a boolean if a field has been set. +func (o *CreateKeyPairPayload) HasFingerprint() bool { + if o != nil && !IsNil(o.Fingerprint) { + return true + } + + return false +} + +// SetFingerprint gets a reference to the given string and assigns it to the Fingerprint field. +func (o *CreateKeyPairPayload) SetFingerprint(v *string) { + o.Fingerprint = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateKeyPairPayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *CreateKeyPairPayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateKeyPairPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *CreateKeyPairPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateKeyPairPayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *CreateKeyPairPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateKeyPairPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateKeyPairPayload) SetName(v *string) { + o.Name = v +} + +// GetPublicKey returns the PublicKey field value +func (o *CreateKeyPairPayload) GetPublicKey() *string { + if o == nil { + var ret *string + return ret + } + + return o.PublicKey +} + +// GetPublicKeyOk returns a tuple with the PublicKey field value +// and a boolean to check if the value has been set. +func (o *CreateKeyPairPayload) GetPublicKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PublicKey, true +} + +// SetPublicKey sets field value +func (o *CreateKeyPairPayload) SetPublicKey(v *string) { + o.PublicKey = v +} + +func (o CreateKeyPairPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Fingerprint) { + toSerialize["fingerprint"] = o.Fingerprint + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["publicKey"] = o.PublicKey + return toSerialize, nil +} + +type NullableCreateKeyPairPayload struct { + value *CreateKeyPairPayload + isSet bool +} + +func (v NullableCreateKeyPairPayload) Get() *CreateKeyPairPayload { + return v.value +} + +func (v *NullableCreateKeyPairPayload) Set(val *CreateKeyPairPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateKeyPairPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateKeyPairPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateKeyPairPayload(val *CreateKeyPairPayload) *NullableCreateKeyPairPayload { + return &NullableCreateKeyPairPayload{value: val, isSet: true} +} + +func (v NullableCreateKeyPairPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateKeyPairPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_nic_payload.go b/services/iaasalpha/model_create_nic_payload.go index 53c38d42e..6c33e34d9 100644 --- a/services/iaasalpha/model_create_nic_payload.go +++ b/services/iaasalpha/model_create_nic_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the CreateNICPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNICPayload{} + // CreateNICPayload Object that represents a network interface. type CreateNICPayload struct { // A list of IPs or CIDR notations. @@ -37,3 +44,520 @@ type CreateNICPayload struct { Status *string `json:"status,omitempty"` Type *string `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{} + var nicSecurity bool = true + this.NicSecurity = &nicSecurity + 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() *[]AllowedAddressesInner { + if o == nil || IsNil(o.AllowedAddresses) { + var ret *[]AllowedAddressesInner + return ret + } + return o.AllowedAddresses +} + +// 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() (*[]AllowedAddressesInner, bool) { + if o == nil || IsNil(o.AllowedAddresses) { + return nil, false + } + return o.AllowedAddresses, true +} + +// HasAllowedAddresses returns a boolean if a field has been set. +func (o *CreateNICPayload) HasAllowedAddresses() bool { + if o != nil && !IsNil(o.AllowedAddresses) { + return true + } + + return false +} + +// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field. +func (o *CreateNICPayload) SetAllowedAddresses(v *[]AllowedAddressesInner) { + o.AllowedAddresses = v +} + +// GetDevice returns the Device field value if set, zero value otherwise. +func (o *CreateNICPayload) GetDevice() *string { + if o == nil || IsNil(o.Device) { + var ret *string + return ret + } + return o.Device +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Device) { + return nil, false + } + return o.Device, true +} + +// HasDevice returns a boolean if a field has been set. +func (o *CreateNICPayload) HasDevice() bool { + if o != nil && !IsNil(o.Device) { + return true + } + + return false +} + +// SetDevice gets a reference to the given string and assigns it to the Device field. +func (o *CreateNICPayload) SetDevice(v *string) { + o.Device = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateNICPayload) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateNICPayload) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateNICPayload) SetId(v *string) { + o.Id = v +} + +// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. +func (o *CreateNICPayload) GetIpv4() *string { + if o == nil || IsNil(o.Ipv4) { + var ret *string + return ret + } + return o.Ipv4 +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Ipv4) { + return nil, false + } + return o.Ipv4, true +} + +// HasIpv4 returns a boolean if a field has been set. +func (o *CreateNICPayload) HasIpv4() bool { + if o != nil && !IsNil(o.Ipv4) { + return true + } + + return false +} + +// SetIpv4 gets a reference to the given string and assigns it to the Ipv4 field. +func (o *CreateNICPayload) SetIpv4(v *string) { + o.Ipv4 = v +} + +// GetIpv6 returns the Ipv6 field value if set, zero value otherwise. +func (o *CreateNICPayload) GetIpv6() *string { + if o == nil || IsNil(o.Ipv6) { + var ret *string + return ret + } + return o.Ipv6 +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Ipv6) { + return nil, false + } + return o.Ipv6, true +} + +// HasIpv6 returns a boolean if a field has been set. +func (o *CreateNICPayload) HasIpv6() bool { + if o != nil && !IsNil(o.Ipv6) { + return true + } + + return false +} + +// SetIpv6 gets a reference to the given string and assigns it to the Ipv6 field. +func (o *CreateNICPayload) SetIpv6(v *string) { + o.Ipv6 = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateNICPayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateNICPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *CreateNICPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetMac returns the Mac field value if set, zero value otherwise. +func (o *CreateNICPayload) GetMac() *string { + if o == nil || IsNil(o.Mac) { + var ret *string + return ret + } + return o.Mac +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Mac) { + return nil, false + } + return o.Mac, true +} + +// HasMac returns a boolean if a field has been set. +func (o *CreateNICPayload) HasMac() bool { + if o != nil && !IsNil(o.Mac) { + return true + } + + return false +} + +// SetMac gets a reference to the given string and assigns it to the Mac field. +func (o *CreateNICPayload) SetMac(v *string) { + o.Mac = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateNICPayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateNICPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateNICPayload) SetName(v *string) { + o.Name = v +} + +// GetNetworkId returns the NetworkId field value if set, zero value otherwise. +func (o *CreateNICPayload) GetNetworkId() *string { + if o == nil || IsNil(o.NetworkId) { + var ret *string + return ret + } + return o.NetworkId +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.NetworkId) { + return nil, false + } + return o.NetworkId, true +} + +// HasNetworkId returns a boolean if a field has been set. +func (o *CreateNICPayload) HasNetworkId() bool { + if o != nil && !IsNil(o.NetworkId) { + return true + } + + return false +} + +// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. +func (o *CreateNICPayload) SetNetworkId(v *string) { + o.NetworkId = v +} + +// GetNicSecurity returns the NicSecurity field value if set, zero value otherwise. +func (o *CreateNICPayload) GetNicSecurity() *bool { + if o == nil || IsNil(o.NicSecurity) { + var ret *bool + return ret + } + return o.NicSecurity +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.NicSecurity) { + return nil, false + } + return o.NicSecurity, true +} + +// HasNicSecurity returns a boolean if a field has been set. +func (o *CreateNICPayload) HasNicSecurity() bool { + if o != nil && !IsNil(o.NicSecurity) { + return true + } + + return false +} + +// SetNicSecurity gets a reference to the given bool and assigns it to the NicSecurity field. +func (o *CreateNICPayload) SetNicSecurity(v *bool) { + o.NicSecurity = v +} + +// GetSecurityGroups returns the SecurityGroups field value if set, zero value otherwise. +func (o *CreateNICPayload) GetSecurityGroups() *[]string { + if o == nil || IsNil(o.SecurityGroups) { + var ret *[]string + return ret + } + return o.SecurityGroups +} + +// 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() (*[]string, bool) { + if o == nil || IsNil(o.SecurityGroups) { + return nil, false + } + return o.SecurityGroups, true +} + +// HasSecurityGroups returns a boolean if a field has been set. +func (o *CreateNICPayload) HasSecurityGroups() bool { + if o != nil && !IsNil(o.SecurityGroups) { + return true + } + + return false +} + +// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. +func (o *CreateNICPayload) SetSecurityGroups(v *[]string) { + o.SecurityGroups = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateNICPayload) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CreateNICPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CreateNICPayload) SetStatus(v *string) { + o.Status = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CreateNICPayload) GetType() *string { + if o == nil || IsNil(o.Type) { + var ret *string + return ret + } + return o.Type +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CreateNICPayload) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CreateNICPayload) SetType(v *string) { + o.Type = v +} + +func (o CreateNICPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowedAddresses) { + toSerialize["allowedAddresses"] = o.AllowedAddresses + } + if !IsNil(o.Device) { + toSerialize["device"] = o.Device + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Ipv4) { + toSerialize["ipv4"] = o.Ipv4 + } + if !IsNil(o.Ipv6) { + toSerialize["ipv6"] = o.Ipv6 + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Mac) { + toSerialize["mac"] = o.Mac + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.NetworkId) { + toSerialize["networkId"] = o.NetworkId + } + if !IsNil(o.NicSecurity) { + toSerialize["nicSecurity"] = o.NicSecurity + } + if !IsNil(o.SecurityGroups) { + toSerialize["securityGroups"] = o.SecurityGroups + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + 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) +} diff --git a/services/iaasalpha/model_create_public_ip_payload.go b/services/iaasalpha/model_create_public_ip_payload.go index ad2281a5b..df0c594dc 100644 --- a/services/iaasalpha/model_create_public_ip_payload.go +++ b/services/iaasalpha/model_create_public_ip_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the CreatePublicIPPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatePublicIPPayload{} + // CreatePublicIPPayload Object that represents a public IP. type CreatePublicIPPayload struct { // Universally Unique Identifier (UUID). @@ -18,4 +25,215 @@ type CreatePublicIPPayload struct { Ip *string `json:"ip,omitempty"` // Object that represents the labels of an object. Labels *map[string]interface{} `json:"labels,omitempty"` + // Universally Unique Identifier (UUID). + NetworkInterface *NullableString `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() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreatePublicIPPayload) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreatePublicIPPayload) SetId(v *string) { + o.Id = v +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *CreatePublicIPPayload) GetIp() *string { + if o == nil || IsNil(o.Ip) { + var ret *string + return ret + } + return o.Ip +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *CreatePublicIPPayload) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given string and assigns it to the Ip field. +func (o *CreatePublicIPPayload) SetIp(v *string) { + o.Ip = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreatePublicIPPayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreatePublicIPPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *CreatePublicIPPayload) SetLabels(v *map[string]interface{}) { + 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() *string { + if o == nil || IsNil(o.NetworkInterface.Get()) { + var ret *string + return ret + } + return o.NetworkInterface.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.NetworkInterface.Get(), o.NetworkInterface.IsSet() +} + +// HasNetworkInterface returns a boolean if a field has been set. +func (o *CreatePublicIPPayload) HasNetworkInterface() bool { + if o != nil && o.NetworkInterface.IsSet() { + return true + } + + return false +} + +// SetNetworkInterface gets a reference to the given string and assigns it to the NetworkInterface field. +func (o *CreatePublicIPPayload) SetNetworkInterface(v *string) { + o.NetworkInterface.Set(v) +} + +// SetNetworkInterfaceNil sets the value for NetworkInterface to be an explicit nil +func (o *CreatePublicIPPayload) SetNetworkInterfaceNil() { + o.NetworkInterface.Set(nil) +} + +// UnsetNetworkInterface ensures that no value is present for NetworkInterface, not even an explicit nil +func (o *CreatePublicIPPayload) UnsetNetworkInterface() { + o.NetworkInterface.Unset() +} + +func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if o.NetworkInterface.IsSet() { + toSerialize["networkInterface"] = o.NetworkInterface.Get() + } + 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) } diff --git a/services/iaasalpha/model_create_security_group_payload.go b/services/iaasalpha/model_create_security_group_payload.go index f20a641ed..cca8cfa47 100644 --- a/services/iaasalpha/model_create_security_group_payload.go +++ b/services/iaasalpha/model_create_security_group_payload.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the CreateSecurityGroupPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateSecurityGroupPayload{} + // CreateSecurityGroupPayload Object that represents a security group. type CreateSecurityGroupPayload struct { // Date-time when resource was created. @@ -34,3 +38,338 @@ type CreateSecurityGroupPayload struct { // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` } + +type _CreateSecurityGroupPayload CreateSecurityGroupPayload + +// NewCreateSecurityGroupPayload instantiates a new CreateSecurityGroupPayload 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 NewCreateSecurityGroupPayload(name *string) *CreateSecurityGroupPayload { + this := CreateSecurityGroupPayload{} + this.Name = name + var stateful bool = true + this.Stateful = &stateful + return &this +} + +// NewCreateSecurityGroupPayloadWithDefaults instantiates a new CreateSecurityGroupPayload 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 NewCreateSecurityGroupPayloadWithDefaults() *CreateSecurityGroupPayload { + this := CreateSecurityGroupPayload{} + var stateful bool = true + this.Stateful = &stateful + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CreateSecurityGroupPayload) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CreateSecurityGroupPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CreateSecurityGroupPayload) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateSecurityGroupPayload) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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 *CreateSecurityGroupPayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateSecurityGroupPayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateSecurityGroupPayload) SetDescription(v *string) { + o.Description = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateSecurityGroupPayload) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *CreateSecurityGroupPayload) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateSecurityGroupPayload) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateSecurityGroupPayload) SetId(v *string) { + o.Id = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateSecurityGroupPayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *CreateSecurityGroupPayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateSecurityGroupPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *CreateSecurityGroupPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *CreateSecurityGroupPayload) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateSecurityGroupPayload) SetName(v *string) { + o.Name = v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *CreateSecurityGroupPayload) GetRules() *[]SecurityGroupRule { + if o == nil || IsNil(o.Rules) { + var ret *[]SecurityGroupRule + return ret + } + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupPayload) GetRulesOk() (*[]SecurityGroupRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *CreateSecurityGroupPayload) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []SecurityGroupRule and assigns it to the Rules field. +func (o *CreateSecurityGroupPayload) SetRules(v *[]SecurityGroupRule) { + o.Rules = v +} + +// GetStateful returns the Stateful field value if set, zero value otherwise. +func (o *CreateSecurityGroupPayload) GetStateful() *bool { + if o == nil || IsNil(o.Stateful) { + var ret *bool + return ret + } + return o.Stateful +} + +// GetStatefulOk returns a tuple with the Stateful field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupPayload) GetStatefulOk() (*bool, bool) { + if o == nil || IsNil(o.Stateful) { + return nil, false + } + return o.Stateful, true +} + +// HasStateful returns a boolean if a field has been set. +func (o *CreateSecurityGroupPayload) HasStateful() bool { + if o != nil && !IsNil(o.Stateful) { + return true + } + + return false +} + +// SetStateful gets a reference to the given bool and assigns it to the Stateful field. +func (o *CreateSecurityGroupPayload) SetStateful(v *bool) { + o.Stateful = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CreateSecurityGroupPayload) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CreateSecurityGroupPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CreateSecurityGroupPayload) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +func (o CreateSecurityGroupPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + if !IsNil(o.Rules) { + toSerialize["rules"] = o.Rules + } + if !IsNil(o.Stateful) { + toSerialize["stateful"] = o.Stateful + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableCreateSecurityGroupPayload struct { + value *CreateSecurityGroupPayload + isSet bool +} + +func (v NullableCreateSecurityGroupPayload) Get() *CreateSecurityGroupPayload { + return v.value +} + +func (v *NullableCreateSecurityGroupPayload) Set(val *CreateSecurityGroupPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateSecurityGroupPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateSecurityGroupPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateSecurityGroupPayload(val *CreateSecurityGroupPayload) *NullableCreateSecurityGroupPayload { + return &NullableCreateSecurityGroupPayload{value: val, isSet: true} +} + +func (v NullableCreateSecurityGroupPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateSecurityGroupPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_security_group_rule_payload.go b/services/iaasalpha/model_create_security_group_rule_payload.go index 1565d3d5b..17029e992 100644 --- a/services/iaasalpha/model_create_security_group_rule_payload.go +++ b/services/iaasalpha/model_create_security_group_rule_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the CreateSecurityGroupRulePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateSecurityGroupRulePayload{} + // CreateSecurityGroupRulePayload Object that represents a security group rule. type CreateSecurityGroupRulePayload struct { // Description Object. Allows string up to 127 Characters. @@ -31,3 +38,408 @@ type CreateSecurityGroupRulePayload struct { // Universally Unique Identifier (UUID). SecurityGroupId *string `json:"securityGroupId,omitempty"` } + +type _CreateSecurityGroupRulePayload CreateSecurityGroupRulePayload + +// NewCreateSecurityGroupRulePayload instantiates a new CreateSecurityGroupRulePayload 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 NewCreateSecurityGroupRulePayload(direction *string) *CreateSecurityGroupRulePayload { + this := CreateSecurityGroupRulePayload{} + this.Direction = direction + var ethertype string = "IPv4" + this.Ethertype = ðertype + return &this +} + +// NewCreateSecurityGroupRulePayloadWithDefaults instantiates a new CreateSecurityGroupRulePayload 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 NewCreateSecurityGroupRulePayloadWithDefaults() *CreateSecurityGroupRulePayload { + this := CreateSecurityGroupRulePayload{} + var ethertype string = "IPv4" + this.Ethertype = ðertype + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateSecurityGroupRulePayload) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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 *CreateSecurityGroupRulePayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateSecurityGroupRulePayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateSecurityGroupRulePayload) SetDescription(v *string) { + o.Description = v +} + +// GetDirection returns the Direction field value +func (o *CreateSecurityGroupRulePayload) GetDirection() *string { + if o == nil { + var ret *string + return ret + } + + return o.Direction +} + +// GetDirectionOk returns a tuple with the Direction field value +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupRulePayload) GetDirectionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Direction, true +} + +// SetDirection sets field value +func (o *CreateSecurityGroupRulePayload) SetDirection(v *string) { + o.Direction = v +} + +// GetEthertype returns the Ethertype field value if set, zero value otherwise. +func (o *CreateSecurityGroupRulePayload) GetEthertype() *string { + if o == nil || IsNil(o.Ethertype) { + var ret *string + return ret + } + return o.Ethertype +} + +// GetEthertypeOk returns a tuple with the Ethertype field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupRulePayload) GetEthertypeOk() (*string, bool) { + if o == nil || IsNil(o.Ethertype) { + return nil, false + } + return o.Ethertype, true +} + +// HasEthertype returns a boolean if a field has been set. +func (o *CreateSecurityGroupRulePayload) HasEthertype() bool { + if o != nil && !IsNil(o.Ethertype) { + return true + } + + return false +} + +// SetEthertype gets a reference to the given string and assigns it to the Ethertype field. +func (o *CreateSecurityGroupRulePayload) SetEthertype(v *string) { + o.Ethertype = v +} + +// GetIcmpParameters returns the IcmpParameters field value if set, zero value otherwise. +func (o *CreateSecurityGroupRulePayload) GetIcmpParameters() *ICMPParameters { + if o == nil || IsNil(o.IcmpParameters) { + var ret *ICMPParameters + return ret + } + return o.IcmpParameters +} + +// GetIcmpParametersOk returns a tuple with the IcmpParameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupRulePayload) GetIcmpParametersOk() (*ICMPParameters, bool) { + if o == nil || IsNil(o.IcmpParameters) { + return nil, false + } + return o.IcmpParameters, true +} + +// HasIcmpParameters returns a boolean if a field has been set. +func (o *CreateSecurityGroupRulePayload) HasIcmpParameters() bool { + if o != nil && !IsNil(o.IcmpParameters) { + return true + } + + return false +} + +// SetIcmpParameters gets a reference to the given ICMPParameters and assigns it to the IcmpParameters field. +func (o *CreateSecurityGroupRulePayload) SetIcmpParameters(v *ICMPParameters) { + o.IcmpParameters = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateSecurityGroupRulePayload) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *CreateSecurityGroupRulePayload) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateSecurityGroupRulePayload) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateSecurityGroupRulePayload) SetId(v *string) { + o.Id = v +} + +// GetIpRange returns the IpRange field value if set, zero value otherwise. +func (o *CreateSecurityGroupRulePayload) GetIpRange() *string { + if o == nil || IsNil(o.IpRange) { + var ret *string + return ret + } + return o.IpRange +} + +// GetIpRangeOk returns a tuple with the IpRange field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupRulePayload) GetIpRangeOk() (*string, bool) { + if o == nil || IsNil(o.IpRange) { + return nil, false + } + return o.IpRange, true +} + +// HasIpRange returns a boolean if a field has been set. +func (o *CreateSecurityGroupRulePayload) HasIpRange() bool { + if o != nil && !IsNil(o.IpRange) { + return true + } + + return false +} + +// SetIpRange gets a reference to the given string and assigns it to the IpRange field. +func (o *CreateSecurityGroupRulePayload) SetIpRange(v *string) { + o.IpRange = v +} + +// GetPortRange returns the PortRange field value if set, zero value otherwise. +func (o *CreateSecurityGroupRulePayload) GetPortRange() *PortRange { + if o == nil || IsNil(o.PortRange) { + var ret *PortRange + return ret + } + return o.PortRange +} + +// GetPortRangeOk returns a tuple with the PortRange field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupRulePayload) GetPortRangeOk() (*PortRange, bool) { + if o == nil || IsNil(o.PortRange) { + return nil, false + } + return o.PortRange, true +} + +// HasPortRange returns a boolean if a field has been set. +func (o *CreateSecurityGroupRulePayload) HasPortRange() bool { + if o != nil && !IsNil(o.PortRange) { + return true + } + + return false +} + +// SetPortRange gets a reference to the given PortRange and assigns it to the PortRange field. +func (o *CreateSecurityGroupRulePayload) SetPortRange(v *PortRange) { + o.PortRange = v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *CreateSecurityGroupRulePayload) GetProtocol() *V1SecurityGroupRuleProtocol { + if o == nil || IsNil(o.Protocol) { + var ret *V1SecurityGroupRuleProtocol + return ret + } + return o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupRulePayload) GetProtocolOk() (*V1SecurityGroupRuleProtocol, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *CreateSecurityGroupRulePayload) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given V1SecurityGroupRuleProtocol and assigns it to the Protocol field. +func (o *CreateSecurityGroupRulePayload) SetProtocol(v *V1SecurityGroupRuleProtocol) { + o.Protocol = v +} + +// GetRemoteSecurityGroupId returns the RemoteSecurityGroupId field value if set, zero value otherwise. +func (o *CreateSecurityGroupRulePayload) GetRemoteSecurityGroupId() *string { + if o == nil || IsNil(o.RemoteSecurityGroupId) { + var ret *string + return ret + } + return o.RemoteSecurityGroupId +} + +// GetRemoteSecurityGroupIdOk returns a tuple with the RemoteSecurityGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupRulePayload) GetRemoteSecurityGroupIdOk() (*string, bool) { + if o == nil || IsNil(o.RemoteSecurityGroupId) { + return nil, false + } + return o.RemoteSecurityGroupId, true +} + +// HasRemoteSecurityGroupId returns a boolean if a field has been set. +func (o *CreateSecurityGroupRulePayload) HasRemoteSecurityGroupId() bool { + if o != nil && !IsNil(o.RemoteSecurityGroupId) { + return true + } + + return false +} + +// SetRemoteSecurityGroupId gets a reference to the given string and assigns it to the RemoteSecurityGroupId field. +func (o *CreateSecurityGroupRulePayload) SetRemoteSecurityGroupId(v *string) { + o.RemoteSecurityGroupId = v +} + +// GetSecurityGroupId returns the SecurityGroupId field value if set, zero value otherwise. +func (o *CreateSecurityGroupRulePayload) GetSecurityGroupId() *string { + if o == nil || IsNil(o.SecurityGroupId) { + var ret *string + return ret + } + return o.SecurityGroupId +} + +// GetSecurityGroupIdOk returns a tuple with the SecurityGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSecurityGroupRulePayload) GetSecurityGroupIdOk() (*string, bool) { + if o == nil || IsNil(o.SecurityGroupId) { + return nil, false + } + return o.SecurityGroupId, true +} + +// HasSecurityGroupId returns a boolean if a field has been set. +func (o *CreateSecurityGroupRulePayload) HasSecurityGroupId() bool { + if o != nil && !IsNil(o.SecurityGroupId) { + return true + } + + return false +} + +// SetSecurityGroupId gets a reference to the given string and assigns it to the SecurityGroupId field. +func (o *CreateSecurityGroupRulePayload) SetSecurityGroupId(v *string) { + o.SecurityGroupId = v +} + +func (o CreateSecurityGroupRulePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["direction"] = o.Direction + if !IsNil(o.Ethertype) { + toSerialize["ethertype"] = o.Ethertype + } + if !IsNil(o.IcmpParameters) { + toSerialize["icmpParameters"] = o.IcmpParameters + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.IpRange) { + toSerialize["ipRange"] = o.IpRange + } + if !IsNil(o.PortRange) { + toSerialize["portRange"] = o.PortRange + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + if !IsNil(o.RemoteSecurityGroupId) { + toSerialize["remoteSecurityGroupId"] = o.RemoteSecurityGroupId + } + if !IsNil(o.SecurityGroupId) { + toSerialize["securityGroupId"] = o.SecurityGroupId + } + return toSerialize, nil +} + +type NullableCreateSecurityGroupRulePayload struct { + value *CreateSecurityGroupRulePayload + isSet bool +} + +func (v NullableCreateSecurityGroupRulePayload) Get() *CreateSecurityGroupRulePayload { + return v.value +} + +func (v *NullableCreateSecurityGroupRulePayload) Set(val *CreateSecurityGroupRulePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateSecurityGroupRulePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateSecurityGroupRulePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateSecurityGroupRulePayload(val *CreateSecurityGroupRulePayload) *NullableCreateSecurityGroupRulePayload { + return &NullableCreateSecurityGroupRulePayload{value: val, isSet: true} +} + +func (v NullableCreateSecurityGroupRulePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateSecurityGroupRulePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_server_group_payload.go b/services/iaasalpha/model_create_server_group_payload.go index b4340e463..4943491fb 100644 --- a/services/iaasalpha/model_create_server_group_payload.go +++ b/services/iaasalpha/model_create_server_group_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the CreateServerGroupPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateServerGroupPayload{} + // CreateServerGroupPayload Definition of a server group. type CreateServerGroupPayload struct { // Universally Unique Identifier (UUID). @@ -23,3 +30,185 @@ type CreateServerGroupPayload struct { // REQUIRED Policy *string `json:"policy"` } + +type _CreateServerGroupPayload CreateServerGroupPayload + +// NewCreateServerGroupPayload instantiates a new CreateServerGroupPayload 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 NewCreateServerGroupPayload(name *string, policy *string) *CreateServerGroupPayload { + this := CreateServerGroupPayload{} + this.Name = name + this.Policy = policy + return &this +} + +// NewCreateServerGroupPayloadWithDefaults instantiates a new CreateServerGroupPayload 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 NewCreateServerGroupPayloadWithDefaults() *CreateServerGroupPayload { + this := CreateServerGroupPayload{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateServerGroupPayload) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *CreateServerGroupPayload) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateServerGroupPayload) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateServerGroupPayload) SetId(v *string) { + o.Id = v +} + +// GetMembers returns the Members field value if set, zero value otherwise. +func (o *CreateServerGroupPayload) GetMembers() *[]string { + if o == nil || IsNil(o.Members) { + var ret *[]string + return ret + } + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerGroupPayload) GetMembersOk() (*[]string, bool) { + if o == nil || IsNil(o.Members) { + return nil, false + } + return o.Members, true +} + +// HasMembers returns a boolean if a field has been set. +func (o *CreateServerGroupPayload) HasMembers() bool { + if o != nil && !IsNil(o.Members) { + return true + } + + return false +} + +// SetMembers gets a reference to the given []string and assigns it to the Members field. +func (o *CreateServerGroupPayload) SetMembers(v *[]string) { + o.Members = v +} + +// GetName returns the Name field value +func (o *CreateServerGroupPayload) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateServerGroupPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateServerGroupPayload) SetName(v *string) { + o.Name = v +} + +// GetPolicy returns the Policy field value +func (o *CreateServerGroupPayload) GetPolicy() *string { + if o == nil { + var ret *string + return ret + } + + return o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value +// and a boolean to check if the value has been set. +func (o *CreateServerGroupPayload) GetPolicyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Policy, true +} + +// SetPolicy sets field value +func (o *CreateServerGroupPayload) SetPolicy(v *string) { + o.Policy = v +} + +func (o CreateServerGroupPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Members) { + toSerialize["members"] = o.Members + } + toSerialize["name"] = o.Name + toSerialize["policy"] = o.Policy + return toSerialize, nil +} + +type NullableCreateServerGroupPayload struct { + value *CreateServerGroupPayload + isSet bool +} + +func (v NullableCreateServerGroupPayload) Get() *CreateServerGroupPayload { + return v.value +} + +func (v *NullableCreateServerGroupPayload) Set(val *CreateServerGroupPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateServerGroupPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateServerGroupPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateServerGroupPayload(val *CreateServerGroupPayload) *NullableCreateServerGroupPayload { + return &NullableCreateServerGroupPayload{value: val, isSet: true} +} + +func (v NullableCreateServerGroupPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateServerGroupPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_server_networking.go b/services/iaasalpha/model_create_server_networking.go index 6834716e5..c7f786c97 100644 --- a/services/iaasalpha/model_create_server_networking.go +++ b/services/iaasalpha/model_create_server_networking.go @@ -10,8 +10,108 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the CreateServerNetworking type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateServerNetworking{} + // CreateServerNetworking The initial networking setup for the server creation with a network. type CreateServerNetworking struct { // Universally Unique Identifier (UUID). NetworkId *string `json:"networkId,omitempty"` } + +// NewCreateServerNetworking instantiates a new CreateServerNetworking 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 NewCreateServerNetworking() *CreateServerNetworking { + this := CreateServerNetworking{} + return &this +} + +// NewCreateServerNetworkingWithDefaults instantiates a new CreateServerNetworking 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 NewCreateServerNetworkingWithDefaults() *CreateServerNetworking { + this := CreateServerNetworking{} + return &this +} + +// GetNetworkId returns the NetworkId field value if set, zero value otherwise. +func (o *CreateServerNetworking) GetNetworkId() *string { + if o == nil || IsNil(o.NetworkId) { + var ret *string + return ret + } + return o.NetworkId +} + +// 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 *CreateServerNetworking) GetNetworkIdOk() (*string, bool) { + if o == nil || IsNil(o.NetworkId) { + return nil, false + } + return o.NetworkId, true +} + +// HasNetworkId returns a boolean if a field has been set. +func (o *CreateServerNetworking) HasNetworkId() bool { + if o != nil && !IsNil(o.NetworkId) { + return true + } + + return false +} + +// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. +func (o *CreateServerNetworking) SetNetworkId(v *string) { + o.NetworkId = v +} + +func (o CreateServerNetworking) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NetworkId) { + toSerialize["networkId"] = o.NetworkId + } + return toSerialize, nil +} + +type NullableCreateServerNetworking struct { + value *CreateServerNetworking + isSet bool +} + +func (v NullableCreateServerNetworking) Get() *CreateServerNetworking { + return v.value +} + +func (v *NullableCreateServerNetworking) Set(val *CreateServerNetworking) { + v.value = val + v.isSet = true +} + +func (v NullableCreateServerNetworking) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateServerNetworking) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateServerNetworking(val *CreateServerNetworking) *NullableCreateServerNetworking { + return &NullableCreateServerNetworking{value: val, isSet: true} +} + +func (v NullableCreateServerNetworking) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateServerNetworking) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_server_networking_with_nics.go b/services/iaasalpha/model_create_server_networking_with_nics.go index 1d13a9aa5..92cfca6a3 100644 --- a/services/iaasalpha/model_create_server_networking_with_nics.go +++ b/services/iaasalpha/model_create_server_networking_with_nics.go @@ -10,8 +10,108 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the CreateServerNetworkingWithNics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateServerNetworkingWithNics{} + // CreateServerNetworkingWithNics The initial networking setup for the server creation with a network interface. type CreateServerNetworkingWithNics struct { // A list of UUIDs. NicIds *[]string `json:"nicIds,omitempty"` } + +// NewCreateServerNetworkingWithNics instantiates a new CreateServerNetworkingWithNics 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 NewCreateServerNetworkingWithNics() *CreateServerNetworkingWithNics { + this := CreateServerNetworkingWithNics{} + return &this +} + +// NewCreateServerNetworkingWithNicsWithDefaults instantiates a new CreateServerNetworkingWithNics 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 NewCreateServerNetworkingWithNicsWithDefaults() *CreateServerNetworkingWithNics { + this := CreateServerNetworkingWithNics{} + return &this +} + +// GetNicIds returns the NicIds field value if set, zero value otherwise. +func (o *CreateServerNetworkingWithNics) GetNicIds() *[]string { + if o == nil || IsNil(o.NicIds) { + var ret *[]string + return ret + } + return o.NicIds +} + +// GetNicIdsOk returns a tuple with the NicIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerNetworkingWithNics) GetNicIdsOk() (*[]string, bool) { + if o == nil || IsNil(o.NicIds) { + return nil, false + } + return o.NicIds, true +} + +// HasNicIds returns a boolean if a field has been set. +func (o *CreateServerNetworkingWithNics) HasNicIds() bool { + if o != nil && !IsNil(o.NicIds) { + return true + } + + return false +} + +// SetNicIds gets a reference to the given []string and assigns it to the NicIds field. +func (o *CreateServerNetworkingWithNics) SetNicIds(v *[]string) { + o.NicIds = v +} + +func (o CreateServerNetworkingWithNics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NicIds) { + toSerialize["nicIds"] = o.NicIds + } + return toSerialize, nil +} + +type NullableCreateServerNetworkingWithNics struct { + value *CreateServerNetworkingWithNics + isSet bool +} + +func (v NullableCreateServerNetworkingWithNics) Get() *CreateServerNetworkingWithNics { + return v.value +} + +func (v *NullableCreateServerNetworkingWithNics) Set(val *CreateServerNetworkingWithNics) { + v.value = val + v.isSet = true +} + +func (v NullableCreateServerNetworkingWithNics) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateServerNetworkingWithNics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateServerNetworkingWithNics(val *CreateServerNetworkingWithNics) *NullableCreateServerNetworkingWithNics { + return &NullableCreateServerNetworkingWithNics{value: val, isSet: true} +} + +func (v NullableCreateServerNetworkingWithNics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateServerNetworkingWithNics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_server_payload.go b/services/iaasalpha/model_create_server_payload.go index ba7ae8da4..6fd6a1955 100644 --- a/services/iaasalpha/model_create_server_payload.go +++ b/services/iaasalpha/model_create_server_payload.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the CreateServerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateServerPayload{} + // CreateServerPayload Representation of a single server object. type CreateServerPayload struct { // Object that represents an availability zone. @@ -60,3 +64,815 @@ type CreateServerPayload struct { // A list of UUIDs. Volumes *[]string `json:"volumes,omitempty"` } + +type _CreateServerPayload CreateServerPayload + +// NewCreateServerPayload instantiates a new CreateServerPayload 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 NewCreateServerPayload(machineType *string, name *string) *CreateServerPayload { + this := CreateServerPayload{} + this.MachineType = machineType + this.Name = name + return &this +} + +// NewCreateServerPayloadWithDefaults instantiates a new CreateServerPayload 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 NewCreateServerPayloadWithDefaults() *CreateServerPayload { + this := CreateServerPayload{} + return &this +} + +// GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise. +func (o *CreateServerPayload) GetAvailabilityZone() *string { + if o == nil || IsNil(o.AvailabilityZone) { + var ret *string + return ret + } + return o.AvailabilityZone +} + +// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetAvailabilityZoneOk() (*string, bool) { + if o == nil || IsNil(o.AvailabilityZone) { + return nil, false + } + return o.AvailabilityZone, true +} + +// HasAvailabilityZone returns a boolean if a field has been set. +func (o *CreateServerPayload) HasAvailabilityZone() bool { + if o != nil && !IsNil(o.AvailabilityZone) { + return true + } + + return false +} + +// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. +func (o *CreateServerPayload) SetAvailabilityZone(v *string) { + o.AvailabilityZone = v +} + +// GetBootVolume returns the BootVolume field value if set, zero value otherwise. +func (o *CreateServerPayload) GetBootVolume() *CreateServerPayloadBootVolume { + if o == nil || IsNil(o.BootVolume) { + var ret *CreateServerPayloadBootVolume + return ret + } + return o.BootVolume +} + +// GetBootVolumeOk returns a tuple with the BootVolume field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetBootVolumeOk() (*CreateServerPayloadBootVolume, bool) { + if o == nil || IsNil(o.BootVolume) { + return nil, false + } + return o.BootVolume, true +} + +// HasBootVolume returns a boolean if a field has been set. +func (o *CreateServerPayload) HasBootVolume() bool { + if o != nil && !IsNil(o.BootVolume) { + return true + } + + return false +} + +// SetBootVolume gets a reference to the given CreateServerPayloadBootVolume and assigns it to the BootVolume field. +func (o *CreateServerPayload) SetBootVolume(v *CreateServerPayloadBootVolume) { + o.BootVolume = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CreateServerPayload) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CreateServerPayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CreateServerPayload) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise. +func (o *CreateServerPayload) GetErrorMessage() *string { + if o == nil || IsNil(o.ErrorMessage) { + var ret *string + return ret + } + return o.ErrorMessage +} + +// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetErrorMessageOk() (*string, bool) { + if o == nil || IsNil(o.ErrorMessage) { + return nil, false + } + return o.ErrorMessage, true +} + +// HasErrorMessage returns a boolean if a field has been set. +func (o *CreateServerPayload) HasErrorMessage() bool { + if o != nil && !IsNil(o.ErrorMessage) { + return true + } + + return false +} + +// SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field. +func (o *CreateServerPayload) SetErrorMessage(v *string) { + o.ErrorMessage = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateServerPayload) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *CreateServerPayload) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateServerPayload) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateServerPayload) SetId(v *string) { + o.Id = v +} + +// GetImageId returns the ImageId field value if set, zero value otherwise. +func (o *CreateServerPayload) GetImageId() *string { + if o == nil || IsNil(o.ImageId) { + var ret *string + return ret + } + return o.ImageId +} + +// GetImageIdOk returns a tuple with the ImageId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetImageIdOk() (*string, bool) { + if o == nil || IsNil(o.ImageId) { + return nil, false + } + return o.ImageId, true +} + +// HasImageId returns a boolean if a field has been set. +func (o *CreateServerPayload) HasImageId() bool { + if o != nil && !IsNil(o.ImageId) { + return true + } + + return false +} + +// SetImageId gets a reference to the given string and assigns it to the ImageId field. +func (o *CreateServerPayload) SetImageId(v *string) { + o.ImageId = v +} + +// GetKeypairName returns the KeypairName field value if set, zero value otherwise. +func (o *CreateServerPayload) GetKeypairName() *string { + if o == nil || IsNil(o.KeypairName) { + var ret *string + return ret + } + return o.KeypairName +} + +// GetKeypairNameOk returns a tuple with the KeypairName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetKeypairNameOk() (*string, bool) { + if o == nil || IsNil(o.KeypairName) { + return nil, false + } + return o.KeypairName, true +} + +// HasKeypairName returns a boolean if a field has been set. +func (o *CreateServerPayload) HasKeypairName() bool { + if o != nil && !IsNil(o.KeypairName) { + return true + } + + return false +} + +// SetKeypairName gets a reference to the given string and assigns it to the KeypairName field. +func (o *CreateServerPayload) SetKeypairName(v *string) { + o.KeypairName = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateServerPayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *CreateServerPayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateServerPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *CreateServerPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetLaunchedAt returns the LaunchedAt field value if set, zero value otherwise. +func (o *CreateServerPayload) GetLaunchedAt() *time.Time { + if o == nil || IsNil(o.LaunchedAt) { + var ret *time.Time + return ret + } + return o.LaunchedAt +} + +// GetLaunchedAtOk returns a tuple with the LaunchedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetLaunchedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LaunchedAt) { + return nil, false + } + return o.LaunchedAt, true +} + +// HasLaunchedAt returns a boolean if a field has been set. +func (o *CreateServerPayload) HasLaunchedAt() bool { + if o != nil && !IsNil(o.LaunchedAt) { + return true + } + + return false +} + +// SetLaunchedAt gets a reference to the given time.Time and assigns it to the LaunchedAt field. +func (o *CreateServerPayload) SetLaunchedAt(v *time.Time) { + o.LaunchedAt = v +} + +// GetMachineType returns the MachineType field value +func (o *CreateServerPayload) GetMachineType() *string { + if o == nil { + var ret *string + return ret + } + + return o.MachineType +} + +// GetMachineTypeOk returns a tuple with the MachineType field value +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetMachineTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MachineType, true +} + +// SetMachineType sets field value +func (o *CreateServerPayload) SetMachineType(v *string) { + o.MachineType = v +} + +// GetMaintenanceWindow returns the MaintenanceWindow field value if set, zero value otherwise. +func (o *CreateServerPayload) GetMaintenanceWindow() *ServerMaintenance { + if o == nil || IsNil(o.MaintenanceWindow) { + var ret *ServerMaintenance + return ret + } + return o.MaintenanceWindow +} + +// GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetMaintenanceWindowOk() (*ServerMaintenance, bool) { + if o == nil || IsNil(o.MaintenanceWindow) { + return nil, false + } + return o.MaintenanceWindow, true +} + +// HasMaintenanceWindow returns a boolean if a field has been set. +func (o *CreateServerPayload) HasMaintenanceWindow() bool { + if o != nil && !IsNil(o.MaintenanceWindow) { + return true + } + + return false +} + +// SetMaintenanceWindow gets a reference to the given ServerMaintenance and assigns it to the MaintenanceWindow field. +func (o *CreateServerPayload) SetMaintenanceWindow(v *ServerMaintenance) { + o.MaintenanceWindow = v +} + +// GetName returns the Name field value +func (o *CreateServerPayload) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateServerPayload) SetName(v *string) { + o.Name = v +} + +// GetNetworking returns the Networking field value if set, zero value otherwise. +func (o *CreateServerPayload) GetNetworking() *CreateServerPayloadNetworking { + if o == nil || IsNil(o.Networking) { + var ret *CreateServerPayloadNetworking + return ret + } + return o.Networking +} + +// GetNetworkingOk returns a tuple with the Networking field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetNetworkingOk() (*CreateServerPayloadNetworking, bool) { + if o == nil || IsNil(o.Networking) { + return nil, false + } + return o.Networking, true +} + +// HasNetworking returns a boolean if a field has been set. +func (o *CreateServerPayload) HasNetworking() bool { + if o != nil && !IsNil(o.Networking) { + return true + } + + return false +} + +// SetNetworking gets a reference to the given CreateServerPayloadNetworking and assigns it to the Networking field. +func (o *CreateServerPayload) SetNetworking(v *CreateServerPayloadNetworking) { + o.Networking = v +} + +// GetNics returns the Nics field value if set, zero value otherwise. +func (o *CreateServerPayload) GetNics() *[]ServerNetwork { + if o == nil || IsNil(o.Nics) { + var ret *[]ServerNetwork + return ret + } + return o.Nics +} + +// GetNicsOk returns a tuple with the Nics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetNicsOk() (*[]ServerNetwork, bool) { + if o == nil || IsNil(o.Nics) { + return nil, false + } + return o.Nics, true +} + +// HasNics returns a boolean if a field has been set. +func (o *CreateServerPayload) HasNics() bool { + if o != nil && !IsNil(o.Nics) { + return true + } + + return false +} + +// SetNics gets a reference to the given []ServerNetwork and assigns it to the Nics field. +func (o *CreateServerPayload) SetNics(v *[]ServerNetwork) { + o.Nics = v +} + +// GetPowerStatus returns the PowerStatus field value if set, zero value otherwise. +func (o *CreateServerPayload) GetPowerStatus() *string { + if o == nil || IsNil(o.PowerStatus) { + var ret *string + return ret + } + return o.PowerStatus +} + +// GetPowerStatusOk returns a tuple with the PowerStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetPowerStatusOk() (*string, bool) { + if o == nil || IsNil(o.PowerStatus) { + return nil, false + } + return o.PowerStatus, true +} + +// HasPowerStatus returns a boolean if a field has been set. +func (o *CreateServerPayload) HasPowerStatus() bool { + if o != nil && !IsNil(o.PowerStatus) { + return true + } + + return false +} + +// SetPowerStatus gets a reference to the given string and assigns it to the PowerStatus field. +func (o *CreateServerPayload) SetPowerStatus(v *string) { + o.PowerStatus = v +} + +// GetSecurityGroups returns the SecurityGroups field value if set, zero value otherwise. +func (o *CreateServerPayload) GetSecurityGroups() *[]string { + if o == nil || IsNil(o.SecurityGroups) { + var ret *[]string + return ret + } + return o.SecurityGroups +} + +// 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 *CreateServerPayload) GetSecurityGroupsOk() (*[]string, bool) { + if o == nil || IsNil(o.SecurityGroups) { + return nil, false + } + return o.SecurityGroups, true +} + +// HasSecurityGroups returns a boolean if a field has been set. +func (o *CreateServerPayload) HasSecurityGroups() bool { + if o != nil && !IsNil(o.SecurityGroups) { + return true + } + + return false +} + +// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. +func (o *CreateServerPayload) SetSecurityGroups(v *[]string) { + o.SecurityGroups = v +} + +// GetServerGroup returns the ServerGroup field value if set, zero value otherwise. +func (o *CreateServerPayload) GetServerGroup() *string { + if o == nil || IsNil(o.ServerGroup) { + var ret *string + return ret + } + return o.ServerGroup +} + +// GetServerGroupOk returns a tuple with the ServerGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetServerGroupOk() (*string, bool) { + if o == nil || IsNil(o.ServerGroup) { + return nil, false + } + return o.ServerGroup, true +} + +// HasServerGroup returns a boolean if a field has been set. +func (o *CreateServerPayload) HasServerGroup() bool { + if o != nil && !IsNil(o.ServerGroup) { + return true + } + + return false +} + +// SetServerGroup gets a reference to the given string and assigns it to the ServerGroup field. +func (o *CreateServerPayload) SetServerGroup(v *string) { + o.ServerGroup = v +} + +// GetServiceAccountMails returns the ServiceAccountMails field value if set, zero value otherwise. +func (o *CreateServerPayload) GetServiceAccountMails() *[]string { + if o == nil || IsNil(o.ServiceAccountMails) { + var ret *[]string + return ret + } + return o.ServiceAccountMails +} + +// GetServiceAccountMailsOk returns a tuple with the ServiceAccountMails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetServiceAccountMailsOk() (*[]string, bool) { + if o == nil || IsNil(o.ServiceAccountMails) { + return nil, false + } + return o.ServiceAccountMails, true +} + +// HasServiceAccountMails returns a boolean if a field has been set. +func (o *CreateServerPayload) HasServiceAccountMails() bool { + if o != nil && !IsNil(o.ServiceAccountMails) { + return true + } + + return false +} + +// SetServiceAccountMails gets a reference to the given []string and assigns it to the ServiceAccountMails field. +func (o *CreateServerPayload) SetServiceAccountMails(v *[]string) { + o.ServiceAccountMails = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateServerPayload) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// 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 *CreateServerPayload) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CreateServerPayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CreateServerPayload) SetStatus(v *string) { + o.Status = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CreateServerPayload) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CreateServerPayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CreateServerPayload) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +// GetUserData returns the UserData field value if set, zero value otherwise. +func (o *CreateServerPayload) GetUserData() *string { + if o == nil || IsNil(o.UserData) { + var ret *string + return ret + } + return o.UserData +} + +// GetUserDataOk returns a tuple with the UserData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetUserDataOk() (*string, bool) { + if o == nil || IsNil(o.UserData) { + return nil, false + } + return o.UserData, true +} + +// HasUserData returns a boolean if a field has been set. +func (o *CreateServerPayload) HasUserData() bool { + if o != nil && !IsNil(o.UserData) { + return true + } + + return false +} + +// SetUserData gets a reference to the given string and assigns it to the UserData field. +func (o *CreateServerPayload) SetUserData(v *string) { + o.UserData = v +} + +// GetVolumes returns the Volumes field value if set, zero value otherwise. +func (o *CreateServerPayload) GetVolumes() *[]string { + if o == nil || IsNil(o.Volumes) { + var ret *[]string + return ret + } + return o.Volumes +} + +// GetVolumesOk returns a tuple with the Volumes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayload) GetVolumesOk() (*[]string, bool) { + if o == nil || IsNil(o.Volumes) { + return nil, false + } + return o.Volumes, true +} + +// HasVolumes returns a boolean if a field has been set. +func (o *CreateServerPayload) HasVolumes() bool { + if o != nil && !IsNil(o.Volumes) { + return true + } + + return false +} + +// SetVolumes gets a reference to the given []string and assigns it to the Volumes field. +func (o *CreateServerPayload) SetVolumes(v *[]string) { + o.Volumes = v +} + +func (o CreateServerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvailabilityZone) { + toSerialize["availabilityZone"] = o.AvailabilityZone + } + if !IsNil(o.BootVolume) { + toSerialize["bootVolume"] = o.BootVolume + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.ErrorMessage) { + toSerialize["errorMessage"] = o.ErrorMessage + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ImageId) { + toSerialize["imageId"] = o.ImageId + } + if !IsNil(o.KeypairName) { + toSerialize["keypairName"] = o.KeypairName + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.LaunchedAt) { + toSerialize["launchedAt"] = o.LaunchedAt + } + toSerialize["machineType"] = o.MachineType + if !IsNil(o.MaintenanceWindow) { + toSerialize["maintenanceWindow"] = o.MaintenanceWindow + } + toSerialize["name"] = o.Name + if !IsNil(o.Networking) { + toSerialize["networking"] = o.Networking + } + if !IsNil(o.Nics) { + toSerialize["nics"] = o.Nics + } + if !IsNil(o.PowerStatus) { + toSerialize["powerStatus"] = o.PowerStatus + } + if !IsNil(o.SecurityGroups) { + toSerialize["securityGroups"] = o.SecurityGroups + } + if !IsNil(o.ServerGroup) { + toSerialize["serverGroup"] = o.ServerGroup + } + if !IsNil(o.ServiceAccountMails) { + toSerialize["serviceAccountMails"] = o.ServiceAccountMails + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if !IsNil(o.UserData) { + toSerialize["userData"] = o.UserData + } + if !IsNil(o.Volumes) { + toSerialize["volumes"] = o.Volumes + } + return toSerialize, nil +} + +type NullableCreateServerPayload struct { + value *CreateServerPayload + isSet bool +} + +func (v NullableCreateServerPayload) Get() *CreateServerPayload { + return v.value +} + +func (v *NullableCreateServerPayload) Set(val *CreateServerPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateServerPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateServerPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateServerPayload(val *CreateServerPayload) *NullableCreateServerPayload { + return &NullableCreateServerPayload{value: val, isSet: true} +} + +func (v NullableCreateServerPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateServerPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_server_payload_boot_volume.go b/services/iaasalpha/model_create_server_payload_boot_volume.go index 1232d5912..633f932b9 100644 --- a/services/iaasalpha/model_create_server_payload_boot_volume.go +++ b/services/iaasalpha/model_create_server_payload_boot_volume.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the CreateServerPayloadBootVolume type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateServerPayloadBootVolume{} + // CreateServerPayloadBootVolume struct for CreateServerPayloadBootVolume type CreateServerPayloadBootVolume struct { // Delete the volume during the termination of the server. Defaults to false. @@ -22,3 +29,240 @@ type CreateServerPayloadBootVolume struct { Size *int64 `json:"size,omitempty"` Source *BootVolumeSource `json:"source,omitempty"` } + +// NewCreateServerPayloadBootVolume instantiates a new CreateServerPayloadBootVolume 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 NewCreateServerPayloadBootVolume() *CreateServerPayloadBootVolume { + this := CreateServerPayloadBootVolume{} + var deleteOnTermination bool = false + this.DeleteOnTermination = &deleteOnTermination + return &this +} + +// NewCreateServerPayloadBootVolumeWithDefaults instantiates a new CreateServerPayloadBootVolume 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 NewCreateServerPayloadBootVolumeWithDefaults() *CreateServerPayloadBootVolume { + this := CreateServerPayloadBootVolume{} + var deleteOnTermination bool = false + this.DeleteOnTermination = &deleteOnTermination + return &this +} + +// GetDeleteOnTermination returns the DeleteOnTermination field value if set, zero value otherwise. +func (o *CreateServerPayloadBootVolume) GetDeleteOnTermination() *bool { + if o == nil || IsNil(o.DeleteOnTermination) { + var ret *bool + return ret + } + return o.DeleteOnTermination +} + +// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayloadBootVolume) GetDeleteOnTerminationOk() (*bool, bool) { + if o == nil || IsNil(o.DeleteOnTermination) { + return nil, false + } + return o.DeleteOnTermination, true +} + +// HasDeleteOnTermination returns a boolean if a field has been set. +func (o *CreateServerPayloadBootVolume) HasDeleteOnTermination() bool { + if o != nil && !IsNil(o.DeleteOnTermination) { + return true + } + + return false +} + +// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field. +func (o *CreateServerPayloadBootVolume) SetDeleteOnTermination(v *bool) { + o.DeleteOnTermination = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateServerPayloadBootVolume) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *CreateServerPayloadBootVolume) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateServerPayloadBootVolume) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateServerPayloadBootVolume) SetId(v *string) { + o.Id = v +} + +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +func (o *CreateServerPayloadBootVolume) GetPerformanceClass() *string { + if o == nil || IsNil(o.PerformanceClass) { + var ret *string + return ret + } + return o.PerformanceClass +} + +// GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayloadBootVolume) GetPerformanceClassOk() (*string, bool) { + if o == nil || IsNil(o.PerformanceClass) { + return nil, false + } + return o.PerformanceClass, true +} + +// HasPerformanceClass returns a boolean if a field has been set. +func (o *CreateServerPayloadBootVolume) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false +} + +// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. +func (o *CreateServerPayloadBootVolume) SetPerformanceClass(v *string) { + o.PerformanceClass = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *CreateServerPayloadBootVolume) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayloadBootVolume) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *CreateServerPayloadBootVolume) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *CreateServerPayloadBootVolume) SetSize(v *int64) { + o.Size = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *CreateServerPayloadBootVolume) GetSource() *BootVolumeSource { + if o == nil || IsNil(o.Source) { + var ret *BootVolumeSource + return ret + } + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServerPayloadBootVolume) GetSourceOk() (*BootVolumeSource, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *CreateServerPayloadBootVolume) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given BootVolumeSource and assigns it to the Source field. +func (o *CreateServerPayloadBootVolume) SetSource(v *BootVolumeSource) { + o.Source = v +} + +func (o CreateServerPayloadBootVolume) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DeleteOnTermination) { + toSerialize["deleteOnTermination"] = o.DeleteOnTermination + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + return toSerialize, nil +} + +type NullableCreateServerPayloadBootVolume struct { + value *CreateServerPayloadBootVolume + isSet bool +} + +func (v NullableCreateServerPayloadBootVolume) Get() *CreateServerPayloadBootVolume { + return v.value +} + +func (v *NullableCreateServerPayloadBootVolume) Set(val *CreateServerPayloadBootVolume) { + v.value = val + v.isSet = true +} + +func (v NullableCreateServerPayloadBootVolume) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateServerPayloadBootVolume) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateServerPayloadBootVolume(val *CreateServerPayloadBootVolume) *NullableCreateServerPayloadBootVolume { + return &NullableCreateServerPayloadBootVolume{value: val, isSet: true} +} + +func (v NullableCreateServerPayloadBootVolume) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateServerPayloadBootVolume) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_create_volume_payload.go b/services/iaasalpha/model_create_volume_payload.go index bf65a8616..3f24a41a7 100644 --- a/services/iaasalpha/model_create_volume_payload.go +++ b/services/iaasalpha/model_create_volume_payload.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the CreateVolumePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateVolumePayload{} + // CreateVolumePayload Object that represents a volume and its parameters. Used for Creating and returning (get/list). type CreateVolumePayload struct { // Object that represents an availability zone. @@ -41,3 +45,474 @@ type CreateVolumePayload struct { // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` } + +type _CreateVolumePayload CreateVolumePayload + +// NewCreateVolumePayload instantiates a new CreateVolumePayload 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 NewCreateVolumePayload(availabilityZone *string) *CreateVolumePayload { + this := CreateVolumePayload{} + this.AvailabilityZone = availabilityZone + return &this +} + +// NewCreateVolumePayloadWithDefaults instantiates a new CreateVolumePayload 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 NewCreateVolumePayloadWithDefaults() *CreateVolumePayload { + this := CreateVolumePayload{} + return &this +} + +// GetAvailabilityZone returns the AvailabilityZone field value +func (o *CreateVolumePayload) GetAvailabilityZone() *string { + if o == nil { + var ret *string + return ret + } + + return o.AvailabilityZone +} + +// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value +// and a boolean to check if the value has been set. +func (o *CreateVolumePayload) GetAvailabilityZoneOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AvailabilityZone, true +} + +// SetAvailabilityZone sets field value +func (o *CreateVolumePayload) SetAvailabilityZone(v *string) { + o.AvailabilityZone = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateVolumePayload) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CreateVolumePayload) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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 *CreateVolumePayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateVolumePayload) SetDescription(v *string) { + o.Description = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *CreateVolumePayload) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateVolumePayload) SetId(v *string) { + o.Id = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *CreateVolumePayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *CreateVolumePayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *CreateVolumePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateVolumePayload) SetName(v *string) { + o.Name = v +} + +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetPerformanceClass() *string { + if o == nil || IsNil(o.PerformanceClass) { + var ret *string + return ret + } + return o.PerformanceClass +} + +// GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateVolumePayload) GetPerformanceClassOk() (*string, bool) { + if o == nil || IsNil(o.PerformanceClass) { + return nil, false + } + return o.PerformanceClass, true +} + +// HasPerformanceClass returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false +} + +// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. +func (o *CreateVolumePayload) SetPerformanceClass(v *string) { + o.PerformanceClass = v +} + +// GetServerId returns the ServerId field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetServerId() *string { + if o == nil || IsNil(o.ServerId) { + var ret *string + return ret + } + return o.ServerId +} + +// GetServerIdOk returns a tuple with the ServerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateVolumePayload) GetServerIdOk() (*string, bool) { + if o == nil || IsNil(o.ServerId) { + return nil, false + } + return o.ServerId, true +} + +// HasServerId returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasServerId() bool { + if o != nil && !IsNil(o.ServerId) { + return true + } + + return false +} + +// SetServerId gets a reference to the given string and assigns it to the ServerId field. +func (o *CreateVolumePayload) SetServerId(v *string) { + o.ServerId = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateVolumePayload) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *CreateVolumePayload) SetSize(v *int64) { + o.Size = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetSource() *VolumeSource { + if o == nil || IsNil(o.Source) { + var ret *VolumeSource + return ret + } + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateVolumePayload) GetSourceOk() (*VolumeSource, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given VolumeSource and assigns it to the Source field. +func (o *CreateVolumePayload) SetSource(v *VolumeSource) { + o.Source = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// 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 *CreateVolumePayload) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CreateVolumePayload) SetStatus(v *string) { + o.Status = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CreateVolumePayload) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateVolumePayload) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CreateVolumePayload) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CreateVolumePayload) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +func (o CreateVolumePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["availabilityZone"] = o.AvailabilityZone + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } + if !IsNil(o.ServerId) { + toSerialize["serverId"] = o.ServerId + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableCreateVolumePayload struct { + value *CreateVolumePayload + isSet bool +} + +func (v NullableCreateVolumePayload) Get() *CreateVolumePayload { + return v.value +} + +func (v *NullableCreateVolumePayload) Set(val *CreateVolumePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateVolumePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateVolumePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateVolumePayload(val *CreateVolumePayload) *NullableCreateVolumePayload { + return &NullableCreateVolumePayload{value: val, isSet: true} +} + +func (v NullableCreateVolumePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateVolumePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_error.go b/services/iaasalpha/model_error.go index 13231cd15..6b1c1b4fe 100644 --- a/services/iaasalpha/model_error.go +++ b/services/iaasalpha/model_error.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + // Error Error with HTTP error code and an error message. type Error struct { // REQUIRED @@ -18,3 +25,115 @@ type Error struct { // REQUIRED Msg *string `json:"msg"` } + +type _Error Error + +// NewError instantiates a new Error 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 NewError(code *int64, msg *string) *Error { + this := Error{} + this.Code = code + this.Msg = msg + return &this +} + +// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetCode returns the Code field value +func (o *Error) GetCode() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *Error) GetCodeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Code, true +} + +// SetCode sets field value +func (o *Error) SetCode(v *int64) { + o.Code = v +} + +// GetMsg returns the Msg field value +func (o *Error) GetMsg() *string { + if o == nil { + var ret *string + return ret + } + + return o.Msg +} + +// GetMsgOk returns a tuple with the Msg field value +// and a boolean to check if the value has been set. +func (o *Error) GetMsgOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Msg, true +} + +// SetMsg sets field value +func (o *Error) SetMsg(v *string) { + o.Msg = v +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + toSerialize["msg"] = o.Msg + return toSerialize, nil +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_get_server_log_200_response.go b/services/iaasalpha/model_get_server_log_200_response.go index 86ee5e6d6..badfa9afa 100644 --- a/services/iaasalpha/model_get_server_log_200_response.go +++ b/services/iaasalpha/model_get_server_log_200_response.go @@ -10,7 +10,107 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the GetServerLog200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetServerLog200Response{} + // GetServerLog200Response struct for GetServerLog200Response type GetServerLog200Response struct { Output *string `json:"output,omitempty"` } + +// NewGetServerLog200Response instantiates a new GetServerLog200Response 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 NewGetServerLog200Response() *GetServerLog200Response { + this := GetServerLog200Response{} + return &this +} + +// NewGetServerLog200ResponseWithDefaults instantiates a new GetServerLog200Response 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 NewGetServerLog200ResponseWithDefaults() *GetServerLog200Response { + this := GetServerLog200Response{} + return &this +} + +// GetOutput returns the Output field value if set, zero value otherwise. +func (o *GetServerLog200Response) GetOutput() *string { + if o == nil || IsNil(o.Output) { + var ret *string + return ret + } + return o.Output +} + +// GetOutputOk returns a tuple with the Output field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetServerLog200Response) GetOutputOk() (*string, bool) { + if o == nil || IsNil(o.Output) { + return nil, false + } + return o.Output, true +} + +// HasOutput returns a boolean if a field has been set. +func (o *GetServerLog200Response) HasOutput() bool { + if o != nil && !IsNil(o.Output) { + return true + } + + return false +} + +// SetOutput gets a reference to the given string and assigns it to the Output field. +func (o *GetServerLog200Response) SetOutput(v *string) { + o.Output = v +} + +func (o GetServerLog200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Output) { + toSerialize["output"] = o.Output + } + return toSerialize, nil +} + +type NullableGetServerLog200Response struct { + value *GetServerLog200Response + isSet bool +} + +func (v NullableGetServerLog200Response) Get() *GetServerLog200Response { + return v.value +} + +func (v *NullableGetServerLog200Response) Set(val *GetServerLog200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetServerLog200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetServerLog200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetServerLog200Response(val *GetServerLog200Response) *NullableGetServerLog200Response { + return &NullableGetServerLog200Response{value: val, isSet: true} +} + +func (v NullableGetServerLog200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetServerLog200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_get_server_log_request.go b/services/iaasalpha/model_get_server_log_request.go index d337fdc61..76d4f94d5 100644 --- a/services/iaasalpha/model_get_server_log_request.go +++ b/services/iaasalpha/model_get_server_log_request.go @@ -10,8 +10,112 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the GetServerLogRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetServerLogRequest{} + // GetServerLogRequest struct for GetServerLogRequest type GetServerLogRequest struct { // Set to 0 to retrieve the complete log. Length *int64 `json:"length,omitempty"` } + +// NewGetServerLogRequest instantiates a new GetServerLogRequest 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 NewGetServerLogRequest() *GetServerLogRequest { + this := GetServerLogRequest{} + var length int64 = 2000 + this.Length = &length + return &this +} + +// NewGetServerLogRequestWithDefaults instantiates a new GetServerLogRequest 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 NewGetServerLogRequestWithDefaults() *GetServerLogRequest { + this := GetServerLogRequest{} + var length int64 = 2000 + this.Length = &length + return &this +} + +// GetLength returns the Length field value if set, zero value otherwise. +func (o *GetServerLogRequest) GetLength() *int64 { + if o == nil || IsNil(o.Length) { + var ret *int64 + return ret + } + return o.Length +} + +// GetLengthOk returns a tuple with the Length field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetServerLogRequest) GetLengthOk() (*int64, bool) { + if o == nil || IsNil(o.Length) { + return nil, false + } + return o.Length, true +} + +// HasLength returns a boolean if a field has been set. +func (o *GetServerLogRequest) HasLength() bool { + if o != nil && !IsNil(o.Length) { + return true + } + + return false +} + +// SetLength gets a reference to the given int64 and assigns it to the Length field. +func (o *GetServerLogRequest) SetLength(v *int64) { + o.Length = v +} + +func (o GetServerLogRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Length) { + toSerialize["length"] = o.Length + } + return toSerialize, nil +} + +type NullableGetServerLogRequest struct { + value *GetServerLogRequest + isSet bool +} + +func (v NullableGetServerLogRequest) Get() *GetServerLogRequest { + return v.value +} + +func (v *NullableGetServerLogRequest) Set(val *GetServerLogRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGetServerLogRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGetServerLogRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetServerLogRequest(val *GetServerLogRequest) *NullableGetServerLogRequest { + return &NullableGetServerLogRequest{value: val, isSet: true} +} + +func (v NullableGetServerLogRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetServerLogRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_icmp_parameters.go b/services/iaasalpha/model_icmp_parameters.go index ef771fa20..1edbe5386 100644 --- a/services/iaasalpha/model_icmp_parameters.go +++ b/services/iaasalpha/model_icmp_parameters.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the ICMPParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ICMPParameters{} + // ICMPParameters Object that represents ICMP parameters. type ICMPParameters struct { // ICMP code. Can be set if the protocol is ICMP. @@ -19,3 +26,115 @@ type ICMPParameters struct { // REQUIRED Type *int64 `json:"type"` } + +type _ICMPParameters ICMPParameters + +// NewICMPParameters instantiates a new ICMPParameters 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 NewICMPParameters(code *int64, type_ *int64) *ICMPParameters { + this := ICMPParameters{} + this.Code = code + this.Type = type_ + return &this +} + +// NewICMPParametersWithDefaults instantiates a new ICMPParameters 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 NewICMPParametersWithDefaults() *ICMPParameters { + this := ICMPParameters{} + return &this +} + +// GetCode returns the Code field value +func (o *ICMPParameters) GetCode() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *ICMPParameters) GetCodeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Code, true +} + +// SetCode sets field value +func (o *ICMPParameters) SetCode(v *int64) { + o.Code = v +} + +// GetType returns the Type field value +func (o *ICMPParameters) GetType() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ICMPParameters) GetTypeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Type, true +} + +// SetType sets field value +func (o *ICMPParameters) SetType(v *int64) { + o.Type = v +} + +func (o ICMPParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableICMPParameters struct { + value *ICMPParameters + isSet bool +} + +func (v NullableICMPParameters) Get() *ICMPParameters { + return v.value +} + +func (v *NullableICMPParameters) Set(val *ICMPParameters) { + v.value = val + v.isSet = true +} + +func (v NullableICMPParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableICMPParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableICMPParameters(val *ICMPParameters) *NullableICMPParameters { + return &NullableICMPParameters{value: val, isSet: true} +} + +func (v NullableICMPParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableICMPParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_key_pair_list_response.go b/services/iaasalpha/model_key_pair_list_response.go index 5870f5d42..1f785141c 100644 --- a/services/iaasalpha/model_key_pair_list_response.go +++ b/services/iaasalpha/model_key_pair_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the KeyPairListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KeyPairListResponse{} + // KeyPairListResponse SSH keypair list response. type KeyPairListResponse struct { // A list of SSH keypairs. // REQUIRED Items *[]Keypair `json:"items"` } + +type _KeyPairListResponse KeyPairListResponse + +// NewKeyPairListResponse instantiates a new KeyPairListResponse 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 NewKeyPairListResponse(items *[]Keypair) *KeyPairListResponse { + this := KeyPairListResponse{} + this.Items = items + return &this +} + +// NewKeyPairListResponseWithDefaults instantiates a new KeyPairListResponse 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 NewKeyPairListResponseWithDefaults() *KeyPairListResponse { + this := KeyPairListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *KeyPairListResponse) GetItems() *[]Keypair { + if o == nil { + var ret *[]Keypair + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *KeyPairListResponse) GetItemsOk() (*[]Keypair, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *KeyPairListResponse) SetItems(v *[]Keypair) { + o.Items = v +} + +func (o KeyPairListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableKeyPairListResponse struct { + value *KeyPairListResponse + isSet bool +} + +func (v NullableKeyPairListResponse) Get() *KeyPairListResponse { + return v.value +} + +func (v *NullableKeyPairListResponse) Set(val *KeyPairListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableKeyPairListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableKeyPairListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKeyPairListResponse(val *KeyPairListResponse) *NullableKeyPairListResponse { + return &NullableKeyPairListResponse{value: val, isSet: true} +} + +func (v NullableKeyPairListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKeyPairListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_keypair.go b/services/iaasalpha/model_keypair.go index 9452ade20..fa841a67e 100644 --- a/services/iaasalpha/model_keypair.go +++ b/services/iaasalpha/model_keypair.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the Keypair type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Keypair{} + // Keypair Object that represents the public key of an SSH keypair and its name. type Keypair struct { // Object that represents an SSH keypair MD5 fingerprint. @@ -22,3 +29,194 @@ type Keypair struct { // REQUIRED PublicKey *string `json:"publicKey"` } + +type _Keypair Keypair + +// NewKeypair instantiates a new Keypair 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 NewKeypair(publicKey *string) *Keypair { + this := Keypair{} + this.PublicKey = publicKey + return &this +} + +// NewKeypairWithDefaults instantiates a new Keypair 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 NewKeypairWithDefaults() *Keypair { + this := Keypair{} + return &this +} + +// GetFingerprint returns the Fingerprint field value if set, zero value otherwise. +func (o *Keypair) GetFingerprint() *string { + if o == nil || IsNil(o.Fingerprint) { + var ret *string + return ret + } + return o.Fingerprint +} + +// GetFingerprintOk returns a tuple with the Fingerprint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Keypair) GetFingerprintOk() (*string, bool) { + if o == nil || IsNil(o.Fingerprint) { + return nil, false + } + return o.Fingerprint, true +} + +// HasFingerprint returns a boolean if a field has been set. +func (o *Keypair) HasFingerprint() bool { + if o != nil && !IsNil(o.Fingerprint) { + return true + } + + return false +} + +// SetFingerprint gets a reference to the given string and assigns it to the Fingerprint field. +func (o *Keypair) SetFingerprint(v *string) { + o.Fingerprint = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Keypair) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *Keypair) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Keypair) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *Keypair) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Keypair) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *Keypair) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Keypair) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Keypair) SetName(v *string) { + o.Name = v +} + +// GetPublicKey returns the PublicKey field value +func (o *Keypair) GetPublicKey() *string { + if o == nil { + var ret *string + return ret + } + + return o.PublicKey +} + +// GetPublicKeyOk returns a tuple with the PublicKey field value +// and a boolean to check if the value has been set. +func (o *Keypair) GetPublicKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PublicKey, true +} + +// SetPublicKey sets field value +func (o *Keypair) SetPublicKey(v *string) { + o.PublicKey = v +} + +func (o Keypair) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Fingerprint) { + toSerialize["fingerprint"] = o.Fingerprint + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["publicKey"] = o.PublicKey + return toSerialize, nil +} + +type NullableKeypair struct { + value *Keypair + isSet bool +} + +func (v NullableKeypair) Get() *Keypair { + return v.value +} + +func (v *NullableKeypair) Set(val *Keypair) { + v.value = val + v.isSet = true +} + +func (v NullableKeypair) IsSet() bool { + return v.isSet +} + +func (v *NullableKeypair) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKeypair(val *Keypair) *NullableKeypair { + return &NullableKeypair{value: val, isSet: true} +} + +func (v NullableKeypair) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKeypair) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_network.go b/services/iaasalpha/model_network.go index a5c43540a..d95ce8fc7 100644 --- a/services/iaasalpha/model_network.go +++ b/services/iaasalpha/model_network.go @@ -11,13 +11,19 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the Network type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Network{} + // Network Object that represents a network. type Network struct { // Date-time when resource was created. - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + Gateway *NullableV1NetworkGateway `json:"gateway,omitempty"` + Gatewayv6 *NullableV1NetworkGateway `json:"gatewayv6,omitempty"` // Object that represents the labels of an object. Labels *map[string]interface{} `json:"labels,omitempty"` // REQUIRED @@ -41,3 +47,548 @@ type Network struct { // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` } + +type _Network Network + +// NewNetwork instantiates a new Network 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 NewNetwork(name *string, networkId *string, state *string) *Network { + this := Network{} + this.Name = name + this.NetworkId = networkId + this.State = state + return &this +} + +// NewNetworkWithDefaults instantiates a new Network 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 NewNetworkWithDefaults() *Network { + this := Network{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Network) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Network) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Network) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Network) GetGateway() *V1NetworkGateway { + if o == nil || IsNil(o.Gateway.Get()) { + var ret *V1NetworkGateway + return ret + } + return o.Gateway.Get() +} + +// GetGatewayOk returns a tuple with the Gateway 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 *Network) GetGatewayOk() (*V1NetworkGateway, bool) { + if o == nil { + return nil, false + } + return o.Gateway.Get(), o.Gateway.IsSet() +} + +// HasGateway returns a boolean if a field has been set. +func (o *Network) HasGateway() bool { + if o != nil && o.Gateway.IsSet() { + return true + } + + return false +} + +// SetGateway gets a reference to the given V1NetworkGateway and assigns it to the Gateway field. +func (o *Network) SetGateway(v *V1NetworkGateway) { + o.Gateway.Set(v) +} + +// SetGatewayNil sets the value for Gateway to be an explicit nil +func (o *Network) SetGatewayNil() { + o.Gateway.Set(nil) +} + +// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil +func (o *Network) UnsetGateway() { + o.Gateway.Unset() +} + +// GetGatewayv6 returns the Gatewayv6 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Network) GetGatewayv6() *V1NetworkGateway { + if o == nil || IsNil(o.Gatewayv6.Get()) { + var ret *V1NetworkGateway + return ret + } + return o.Gatewayv6.Get() +} + +// GetGatewayv6Ok returns a tuple with the Gatewayv6 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 *Network) GetGatewayv6Ok() (*V1NetworkGateway, bool) { + if o == nil { + return nil, false + } + return o.Gatewayv6.Get(), o.Gatewayv6.IsSet() +} + +// HasGatewayv6 returns a boolean if a field has been set. +func (o *Network) HasGatewayv6() bool { + if o != nil && o.Gatewayv6.IsSet() { + return true + } + + return false +} + +// SetGatewayv6 gets a reference to the given V1NetworkGateway and assigns it to the Gatewayv6 field. +func (o *Network) SetGatewayv6(v *V1NetworkGateway) { + o.Gatewayv6.Set(v) +} + +// SetGatewayv6Nil sets the value for Gatewayv6 to be an explicit nil +func (o *Network) SetGatewayv6Nil() { + o.Gatewayv6.Set(nil) +} + +// UnsetGatewayv6 ensures that no value is present for Gatewayv6, not even an explicit nil +func (o *Network) UnsetGatewayv6() { + o.Gatewayv6.Unset() +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Network) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *Network) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Network) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *Network) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *Network) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Network) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *Network) SetName(v *string) { + o.Name = v +} + +// GetNameservers returns the Nameservers field value if set, zero value otherwise. +func (o *Network) GetNameservers() *[]string { + if o == nil || IsNil(o.Nameservers) { + var ret *[]string + return ret + } + return o.Nameservers +} + +// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetNameserversOk() (*[]string, bool) { + if o == nil || IsNil(o.Nameservers) { + return nil, false + } + return o.Nameservers, true +} + +// HasNameservers returns a boolean if a field has been set. +func (o *Network) HasNameservers() bool { + if o != nil && !IsNil(o.Nameservers) { + return true + } + + return false +} + +// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field. +func (o *Network) SetNameservers(v *[]string) { + o.Nameservers = v +} + +// GetNameserversV6 returns the NameserversV6 field value if set, zero value otherwise. +func (o *Network) GetNameserversV6() *[]string { + if o == nil || IsNil(o.NameserversV6) { + var ret *[]string + return ret + } + return o.NameserversV6 +} + +// GetNameserversV6Ok returns a tuple with the NameserversV6 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetNameserversV6Ok() (*[]string, bool) { + if o == nil || IsNil(o.NameserversV6) { + return nil, false + } + return o.NameserversV6, true +} + +// HasNameserversV6 returns a boolean if a field has been set. +func (o *Network) HasNameserversV6() bool { + if o != nil && !IsNil(o.NameserversV6) { + return true + } + + return false +} + +// SetNameserversV6 gets a reference to the given []string and assigns it to the NameserversV6 field. +func (o *Network) SetNameserversV6(v *[]string) { + o.NameserversV6 = v +} + +// GetNetworkId returns the NetworkId field value +func (o *Network) GetNetworkId() *string { + if o == nil { + var ret *string + return ret + } + + return o.NetworkId +} + +// GetNetworkIdOk returns a tuple with the NetworkId field value +// and a boolean to check if the value has been set. +func (o *Network) GetNetworkIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NetworkId, true +} + +// SetNetworkId sets field value +func (o *Network) SetNetworkId(v *string) { + o.NetworkId = v +} + +// GetPrefixes returns the Prefixes field value if set, zero value otherwise. +func (o *Network) GetPrefixes() *[]string { + if o == nil || IsNil(o.Prefixes) { + var ret *[]string + return ret + } + return o.Prefixes +} + +// GetPrefixesOk returns a tuple with the Prefixes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetPrefixesOk() (*[]string, bool) { + if o == nil || IsNil(o.Prefixes) { + return nil, false + } + return o.Prefixes, true +} + +// HasPrefixes returns a boolean if a field has been set. +func (o *Network) HasPrefixes() bool { + if o != nil && !IsNil(o.Prefixes) { + return true + } + + return false +} + +// SetPrefixes gets a reference to the given []string and assigns it to the Prefixes field. +func (o *Network) SetPrefixes(v *[]string) { + o.Prefixes = v +} + +// GetPrefixesV6 returns the PrefixesV6 field value if set, zero value otherwise. +func (o *Network) GetPrefixesV6() *[]string { + if o == nil || IsNil(o.PrefixesV6) { + var ret *[]string + return ret + } + return o.PrefixesV6 +} + +// GetPrefixesV6Ok returns a tuple with the PrefixesV6 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetPrefixesV6Ok() (*[]string, bool) { + if o == nil || IsNil(o.PrefixesV6) { + return nil, false + } + return o.PrefixesV6, true +} + +// HasPrefixesV6 returns a boolean if a field has been set. +func (o *Network) HasPrefixesV6() bool { + if o != nil && !IsNil(o.PrefixesV6) { + return true + } + + return false +} + +// SetPrefixesV6 gets a reference to the given []string and assigns it to the PrefixesV6 field. +func (o *Network) SetPrefixesV6(v *[]string) { + o.PrefixesV6 = v +} + +// GetPublicIp returns the PublicIp field value if set, zero value otherwise. +func (o *Network) GetPublicIp() *string { + if o == nil || IsNil(o.PublicIp) { + var ret *string + return ret + } + return o.PublicIp +} + +// GetPublicIpOk returns a tuple with the PublicIp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetPublicIpOk() (*string, bool) { + if o == nil || IsNil(o.PublicIp) { + return nil, false + } + return o.PublicIp, true +} + +// HasPublicIp returns a boolean if a field has been set. +func (o *Network) HasPublicIp() bool { + if o != nil && !IsNil(o.PublicIp) { + return true + } + + return false +} + +// SetPublicIp gets a reference to the given string and assigns it to the PublicIp field. +func (o *Network) SetPublicIp(v *string) { + o.PublicIp = v +} + +// GetRouted returns the Routed field value if set, zero value otherwise. +func (o *Network) GetRouted() *bool { + if o == nil || IsNil(o.Routed) { + var ret *bool + return ret + } + return o.Routed +} + +// 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 *Network) GetRoutedOk() (*bool, bool) { + if o == nil || IsNil(o.Routed) { + return nil, false + } + return o.Routed, true +} + +// HasRouted returns a boolean if a field has been set. +func (o *Network) HasRouted() bool { + if o != nil && !IsNil(o.Routed) { + return true + } + + return false +} + +// SetRouted gets a reference to the given bool and assigns it to the Routed field. +func (o *Network) SetRouted(v *bool) { + o.Routed = v +} + +// GetState returns the State field value +func (o *Network) GetState() *string { + if o == nil { + var ret *string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *Network) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.State, true +} + +// SetState sets field value +func (o *Network) SetState(v *string) { + o.State = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Network) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Network) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Network) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +func (o Network) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if o.Gateway.IsSet() { + toSerialize["gateway"] = o.Gateway.Get() + } + if o.Gatewayv6.IsSet() { + toSerialize["gatewayv6"] = o.Gatewayv6.Get() + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + if !IsNil(o.Nameservers) { + toSerialize["nameservers"] = o.Nameservers + } + if !IsNil(o.NameserversV6) { + toSerialize["nameserversV6"] = o.NameserversV6 + } + toSerialize["networkId"] = o.NetworkId + if !IsNil(o.Prefixes) { + toSerialize["prefixes"] = o.Prefixes + } + if !IsNil(o.PrefixesV6) { + toSerialize["prefixesV6"] = o.PrefixesV6 + } + if !IsNil(o.PublicIp) { + toSerialize["publicIp"] = o.PublicIp + } + if !IsNil(o.Routed) { + toSerialize["routed"] = o.Routed + } + toSerialize["state"] = o.State + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableNetwork struct { + value *Network + isSet bool +} + +func (v NullableNetwork) Get() *Network { + return v.value +} + +func (v *NullableNetwork) Set(val *Network) { + v.value = val + v.isSet = true +} + +func (v NullableNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetwork(val *Network) *NullableNetwork { + return &NullableNetwork{value: val, isSet: true} +} + +func (v NullableNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_network_area.go b/services/iaasalpha/model_network_area.go index 668082c01..a37dfac1e 100644 --- a/services/iaasalpha/model_network_area.go +++ b/services/iaasalpha/model_network_area.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the NetworkArea type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkArea{} + // NetworkArea Object that represents a network area. type NetworkArea struct { // Universally Unique Identifier (UUID). @@ -35,3 +39,307 @@ type NetworkArea struct { // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` } + +type _NetworkArea NetworkArea + +// NewNetworkArea instantiates a new NetworkArea 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 NewNetworkArea(areaId *string, name *string, projectCount *int64, state *string) *NetworkArea { + this := NetworkArea{} + this.AreaId = areaId + this.Name = name + this.ProjectCount = projectCount + this.State = state + return &this +} + +// NewNetworkAreaWithDefaults instantiates a new NetworkArea 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 NewNetworkAreaWithDefaults() *NetworkArea { + this := NetworkArea{} + return &this +} + +// GetAreaId returns the AreaId field value +func (o *NetworkArea) GetAreaId() *string { + if o == nil { + var ret *string + return ret + } + + return o.AreaId +} + +// GetAreaIdOk returns a tuple with the AreaId field value +// and a boolean to check if the value has been set. +func (o *NetworkArea) GetAreaIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AreaId, true +} + +// SetAreaId sets field value +func (o *NetworkArea) SetAreaId(v *string) { + o.AreaId = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *NetworkArea) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkArea) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *NetworkArea) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *NetworkArea) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. +func (o *NetworkArea) GetIpv4() *NetworkAreaIPv4 { + if o == nil || IsNil(o.Ipv4) { + var ret *NetworkAreaIPv4 + return ret + } + return o.Ipv4 +} + +// 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 *NetworkArea) GetIpv4Ok() (*NetworkAreaIPv4, bool) { + if o == nil || IsNil(o.Ipv4) { + return nil, false + } + return o.Ipv4, true +} + +// HasIpv4 returns a boolean if a field has been set. +func (o *NetworkArea) HasIpv4() bool { + if o != nil && !IsNil(o.Ipv4) { + return true + } + + return false +} + +// SetIpv4 gets a reference to the given NetworkAreaIPv4 and assigns it to the Ipv4 field. +func (o *NetworkArea) SetIpv4(v *NetworkAreaIPv4) { + o.Ipv4 = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *NetworkArea) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *NetworkArea) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *NetworkArea) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *NetworkArea) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *NetworkArea) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NetworkArea) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *NetworkArea) SetName(v *string) { + o.Name = v +} + +// GetProjectCount returns the ProjectCount field value +func (o *NetworkArea) GetProjectCount() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.ProjectCount +} + +// GetProjectCountOk returns a tuple with the ProjectCount field value +// and a boolean to check if the value has been set. +func (o *NetworkArea) GetProjectCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.ProjectCount, true +} + +// SetProjectCount sets field value +func (o *NetworkArea) SetProjectCount(v *int64) { + o.ProjectCount = v +} + +// GetState returns the State field value +func (o *NetworkArea) GetState() *string { + if o == nil { + var ret *string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *NetworkArea) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.State, true +} + +// SetState sets field value +func (o *NetworkArea) SetState(v *string) { + o.State = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *NetworkArea) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkArea) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *NetworkArea) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *NetworkArea) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +func (o NetworkArea) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["areaId"] = o.AreaId + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Ipv4) { + toSerialize["ipv4"] = o.Ipv4 + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["projectCount"] = o.ProjectCount + toSerialize["state"] = o.State + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableNetworkArea struct { + value *NetworkArea + isSet bool +} + +func (v NullableNetworkArea) Get() *NetworkArea { + return v.value +} + +func (v *NullableNetworkArea) Set(val *NetworkArea) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkArea) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkArea) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkArea(val *NetworkArea) *NullableNetworkArea { + return &NullableNetworkArea{value: val, isSet: true} +} + +func (v NullableNetworkArea) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkArea) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_network_area_ipv4.go b/services/iaasalpha/model_network_area_ipv4.go index 79cba384d..6aaf4e7ce 100644 --- a/services/iaasalpha/model_network_area_ipv4.go +++ b/services/iaasalpha/model_network_area_ipv4.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the NetworkAreaIPv4 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkAreaIPv4{} + // NetworkAreaIPv4 The IPv4 properties of a network area. type NetworkAreaIPv4 struct { // A list containing DNS Servers/Nameservers for IPv4. @@ -27,3 +34,318 @@ type NetworkAreaIPv4 struct { // The minimal prefix length for networks in the network area. MinPrefixLen *int64 `json:"minPrefixLen,omitempty"` } + +// NewNetworkAreaIPv4 instantiates a new NetworkAreaIPv4 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 NewNetworkAreaIPv4() *NetworkAreaIPv4 { + this := NetworkAreaIPv4{} + var defaultPrefixLen int64 = 25 + this.DefaultPrefixLen = &defaultPrefixLen + var maxPrefixLen int64 = 29 + this.MaxPrefixLen = &maxPrefixLen + var minPrefixLen int64 = 24 + this.MinPrefixLen = &minPrefixLen + return &this +} + +// NewNetworkAreaIPv4WithDefaults instantiates a new NetworkAreaIPv4 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 NewNetworkAreaIPv4WithDefaults() *NetworkAreaIPv4 { + this := NetworkAreaIPv4{} + var defaultPrefixLen int64 = 25 + this.DefaultPrefixLen = &defaultPrefixLen + var maxPrefixLen int64 = 29 + this.MaxPrefixLen = &maxPrefixLen + var minPrefixLen int64 = 24 + this.MinPrefixLen = &minPrefixLen + return &this +} + +// GetDefaultNameservers returns the DefaultNameservers field value if set, zero value otherwise. +func (o *NetworkAreaIPv4) GetDefaultNameservers() *[]string { + if o == nil || IsNil(o.DefaultNameservers) { + var ret *[]string + return ret + } + return o.DefaultNameservers +} + +// GetDefaultNameserversOk returns a tuple with the DefaultNameservers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkAreaIPv4) GetDefaultNameserversOk() (*[]string, bool) { + if o == nil || IsNil(o.DefaultNameservers) { + return nil, false + } + return o.DefaultNameservers, true +} + +// HasDefaultNameservers returns a boolean if a field has been set. +func (o *NetworkAreaIPv4) HasDefaultNameservers() bool { + if o != nil && !IsNil(o.DefaultNameservers) { + return true + } + + return false +} + +// SetDefaultNameservers gets a reference to the given []string and assigns it to the DefaultNameservers field. +func (o *NetworkAreaIPv4) SetDefaultNameservers(v *[]string) { + o.DefaultNameservers = v +} + +// GetNetworkRanges returns the NetworkRanges field value if set, zero value otherwise. +func (o *NetworkAreaIPv4) GetNetworkRanges() *[]NetworkRange { + if o == nil || IsNil(o.NetworkRanges) { + var ret *[]NetworkRange + return ret + } + return o.NetworkRanges +} + +// GetNetworkRangesOk returns a tuple with the NetworkRanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkAreaIPv4) GetNetworkRangesOk() (*[]NetworkRange, bool) { + if o == nil || IsNil(o.NetworkRanges) { + return nil, false + } + return o.NetworkRanges, true +} + +// HasNetworkRanges returns a boolean if a field has been set. +func (o *NetworkAreaIPv4) HasNetworkRanges() bool { + if o != nil && !IsNil(o.NetworkRanges) { + return true + } + + return false +} + +// SetNetworkRanges gets a reference to the given []NetworkRange and assigns it to the NetworkRanges field. +func (o *NetworkAreaIPv4) SetNetworkRanges(v *[]NetworkRange) { + o.NetworkRanges = v +} + +// GetRoutes returns the Routes field value if set, zero value otherwise. +func (o *NetworkAreaIPv4) GetRoutes() *[]Route { + if o == nil || IsNil(o.Routes) { + var ret *[]Route + return ret + } + return o.Routes +} + +// GetRoutesOk returns a tuple with the Routes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkAreaIPv4) GetRoutesOk() (*[]Route, bool) { + if o == nil || IsNil(o.Routes) { + return nil, false + } + return o.Routes, true +} + +// HasRoutes returns a boolean if a field has been set. +func (o *NetworkAreaIPv4) HasRoutes() bool { + if o != nil && !IsNil(o.Routes) { + return true + } + + return false +} + +// SetRoutes gets a reference to the given []Route and assigns it to the Routes field. +func (o *NetworkAreaIPv4) SetRoutes(v *[]Route) { + o.Routes = v +} + +// GetTransferNetwork returns the TransferNetwork field value if set, zero value otherwise. +func (o *NetworkAreaIPv4) GetTransferNetwork() *string { + if o == nil || IsNil(o.TransferNetwork) { + var ret *string + return ret + } + return o.TransferNetwork +} + +// GetTransferNetworkOk returns a tuple with the TransferNetwork field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkAreaIPv4) GetTransferNetworkOk() (*string, bool) { + if o == nil || IsNil(o.TransferNetwork) { + return nil, false + } + return o.TransferNetwork, true +} + +// HasTransferNetwork returns a boolean if a field has been set. +func (o *NetworkAreaIPv4) HasTransferNetwork() bool { + if o != nil && !IsNil(o.TransferNetwork) { + return true + } + + return false +} + +// SetTransferNetwork gets a reference to the given string and assigns it to the TransferNetwork field. +func (o *NetworkAreaIPv4) SetTransferNetwork(v *string) { + o.TransferNetwork = v +} + +// GetDefaultPrefixLen returns the DefaultPrefixLen field value if set, zero value otherwise. +func (o *NetworkAreaIPv4) GetDefaultPrefixLen() *int64 { + if o == nil || IsNil(o.DefaultPrefixLen) { + var ret *int64 + return ret + } + return o.DefaultPrefixLen +} + +// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkAreaIPv4) GetDefaultPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.DefaultPrefixLen) { + return nil, false + } + return o.DefaultPrefixLen, true +} + +// HasDefaultPrefixLen returns a boolean if a field has been set. +func (o *NetworkAreaIPv4) HasDefaultPrefixLen() bool { + if o != nil && !IsNil(o.DefaultPrefixLen) { + return true + } + + return false +} + +// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. +func (o *NetworkAreaIPv4) SetDefaultPrefixLen(v *int64) { + o.DefaultPrefixLen = v +} + +// GetMaxPrefixLen returns the MaxPrefixLen field value if set, zero value otherwise. +func (o *NetworkAreaIPv4) GetMaxPrefixLen() *int64 { + if o == nil || IsNil(o.MaxPrefixLen) { + var ret *int64 + return ret + } + return o.MaxPrefixLen +} + +// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkAreaIPv4) GetMaxPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.MaxPrefixLen) { + return nil, false + } + return o.MaxPrefixLen, true +} + +// HasMaxPrefixLen returns a boolean if a field has been set. +func (o *NetworkAreaIPv4) HasMaxPrefixLen() bool { + if o != nil && !IsNil(o.MaxPrefixLen) { + return true + } + + return false +} + +// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. +func (o *NetworkAreaIPv4) SetMaxPrefixLen(v *int64) { + o.MaxPrefixLen = v +} + +// GetMinPrefixLen returns the MinPrefixLen field value if set, zero value otherwise. +func (o *NetworkAreaIPv4) GetMinPrefixLen() *int64 { + if o == nil || IsNil(o.MinPrefixLen) { + var ret *int64 + return ret + } + return o.MinPrefixLen +} + +// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkAreaIPv4) GetMinPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.MinPrefixLen) { + return nil, false + } + return o.MinPrefixLen, true +} + +// HasMinPrefixLen returns a boolean if a field has been set. +func (o *NetworkAreaIPv4) HasMinPrefixLen() bool { + if o != nil && !IsNil(o.MinPrefixLen) { + return true + } + + return false +} + +// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. +func (o *NetworkAreaIPv4) SetMinPrefixLen(v *int64) { + o.MinPrefixLen = v +} + +func (o NetworkAreaIPv4) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultNameservers) { + toSerialize["defaultNameservers"] = o.DefaultNameservers + } + if !IsNil(o.NetworkRanges) { + toSerialize["networkRanges"] = o.NetworkRanges + } + if !IsNil(o.Routes) { + toSerialize["routes"] = o.Routes + } + if !IsNil(o.TransferNetwork) { + toSerialize["transferNetwork"] = o.TransferNetwork + } + if !IsNil(o.DefaultPrefixLen) { + toSerialize["defaultPrefixLen"] = o.DefaultPrefixLen + } + if !IsNil(o.MaxPrefixLen) { + toSerialize["maxPrefixLen"] = o.MaxPrefixLen + } + if !IsNil(o.MinPrefixLen) { + toSerialize["minPrefixLen"] = o.MinPrefixLen + } + return toSerialize, nil +} + +type NullableNetworkAreaIPv4 struct { + value *NetworkAreaIPv4 + isSet bool +} + +func (v NullableNetworkAreaIPv4) Get() *NetworkAreaIPv4 { + return v.value +} + +func (v *NullableNetworkAreaIPv4) Set(val *NetworkAreaIPv4) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkAreaIPv4) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkAreaIPv4) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkAreaIPv4(val *NetworkAreaIPv4) *NullableNetworkAreaIPv4 { + return &NullableNetworkAreaIPv4{value: val, isSet: true} +} + +func (v NullableNetworkAreaIPv4) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkAreaIPv4) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_network_area_list_response.go b/services/iaasalpha/model_network_area_list_response.go index f0d71b0f6..d57b68487 100644 --- a/services/iaasalpha/model_network_area_list_response.go +++ b/services/iaasalpha/model_network_area_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the NetworkAreaListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkAreaListResponse{} + // NetworkAreaListResponse Network area list response. type NetworkAreaListResponse struct { // A list of network areas. // REQUIRED Items *[]NetworkArea `json:"items"` } + +type _NetworkAreaListResponse NetworkAreaListResponse + +// NewNetworkAreaListResponse instantiates a new NetworkAreaListResponse 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 NewNetworkAreaListResponse(items *[]NetworkArea) *NetworkAreaListResponse { + this := NetworkAreaListResponse{} + this.Items = items + return &this +} + +// NewNetworkAreaListResponseWithDefaults instantiates a new NetworkAreaListResponse 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 NewNetworkAreaListResponseWithDefaults() *NetworkAreaListResponse { + this := NetworkAreaListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *NetworkAreaListResponse) GetItems() *[]NetworkArea { + if o == nil { + var ret *[]NetworkArea + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *NetworkAreaListResponse) GetItemsOk() (*[]NetworkArea, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *NetworkAreaListResponse) SetItems(v *[]NetworkArea) { + o.Items = v +} + +func (o NetworkAreaListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableNetworkAreaListResponse struct { + value *NetworkAreaListResponse + isSet bool +} + +func (v NullableNetworkAreaListResponse) Get() *NetworkAreaListResponse { + return v.value +} + +func (v *NullableNetworkAreaListResponse) Set(val *NetworkAreaListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkAreaListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkAreaListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkAreaListResponse(val *NetworkAreaListResponse) *NullableNetworkAreaListResponse { + return &NullableNetworkAreaListResponse{value: val, isSet: true} +} + +func (v NullableNetworkAreaListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkAreaListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_network_list_response.go b/services/iaasalpha/model_network_list_response.go index c9fc47f9a..5df8f90a8 100644 --- a/services/iaasalpha/model_network_list_response.go +++ b/services/iaasalpha/model_network_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the NetworkListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkListResponse{} + // NetworkListResponse Network list response. type NetworkListResponse struct { // A list of networks. // REQUIRED Items *[]Network `json:"items"` } + +type _NetworkListResponse NetworkListResponse + +// NewNetworkListResponse instantiates a new NetworkListResponse 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 NewNetworkListResponse(items *[]Network) *NetworkListResponse { + this := NetworkListResponse{} + this.Items = items + return &this +} + +// NewNetworkListResponseWithDefaults instantiates a new NetworkListResponse 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 NewNetworkListResponseWithDefaults() *NetworkListResponse { + this := NetworkListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *NetworkListResponse) GetItems() *[]Network { + if o == nil { + var ret *[]Network + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *NetworkListResponse) GetItemsOk() (*[]Network, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *NetworkListResponse) SetItems(v *[]Network) { + o.Items = v +} + +func (o NetworkListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableNetworkListResponse struct { + value *NetworkListResponse + isSet bool +} + +func (v NullableNetworkListResponse) Get() *NetworkListResponse { + return v.value +} + +func (v *NullableNetworkListResponse) Set(val *NetworkListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkListResponse(val *NetworkListResponse) *NullableNetworkListResponse { + return &NullableNetworkListResponse{value: val, isSet: true} +} + +func (v NullableNetworkListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_network_range.go b/services/iaasalpha/model_network_range.go index 06ea0a305..17ad61970 100644 --- a/services/iaasalpha/model_network_range.go +++ b/services/iaasalpha/model_network_range.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the NetworkRange type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkRange{} + // NetworkRange Object that represents a network range. type NetworkRange struct { // Date-time when resource was created. @@ -26,3 +30,194 @@ type NetworkRange struct { // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` } + +type _NetworkRange NetworkRange + +// NewNetworkRange instantiates a new NetworkRange 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 NewNetworkRange(prefix *string) *NetworkRange { + this := NetworkRange{} + this.Prefix = prefix + return &this +} + +// NewNetworkRangeWithDefaults instantiates a new NetworkRange 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 NewNetworkRangeWithDefaults() *NetworkRange { + this := NetworkRange{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *NetworkRange) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkRange) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *NetworkRange) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *NetworkRange) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetNetworkRangeId returns the NetworkRangeId field value if set, zero value otherwise. +func (o *NetworkRange) GetNetworkRangeId() *string { + if o == nil || IsNil(o.NetworkRangeId) { + var ret *string + return ret + } + return o.NetworkRangeId +} + +// GetNetworkRangeIdOk returns a tuple with the NetworkRangeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkRange) GetNetworkRangeIdOk() (*string, bool) { + if o == nil || IsNil(o.NetworkRangeId) { + return nil, false + } + return o.NetworkRangeId, true +} + +// HasNetworkRangeId returns a boolean if a field has been set. +func (o *NetworkRange) HasNetworkRangeId() bool { + if o != nil && !IsNil(o.NetworkRangeId) { + return true + } + + return false +} + +// SetNetworkRangeId gets a reference to the given string and assigns it to the NetworkRangeId field. +func (o *NetworkRange) SetNetworkRangeId(v *string) { + o.NetworkRangeId = v +} + +// GetPrefix returns the Prefix field value +func (o *NetworkRange) GetPrefix() *string { + if o == nil { + var ret *string + return ret + } + + return o.Prefix +} + +// GetPrefixOk returns a tuple with the Prefix field value +// and a boolean to check if the value has been set. +func (o *NetworkRange) GetPrefixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Prefix, true +} + +// SetPrefix sets field value +func (o *NetworkRange) SetPrefix(v *string) { + o.Prefix = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *NetworkRange) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkRange) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *NetworkRange) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *NetworkRange) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +func (o NetworkRange) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.NetworkRangeId) { + toSerialize["networkRangeId"] = o.NetworkRangeId + } + toSerialize["prefix"] = o.Prefix + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableNetworkRange struct { + value *NetworkRange + isSet bool +} + +func (v NullableNetworkRange) Get() *NetworkRange { + return v.value +} + +func (v *NullableNetworkRange) Set(val *NetworkRange) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkRange) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkRange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkRange(val *NetworkRange) *NullableNetworkRange { + return &NullableNetworkRange{value: val, isSet: true} +} + +func (v NullableNetworkRange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkRange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_nic.go b/services/iaasalpha/model_nic.go index e63a308c4..5a39fa1e5 100644 --- a/services/iaasalpha/model_nic.go +++ b/services/iaasalpha/model_nic.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the NIC type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NIC{} + // NIC Object that represents a network interface. type NIC struct { // A list of IPs or CIDR notations. @@ -37,3 +44,520 @@ type NIC struct { Status *string `json:"status,omitempty"` Type *string `json:"type,omitempty"` } + +// NewNIC instantiates a new NIC 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 NewNIC() *NIC { + this := NIC{} + var nicSecurity bool = true + this.NicSecurity = &nicSecurity + return &this +} + +// NewNICWithDefaults instantiates a new NIC 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 NewNICWithDefaults() *NIC { + this := NIC{} + var nicSecurity bool = true + this.NicSecurity = &nicSecurity + return &this +} + +// GetAllowedAddresses returns the AllowedAddresses field value if set, zero value otherwise. +func (o *NIC) GetAllowedAddresses() *[]AllowedAddressesInner { + if o == nil || IsNil(o.AllowedAddresses) { + var ret *[]AllowedAddressesInner + return ret + } + return o.AllowedAddresses +} + +// 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 *NIC) GetAllowedAddressesOk() (*[]AllowedAddressesInner, bool) { + if o == nil || IsNil(o.AllowedAddresses) { + return nil, false + } + return o.AllowedAddresses, true +} + +// HasAllowedAddresses returns a boolean if a field has been set. +func (o *NIC) HasAllowedAddresses() bool { + if o != nil && !IsNil(o.AllowedAddresses) { + return true + } + + return false +} + +// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field. +func (o *NIC) SetAllowedAddresses(v *[]AllowedAddressesInner) { + o.AllowedAddresses = v +} + +// GetDevice returns the Device field value if set, zero value otherwise. +func (o *NIC) GetDevice() *string { + if o == nil || IsNil(o.Device) { + var ret *string + return ret + } + return o.Device +} + +// 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 *NIC) GetDeviceOk() (*string, bool) { + if o == nil || IsNil(o.Device) { + return nil, false + } + return o.Device, true +} + +// HasDevice returns a boolean if a field has been set. +func (o *NIC) HasDevice() bool { + if o != nil && !IsNil(o.Device) { + return true + } + + return false +} + +// SetDevice gets a reference to the given string and assigns it to the Device field. +func (o *NIC) SetDevice(v *string) { + o.Device = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NIC) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *NIC) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *NIC) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *NIC) SetId(v *string) { + o.Id = v +} + +// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. +func (o *NIC) GetIpv4() *string { + if o == nil || IsNil(o.Ipv4) { + var ret *string + return ret + } + return o.Ipv4 +} + +// 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 *NIC) GetIpv4Ok() (*string, bool) { + if o == nil || IsNil(o.Ipv4) { + return nil, false + } + return o.Ipv4, true +} + +// HasIpv4 returns a boolean if a field has been set. +func (o *NIC) HasIpv4() bool { + if o != nil && !IsNil(o.Ipv4) { + return true + } + + return false +} + +// SetIpv4 gets a reference to the given string and assigns it to the Ipv4 field. +func (o *NIC) SetIpv4(v *string) { + o.Ipv4 = v +} + +// GetIpv6 returns the Ipv6 field value if set, zero value otherwise. +func (o *NIC) GetIpv6() *string { + if o == nil || IsNil(o.Ipv6) { + var ret *string + return ret + } + return o.Ipv6 +} + +// 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 *NIC) GetIpv6Ok() (*string, bool) { + if o == nil || IsNil(o.Ipv6) { + return nil, false + } + return o.Ipv6, true +} + +// HasIpv6 returns a boolean if a field has been set. +func (o *NIC) HasIpv6() bool { + if o != nil && !IsNil(o.Ipv6) { + return true + } + + return false +} + +// SetIpv6 gets a reference to the given string and assigns it to the Ipv6 field. +func (o *NIC) SetIpv6(v *string) { + o.Ipv6 = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *NIC) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *NIC) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *NIC) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *NIC) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetMac returns the Mac field value if set, zero value otherwise. +func (o *NIC) GetMac() *string { + if o == nil || IsNil(o.Mac) { + var ret *string + return ret + } + return o.Mac +} + +// 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 *NIC) GetMacOk() (*string, bool) { + if o == nil || IsNil(o.Mac) { + return nil, false + } + return o.Mac, true +} + +// HasMac returns a boolean if a field has been set. +func (o *NIC) HasMac() bool { + if o != nil && !IsNil(o.Mac) { + return true + } + + return false +} + +// SetMac gets a reference to the given string and assigns it to the Mac field. +func (o *NIC) SetMac(v *string) { + o.Mac = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NIC) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *NIC) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *NIC) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *NIC) SetName(v *string) { + o.Name = v +} + +// GetNetworkId returns the NetworkId field value if set, zero value otherwise. +func (o *NIC) GetNetworkId() *string { + if o == nil || IsNil(o.NetworkId) { + var ret *string + return ret + } + return o.NetworkId +} + +// 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 *NIC) GetNetworkIdOk() (*string, bool) { + if o == nil || IsNil(o.NetworkId) { + return nil, false + } + return o.NetworkId, true +} + +// HasNetworkId returns a boolean if a field has been set. +func (o *NIC) HasNetworkId() bool { + if o != nil && !IsNil(o.NetworkId) { + return true + } + + return false +} + +// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field. +func (o *NIC) SetNetworkId(v *string) { + o.NetworkId = v +} + +// GetNicSecurity returns the NicSecurity field value if set, zero value otherwise. +func (o *NIC) GetNicSecurity() *bool { + if o == nil || IsNil(o.NicSecurity) { + var ret *bool + return ret + } + return o.NicSecurity +} + +// 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 *NIC) GetNicSecurityOk() (*bool, bool) { + if o == nil || IsNil(o.NicSecurity) { + return nil, false + } + return o.NicSecurity, true +} + +// HasNicSecurity returns a boolean if a field has been set. +func (o *NIC) HasNicSecurity() bool { + if o != nil && !IsNil(o.NicSecurity) { + return true + } + + return false +} + +// SetNicSecurity gets a reference to the given bool and assigns it to the NicSecurity field. +func (o *NIC) SetNicSecurity(v *bool) { + o.NicSecurity = v +} + +// GetSecurityGroups returns the SecurityGroups field value if set, zero value otherwise. +func (o *NIC) GetSecurityGroups() *[]string { + if o == nil || IsNil(o.SecurityGroups) { + var ret *[]string + return ret + } + return o.SecurityGroups +} + +// 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 *NIC) GetSecurityGroupsOk() (*[]string, bool) { + if o == nil || IsNil(o.SecurityGroups) { + return nil, false + } + return o.SecurityGroups, true +} + +// HasSecurityGroups returns a boolean if a field has been set. +func (o *NIC) HasSecurityGroups() bool { + if o != nil && !IsNil(o.SecurityGroups) { + return true + } + + return false +} + +// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. +func (o *NIC) SetSecurityGroups(v *[]string) { + o.SecurityGroups = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *NIC) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// 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 *NIC) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *NIC) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *NIC) SetStatus(v *string) { + o.Status = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *NIC) GetType() *string { + if o == nil || IsNil(o.Type) { + var ret *string + return ret + } + return o.Type +} + +// 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 *NIC) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *NIC) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *NIC) SetType(v *string) { + o.Type = v +} + +func (o NIC) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowedAddresses) { + toSerialize["allowedAddresses"] = o.AllowedAddresses + } + if !IsNil(o.Device) { + toSerialize["device"] = o.Device + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Ipv4) { + toSerialize["ipv4"] = o.Ipv4 + } + if !IsNil(o.Ipv6) { + toSerialize["ipv6"] = o.Ipv6 + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Mac) { + toSerialize["mac"] = o.Mac + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.NetworkId) { + toSerialize["networkId"] = o.NetworkId + } + if !IsNil(o.NicSecurity) { + toSerialize["nicSecurity"] = o.NicSecurity + } + if !IsNil(o.SecurityGroups) { + toSerialize["securityGroups"] = o.SecurityGroups + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableNIC struct { + value *NIC + isSet bool +} + +func (v NullableNIC) Get() *NIC { + return v.value +} + +func (v *NullableNIC) Set(val *NIC) { + v.value = val + v.isSet = true +} + +func (v NullableNIC) IsSet() bool { + return v.isSet +} + +func (v *NullableNIC) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNIC(val *NIC) *NullableNIC { + return &NullableNIC{value: val, isSet: true} +} + +func (v NullableNIC) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNIC) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_nic_list_response.go b/services/iaasalpha/model_nic_list_response.go index 7e311268d..fb1da78f1 100644 --- a/services/iaasalpha/model_nic_list_response.go +++ b/services/iaasalpha/model_nic_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the NICListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NICListResponse{} + // NICListResponse NIC list response. type NICListResponse struct { // A list of network interfaces. // REQUIRED Items *[]NIC `json:"items"` } + +type _NICListResponse NICListResponse + +// NewNICListResponse instantiates a new NICListResponse 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 NewNICListResponse(items *[]NIC) *NICListResponse { + this := NICListResponse{} + this.Items = items + return &this +} + +// NewNICListResponseWithDefaults instantiates a new NICListResponse 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 NewNICListResponseWithDefaults() *NICListResponse { + this := NICListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *NICListResponse) GetItems() *[]NIC { + if o == nil { + var ret *[]NIC + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *NICListResponse) GetItemsOk() (*[]NIC, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *NICListResponse) SetItems(v *[]NIC) { + o.Items = v +} + +func (o NICListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableNICListResponse struct { + value *NICListResponse + isSet bool +} + +func (v NullableNICListResponse) Get() *NICListResponse { + return v.value +} + +func (v *NullableNICListResponse) Set(val *NICListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNICListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNICListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNICListResponse(val *NICListResponse) *NullableNICListResponse { + return &NullableNICListResponse{value: val, isSet: true} +} + +func (v NullableNICListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNICListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_port_range.go b/services/iaasalpha/model_port_range.go index a3885652e..5916f9f2e 100644 --- a/services/iaasalpha/model_port_range.go +++ b/services/iaasalpha/model_port_range.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the PortRange type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PortRange{} + // PortRange Object that represents a range of ports. type PortRange struct { // The maximum port number. Should be greater or equal to the minimum. @@ -19,3 +26,115 @@ type PortRange struct { // REQUIRED Min *int64 `json:"min"` } + +type _PortRange PortRange + +// NewPortRange instantiates a new PortRange 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 NewPortRange(max *int64, min *int64) *PortRange { + this := PortRange{} + this.Max = max + this.Min = min + return &this +} + +// NewPortRangeWithDefaults instantiates a new PortRange 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 NewPortRangeWithDefaults() *PortRange { + this := PortRange{} + return &this +} + +// GetMax returns the Max field value +func (o *PortRange) GetMax() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Max +} + +// GetMaxOk returns a tuple with the Max field value +// and a boolean to check if the value has been set. +func (o *PortRange) GetMaxOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Max, true +} + +// SetMax sets field value +func (o *PortRange) SetMax(v *int64) { + o.Max = v +} + +// GetMin returns the Min field value +func (o *PortRange) GetMin() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Min +} + +// GetMinOk returns a tuple with the Min field value +// and a boolean to check if the value has been set. +func (o *PortRange) GetMinOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Min, true +} + +// SetMin sets field value +func (o *PortRange) SetMin(v *int64) { + o.Min = v +} + +func (o PortRange) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["max"] = o.Max + toSerialize["min"] = o.Min + return toSerialize, nil +} + +type NullablePortRange struct { + value *PortRange + isSet bool +} + +func (v NullablePortRange) Get() *PortRange { + return v.value +} + +func (v *NullablePortRange) Set(val *PortRange) { + v.value = val + v.isSet = true +} + +func (v NullablePortRange) IsSet() bool { + return v.isSet +} + +func (v *NullablePortRange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePortRange(val *PortRange) *NullablePortRange { + return &NullablePortRange{value: val, isSet: true} +} + +func (v NullablePortRange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePortRange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_project.go b/services/iaasalpha/model_project.go index 5a1b5b5a1..b31b50182 100644 --- a/services/iaasalpha/model_project.go +++ b/services/iaasalpha/model_project.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the Project type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Project{} + // Project Object that represents a STACKIT project. type Project struct { // REQUIRED @@ -32,3 +36,281 @@ type Project struct { // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` } + +type _Project Project + +// NewProject instantiates a new Project 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 NewProject(areaId *AreaId, projectId *string, state *string) *Project { + this := Project{} + this.AreaId = areaId + this.ProjectId = projectId + this.State = state + return &this +} + +// NewProjectWithDefaults instantiates a new Project 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 NewProjectWithDefaults() *Project { + this := Project{} + return &this +} + +// GetAreaId returns the AreaId field value +func (o *Project) GetAreaId() *AreaId { + if o == nil { + var ret *AreaId + return ret + } + + return o.AreaId +} + +// GetAreaIdOk returns a tuple with the AreaId field value +// and a boolean to check if the value has been set. +func (o *Project) GetAreaIdOk() (*AreaId, bool) { + if o == nil { + return nil, false + } + return o.AreaId, true +} + +// SetAreaId sets field value +func (o *Project) SetAreaId(v *AreaId) { + o.AreaId = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Project) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Project) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Project) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetInternetAccess returns the InternetAccess field value if set, zero value otherwise. +func (o *Project) GetInternetAccess() *bool { + if o == nil || IsNil(o.InternetAccess) { + var ret *bool + return ret + } + return o.InternetAccess +} + +// GetInternetAccessOk returns a tuple with the InternetAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetInternetAccessOk() (*bool, bool) { + if o == nil || IsNil(o.InternetAccess) { + return nil, false + } + return o.InternetAccess, true +} + +// HasInternetAccess returns a boolean if a field has been set. +func (o *Project) HasInternetAccess() bool { + if o != nil && !IsNil(o.InternetAccess) { + return true + } + + return false +} + +// SetInternetAccess gets a reference to the given bool and assigns it to the InternetAccess field. +func (o *Project) SetInternetAccess(v *bool) { + o.InternetAccess = v +} + +// GetOpenstackProjectId returns the OpenstackProjectId field value if set, zero value otherwise. +func (o *Project) GetOpenstackProjectId() *string { + if o == nil || IsNil(o.OpenstackProjectId) { + var ret *string + return ret + } + return o.OpenstackProjectId +} + +// GetOpenstackProjectIdOk returns a tuple with the OpenstackProjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetOpenstackProjectIdOk() (*string, bool) { + if o == nil || IsNil(o.OpenstackProjectId) { + return nil, false + } + return o.OpenstackProjectId, true +} + +// HasOpenstackProjectId returns a boolean if a field has been set. +func (o *Project) HasOpenstackProjectId() bool { + if o != nil && !IsNil(o.OpenstackProjectId) { + return true + } + + return false +} + +// SetOpenstackProjectId gets a reference to the given string and assigns it to the OpenstackProjectId field. +func (o *Project) SetOpenstackProjectId(v *string) { + o.OpenstackProjectId = v +} + +// GetProjectId returns the ProjectId field value +func (o *Project) GetProjectId() *string { + if o == nil { + var ret *string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *Project) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProjectId, true +} + +// SetProjectId sets field value +func (o *Project) SetProjectId(v *string) { + o.ProjectId = v +} + +// GetState returns the State field value +func (o *Project) GetState() *string { + if o == nil { + var ret *string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *Project) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.State, true +} + +// SetState sets field value +func (o *Project) SetState(v *string) { + o.State = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Project) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Project) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Project) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Project) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +func (o Project) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["areaId"] = o.AreaId + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.InternetAccess) { + toSerialize["internetAccess"] = o.InternetAccess + } + if !IsNil(o.OpenstackProjectId) { + toSerialize["openstackProjectId"] = o.OpenstackProjectId + } + toSerialize["projectId"] = o.ProjectId + toSerialize["state"] = o.State + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableProject struct { + value *Project + isSet bool +} + +func (v NullableProject) Get() *Project { + return v.value +} + +func (v *NullableProject) Set(val *Project) { + v.value = val + v.isSet = true +} + +func (v NullableProject) IsSet() bool { + return v.isSet +} + +func (v *NullableProject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProject(val *Project) *NullableProject { + return &NullableProject{value: val, isSet: true} +} + +func (v NullableProject) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProject) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_project_list_response.go b/services/iaasalpha/model_project_list_response.go index 1efec763b..b31819009 100644 --- a/services/iaasalpha/model_project_list_response.go +++ b/services/iaasalpha/model_project_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the ProjectListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectListResponse{} + // ProjectListResponse Project list response. type ProjectListResponse struct { // A list of STACKIT projects. // REQUIRED Items *[]string `json:"items"` } + +type _ProjectListResponse ProjectListResponse + +// NewProjectListResponse instantiates a new ProjectListResponse 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 NewProjectListResponse(items *[]string) *ProjectListResponse { + this := ProjectListResponse{} + this.Items = items + return &this +} + +// NewProjectListResponseWithDefaults instantiates a new ProjectListResponse 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 NewProjectListResponseWithDefaults() *ProjectListResponse { + this := ProjectListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *ProjectListResponse) GetItems() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ProjectListResponse) GetItemsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ProjectListResponse) SetItems(v *[]string) { + o.Items = v +} + +func (o ProjectListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableProjectListResponse struct { + value *ProjectListResponse + isSet bool +} + +func (v NullableProjectListResponse) Get() *ProjectListResponse { + return v.value +} + +func (v *NullableProjectListResponse) Set(val *ProjectListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableProjectListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectListResponse(val *ProjectListResponse) *NullableProjectListResponse { + return &NullableProjectListResponse{value: val, isSet: true} +} + +func (v NullableProjectListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_public_ip.go b/services/iaasalpha/model_public_ip.go index 80cff3780..550c9a0f4 100644 --- a/services/iaasalpha/model_public_ip.go +++ b/services/iaasalpha/model_public_ip.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the PublicIp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicIp{} + // PublicIp Object that represents a public IP. type PublicIp struct { // Universally Unique Identifier (UUID). @@ -18,4 +25,215 @@ type PublicIp struct { Ip *string `json:"ip,omitempty"` // Object that represents the labels of an object. Labels *map[string]interface{} `json:"labels,omitempty"` + // Universally Unique Identifier (UUID). + NetworkInterface *NullableString `json:"networkInterface,omitempty"` +} + +// NewPublicIp instantiates a new PublicIp 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 NewPublicIp() *PublicIp { + this := PublicIp{} + return &this +} + +// NewPublicIpWithDefaults instantiates a new PublicIp 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 NewPublicIpWithDefaults() *PublicIp { + this := PublicIp{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PublicIp) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *PublicIp) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PublicIp) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PublicIp) SetId(v *string) { + o.Id = v +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *PublicIp) GetIp() *string { + if o == nil || IsNil(o.Ip) { + var ret *string + return ret + } + return o.Ip +} + +// 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 *PublicIp) GetIpOk() (*string, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *PublicIp) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given string and assigns it to the Ip field. +func (o *PublicIp) SetIp(v *string) { + o.Ip = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PublicIp) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *PublicIp) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *PublicIp) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *PublicIp) SetLabels(v *map[string]interface{}) { + 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 *PublicIp) GetNetworkInterface() *string { + if o == nil || IsNil(o.NetworkInterface.Get()) { + var ret *string + return ret + } + return o.NetworkInterface.Get() +} + +// 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 *PublicIp) GetNetworkInterfaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NetworkInterface.Get(), o.NetworkInterface.IsSet() +} + +// HasNetworkInterface returns a boolean if a field has been set. +func (o *PublicIp) HasNetworkInterface() bool { + if o != nil && o.NetworkInterface.IsSet() { + return true + } + + return false +} + +// SetNetworkInterface gets a reference to the given string and assigns it to the NetworkInterface field. +func (o *PublicIp) SetNetworkInterface(v *string) { + o.NetworkInterface.Set(v) +} + +// SetNetworkInterfaceNil sets the value for NetworkInterface to be an explicit nil +func (o *PublicIp) SetNetworkInterfaceNil() { + o.NetworkInterface.Set(nil) +} + +// UnsetNetworkInterface ensures that no value is present for NetworkInterface, not even an explicit nil +func (o *PublicIp) UnsetNetworkInterface() { + o.NetworkInterface.Unset() +} + +func (o PublicIp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if o.NetworkInterface.IsSet() { + toSerialize["networkInterface"] = o.NetworkInterface.Get() + } + return toSerialize, nil +} + +type NullablePublicIp struct { + value *PublicIp + isSet bool +} + +func (v NullablePublicIp) Get() *PublicIp { + return v.value +} + +func (v *NullablePublicIp) Set(val *PublicIp) { + v.value = val + v.isSet = true +} + +func (v NullablePublicIp) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicIp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicIp(val *PublicIp) *NullablePublicIp { + return &NullablePublicIp{value: val, isSet: true} +} + +func (v NullablePublicIp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicIp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) } diff --git a/services/iaasalpha/model_public_ip_list_response.go b/services/iaasalpha/model_public_ip_list_response.go index dd349e914..7eb7c8035 100644 --- a/services/iaasalpha/model_public_ip_list_response.go +++ b/services/iaasalpha/model_public_ip_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the PublicIpListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicIpListResponse{} + // PublicIpListResponse Public IP list response. type PublicIpListResponse struct { // A list of public ips. // REQUIRED Items *[]PublicIp `json:"items"` } + +type _PublicIpListResponse PublicIpListResponse + +// NewPublicIpListResponse instantiates a new PublicIpListResponse 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 NewPublicIpListResponse(items *[]PublicIp) *PublicIpListResponse { + this := PublicIpListResponse{} + this.Items = items + return &this +} + +// NewPublicIpListResponseWithDefaults instantiates a new PublicIpListResponse 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 NewPublicIpListResponseWithDefaults() *PublicIpListResponse { + this := PublicIpListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *PublicIpListResponse) GetItems() *[]PublicIp { + if o == nil { + var ret *[]PublicIp + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *PublicIpListResponse) GetItemsOk() (*[]PublicIp, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *PublicIpListResponse) SetItems(v *[]PublicIp) { + o.Items = v +} + +func (o PublicIpListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullablePublicIpListResponse struct { + value *PublicIpListResponse + isSet bool +} + +func (v NullablePublicIpListResponse) Get() *PublicIpListResponse { + return v.value +} + +func (v *NullablePublicIpListResponse) Set(val *PublicIpListResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePublicIpListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicIpListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicIpListResponse(val *PublicIpListResponse) *NullablePublicIpListResponse { + return &NullablePublicIpListResponse{value: val, isSet: true} +} + +func (v NullablePublicIpListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicIpListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_public_network_list_response.go b/services/iaasalpha/model_public_network_list_response.go index 0a7faae72..5ff4c652a 100644 --- a/services/iaasalpha/model_public_network_list_response.go +++ b/services/iaasalpha/model_public_network_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the PublicNetworkListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicNetworkListResponse{} + // PublicNetworkListResponse Public network list response. type PublicNetworkListResponse struct { // A list of public networks. // REQUIRED Items *[]V1PublicNetwork `json:"items"` } + +type _PublicNetworkListResponse PublicNetworkListResponse + +// NewPublicNetworkListResponse instantiates a new PublicNetworkListResponse 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 NewPublicNetworkListResponse(items *[]V1PublicNetwork) *PublicNetworkListResponse { + this := PublicNetworkListResponse{} + this.Items = items + return &this +} + +// NewPublicNetworkListResponseWithDefaults instantiates a new PublicNetworkListResponse 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 NewPublicNetworkListResponseWithDefaults() *PublicNetworkListResponse { + this := PublicNetworkListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *PublicNetworkListResponse) GetItems() *[]V1PublicNetwork { + if o == nil { + var ret *[]V1PublicNetwork + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *PublicNetworkListResponse) GetItemsOk() (*[]V1PublicNetwork, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *PublicNetworkListResponse) SetItems(v *[]V1PublicNetwork) { + o.Items = v +} + +func (o PublicNetworkListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullablePublicNetworkListResponse struct { + value *PublicNetworkListResponse + isSet bool +} + +func (v NullablePublicNetworkListResponse) Get() *PublicNetworkListResponse { + return v.value +} + +func (v *NullablePublicNetworkListResponse) Set(val *PublicNetworkListResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePublicNetworkListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicNetworkListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicNetworkListResponse(val *PublicNetworkListResponse) *NullablePublicNetworkListResponse { + return &NullablePublicNetworkListResponse{value: val, isSet: true} +} + +func (v NullablePublicNetworkListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicNetworkListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_request.go b/services/iaasalpha/model_request.go index a4c196d8a..224456fa3 100644 --- a/services/iaasalpha/model_request.go +++ b/services/iaasalpha/model_request.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the Request type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Request{} + // Request Object that represents a request. type Request struct { Details *string `json:"details,omitempty"` @@ -28,3 +35,228 @@ type Request struct { // REQUIRED Status *string `json:"status"` } + +type _Request Request + +// NewRequest instantiates a new Request 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 NewRequest(requestAction *string, requestId *string, requestType *string, resources *[]RequestResource, status *string) *Request { + this := Request{} + this.RequestAction = requestAction + this.RequestId = requestId + this.RequestType = requestType + this.Resources = resources + this.Status = status + return &this +} + +// NewRequestWithDefaults instantiates a new Request 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 NewRequestWithDefaults() *Request { + this := Request{} + return &this +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *Request) GetDetails() *string { + if o == nil || IsNil(o.Details) { + var ret *string + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Request) GetDetailsOk() (*string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *Request) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given string and assigns it to the Details field. +func (o *Request) SetDetails(v *string) { + o.Details = v +} + +// GetRequestAction returns the RequestAction field value +func (o *Request) GetRequestAction() *string { + if o == nil { + var ret *string + return ret + } + + return o.RequestAction +} + +// GetRequestActionOk returns a tuple with the RequestAction field value +// and a boolean to check if the value has been set. +func (o *Request) GetRequestActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequestAction, true +} + +// SetRequestAction sets field value +func (o *Request) SetRequestAction(v *string) { + o.RequestAction = v +} + +// GetRequestId returns the RequestId field value +func (o *Request) GetRequestId() *string { + if o == nil { + var ret *string + return ret + } + + return o.RequestId +} + +// GetRequestIdOk returns a tuple with the RequestId field value +// and a boolean to check if the value has been set. +func (o *Request) GetRequestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequestId, true +} + +// SetRequestId sets field value +func (o *Request) SetRequestId(v *string) { + o.RequestId = v +} + +// GetRequestType returns the RequestType field value +func (o *Request) GetRequestType() *string { + if o == nil { + var ret *string + return ret + } + + return o.RequestType +} + +// GetRequestTypeOk returns a tuple with the RequestType field value +// and a boolean to check if the value has been set. +func (o *Request) GetRequestTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequestType, true +} + +// SetRequestType sets field value +func (o *Request) SetRequestType(v *string) { + o.RequestType = v +} + +// GetResources returns the Resources field value +func (o *Request) GetResources() *[]RequestResource { + if o == nil { + var ret *[]RequestResource + return ret + } + + return o.Resources +} + +// GetResourcesOk returns a tuple with the Resources field value +// and a boolean to check if the value has been set. +func (o *Request) GetResourcesOk() (*[]RequestResource, bool) { + if o == nil { + return nil, false + } + return o.Resources, true +} + +// SetResources sets field value +func (o *Request) SetResources(v *[]RequestResource) { + o.Resources = v +} + +// GetStatus returns the Status field value +func (o *Request) GetStatus() *string { + if o == nil { + var ret *string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *Request) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status, true +} + +// SetStatus sets field value +func (o *Request) SetStatus(v *string) { + o.Status = v +} + +func (o Request) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + toSerialize["requestAction"] = o.RequestAction + toSerialize["requestId"] = o.RequestId + toSerialize["requestType"] = o.RequestType + toSerialize["resources"] = o.Resources + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableRequest struct { + value *Request + isSet bool +} + +func (v NullableRequest) Get() *Request { + return v.value +} + +func (v *NullableRequest) Set(val *Request) { + v.value = val + v.isSet = true +} + +func (v NullableRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRequest(val *Request) *NullableRequest { + return &NullableRequest{value: val, isSet: true} +} + +func (v NullableRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_request_resource.go b/services/iaasalpha/model_request_resource.go index 14e58bb0f..ceeebc2a8 100644 --- a/services/iaasalpha/model_request_resource.go +++ b/services/iaasalpha/model_request_resource.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the RequestResource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RequestResource{} + // RequestResource Object that represents a resource as part of a request. type RequestResource struct { // Universally Unique Identifier (UUID). @@ -22,3 +29,141 @@ type RequestResource struct { // REQUIRED Type *string `json:"type"` } + +type _RequestResource RequestResource + +// NewRequestResource instantiates a new RequestResource 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 NewRequestResource(id *string, status *string, type_ *string) *RequestResource { + this := RequestResource{} + this.Id = id + this.Status = status + this.Type = type_ + return &this +} + +// NewRequestResourceWithDefaults instantiates a new RequestResource 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 NewRequestResourceWithDefaults() *RequestResource { + this := RequestResource{} + return &this +} + +// GetId returns the Id field value +func (o *RequestResource) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RequestResource) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *RequestResource) SetId(v *string) { + o.Id = v +} + +// GetStatus returns the Status field value +func (o *RequestResource) GetStatus() *string { + if o == nil { + var ret *string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *RequestResource) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status, true +} + +// SetStatus sets field value +func (o *RequestResource) SetStatus(v *string) { + o.Status = v +} + +// GetType returns the Type field value +func (o *RequestResource) GetType() *string { + if o == nil { + var ret *string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RequestResource) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type, true +} + +// SetType sets field value +func (o *RequestResource) SetType(v *string) { + o.Type = v +} + +func (o RequestResource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["status"] = o.Status + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableRequestResource struct { + value *RequestResource + isSet bool +} + +func (v NullableRequestResource) Get() *RequestResource { + return v.value +} + +func (v *NullableRequestResource) Set(val *RequestResource) { + v.value = val + v.isSet = true +} + +func (v NullableRequestResource) IsSet() bool { + return v.isSet +} + +func (v *NullableRequestResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRequestResource(val *RequestResource) *NullableRequestResource { + return &NullableRequestResource{value: val, isSet: true} +} + +func (v NullableRequestResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRequestResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_rescue_server_payload.go b/services/iaasalpha/model_rescue_server_payload.go index 0732816a0..c67e67b21 100644 --- a/services/iaasalpha/model_rescue_server_payload.go +++ b/services/iaasalpha/model_rescue_server_payload.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the RescueServerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RescueServerPayload{} + // RescueServerPayload struct for RescueServerPayload type RescueServerPayload struct { // Universally Unique Identifier (UUID). // REQUIRED Image *string `json:"image"` } + +type _RescueServerPayload RescueServerPayload + +// NewRescueServerPayload instantiates a new RescueServerPayload 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 NewRescueServerPayload(image *string) *RescueServerPayload { + this := RescueServerPayload{} + this.Image = image + return &this +} + +// NewRescueServerPayloadWithDefaults instantiates a new RescueServerPayload 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 NewRescueServerPayloadWithDefaults() *RescueServerPayload { + this := RescueServerPayload{} + return &this +} + +// GetImage returns the Image field value +func (o *RescueServerPayload) GetImage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Image +} + +// GetImageOk returns a tuple with the Image field value +// and a boolean to check if the value has been set. +func (o *RescueServerPayload) GetImageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Image, true +} + +// SetImage sets field value +func (o *RescueServerPayload) SetImage(v *string) { + o.Image = v +} + +func (o RescueServerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["image"] = o.Image + return toSerialize, nil +} + +type NullableRescueServerPayload struct { + value *RescueServerPayload + isSet bool +} + +func (v NullableRescueServerPayload) Get() *RescueServerPayload { + return v.value +} + +func (v *NullableRescueServerPayload) Set(val *RescueServerPayload) { + v.value = val + v.isSet = true +} + +func (v NullableRescueServerPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableRescueServerPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRescueServerPayload(val *RescueServerPayload) *NullableRescueServerPayload { + return &NullableRescueServerPayload{value: val, isSet: true} +} + +func (v NullableRescueServerPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRescueServerPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_resize_server_payload.go b/services/iaasalpha/model_resize_server_payload.go index b46f4d59e..942cf3b97 100644 --- a/services/iaasalpha/model_resize_server_payload.go +++ b/services/iaasalpha/model_resize_server_payload.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the ResizeServerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResizeServerPayload{} + // ResizeServerPayload struct for ResizeServerPayload type ResizeServerPayload struct { // The name for a General Object. Matches Names and also UUIDs. // REQUIRED MachineType *string `json:"machineType"` } + +type _ResizeServerPayload ResizeServerPayload + +// NewResizeServerPayload instantiates a new ResizeServerPayload 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 NewResizeServerPayload(machineType *string) *ResizeServerPayload { + this := ResizeServerPayload{} + this.MachineType = machineType + return &this +} + +// NewResizeServerPayloadWithDefaults instantiates a new ResizeServerPayload 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 NewResizeServerPayloadWithDefaults() *ResizeServerPayload { + this := ResizeServerPayload{} + return &this +} + +// GetMachineType returns the MachineType field value +func (o *ResizeServerPayload) GetMachineType() *string { + if o == nil { + var ret *string + return ret + } + + return o.MachineType +} + +// GetMachineTypeOk returns a tuple with the MachineType field value +// and a boolean to check if the value has been set. +func (o *ResizeServerPayload) GetMachineTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MachineType, true +} + +// SetMachineType sets field value +func (o *ResizeServerPayload) SetMachineType(v *string) { + o.MachineType = v +} + +func (o ResizeServerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["machineType"] = o.MachineType + return toSerialize, nil +} + +type NullableResizeServerPayload struct { + value *ResizeServerPayload + isSet bool +} + +func (v NullableResizeServerPayload) Get() *ResizeServerPayload { + return v.value +} + +func (v *NullableResizeServerPayload) Set(val *ResizeServerPayload) { + v.value = val + v.isSet = true +} + +func (v NullableResizeServerPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableResizeServerPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResizeServerPayload(val *ResizeServerPayload) *NullableResizeServerPayload { + return &NullableResizeServerPayload{value: val, isSet: true} +} + +func (v NullableResizeServerPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResizeServerPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_resize_volume_payload.go b/services/iaasalpha/model_resize_volume_payload.go index 235c1b292..c10164ea6 100644 --- a/services/iaasalpha/model_resize_volume_payload.go +++ b/services/iaasalpha/model_resize_volume_payload.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the ResizeVolumePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResizeVolumePayload{} + // ResizeVolumePayload struct for ResizeVolumePayload type ResizeVolumePayload struct { // Size in Gigabyte. // REQUIRED Size *int64 `json:"size"` } + +type _ResizeVolumePayload ResizeVolumePayload + +// NewResizeVolumePayload instantiates a new ResizeVolumePayload 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 NewResizeVolumePayload(size *int64) *ResizeVolumePayload { + this := ResizeVolumePayload{} + this.Size = size + return &this +} + +// NewResizeVolumePayloadWithDefaults instantiates a new ResizeVolumePayload 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 NewResizeVolumePayloadWithDefaults() *ResizeVolumePayload { + this := ResizeVolumePayload{} + return &this +} + +// GetSize returns the Size field value +func (o *ResizeVolumePayload) GetSize() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *ResizeVolumePayload) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Size, true +} + +// SetSize sets field value +func (o *ResizeVolumePayload) SetSize(v *int64) { + o.Size = v +} + +func (o ResizeVolumePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["size"] = o.Size + return toSerialize, nil +} + +type NullableResizeVolumePayload struct { + value *ResizeVolumePayload + isSet bool +} + +func (v NullableResizeVolumePayload) Get() *ResizeVolumePayload { + return v.value +} + +func (v *NullableResizeVolumePayload) Set(val *ResizeVolumePayload) { + v.value = val + v.isSet = true +} + +func (v NullableResizeVolumePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableResizeVolumePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResizeVolumePayload(val *ResizeVolumePayload) *NullableResizeVolumePayload { + return &NullableResizeVolumePayload{value: val, isSet: true} +} + +func (v NullableResizeVolumePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResizeVolumePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_route.go b/services/iaasalpha/model_route.go index 529bbc078..55ad494d0 100644 --- a/services/iaasalpha/model_route.go +++ b/services/iaasalpha/model_route.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the Route type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Route{} + // Route Object represents a network route. type Route struct { // Date-time when resource was created. @@ -31,3 +35,255 @@ type Route struct { // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` } + +type _Route Route + +// NewRoute instantiates a new Route 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 NewRoute(nexthop *string, prefix *string) *Route { + this := Route{} + this.Nexthop = nexthop + this.Prefix = prefix + return &this +} + +// NewRouteWithDefaults instantiates a new Route 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 NewRouteWithDefaults() *Route { + this := Route{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Route) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Route) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Route) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Route) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *Route) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Route) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *Route) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetNexthop returns the Nexthop field value +func (o *Route) GetNexthop() *string { + if o == nil { + var ret *string + return ret + } + + return o.Nexthop +} + +// GetNexthopOk returns a tuple with the Nexthop field value +// and a boolean to check if the value has been set. +func (o *Route) GetNexthopOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Nexthop, true +} + +// SetNexthop sets field value +func (o *Route) SetNexthop(v *string) { + o.Nexthop = v +} + +// GetPrefix returns the Prefix field value +func (o *Route) GetPrefix() *string { + if o == nil { + var ret *string + return ret + } + + return o.Prefix +} + +// GetPrefixOk returns a tuple with the Prefix field value +// and a boolean to check if the value has been set. +func (o *Route) GetPrefixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Prefix, true +} + +// SetPrefix sets field value +func (o *Route) SetPrefix(v *string) { + o.Prefix = v +} + +// GetRouteId returns the RouteId field value if set, zero value otherwise. +func (o *Route) GetRouteId() *string { + if o == nil || IsNil(o.RouteId) { + var ret *string + return ret + } + return o.RouteId +} + +// GetRouteIdOk returns a tuple with the RouteId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetRouteIdOk() (*string, bool) { + if o == nil || IsNil(o.RouteId) { + return nil, false + } + return o.RouteId, true +} + +// HasRouteId returns a boolean if a field has been set. +func (o *Route) HasRouteId() bool { + if o != nil && !IsNil(o.RouteId) { + return true + } + + return false +} + +// SetRouteId gets a reference to the given string and assigns it to the RouteId field. +func (o *Route) SetRouteId(v *string) { + o.RouteId = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Route) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Route) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Route) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +func (o Route) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["nexthop"] = o.Nexthop + toSerialize["prefix"] = o.Prefix + if !IsNil(o.RouteId) { + toSerialize["routeId"] = o.RouteId + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableRoute struct { + value *Route + isSet bool +} + +func (v NullableRoute) Get() *Route { + return v.value +} + +func (v *NullableRoute) Set(val *Route) { + v.value = val + v.isSet = true +} + +func (v NullableRoute) IsSet() bool { + return v.isSet +} + +func (v *NullableRoute) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRoute(val *Route) *NullableRoute { + return &NullableRoute{value: val, isSet: true} +} + +func (v NullableRoute) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRoute) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_security_group.go b/services/iaasalpha/model_security_group.go index 2cec7fc10..9bd14c92e 100644 --- a/services/iaasalpha/model_security_group.go +++ b/services/iaasalpha/model_security_group.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the SecurityGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecurityGroup{} + // SecurityGroup Object that represents a security group. type SecurityGroup struct { // Date-time when resource was created. @@ -34,3 +38,338 @@ type SecurityGroup struct { // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` } + +type _SecurityGroup SecurityGroup + +// NewSecurityGroup instantiates a new SecurityGroup 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 NewSecurityGroup(name *string) *SecurityGroup { + this := SecurityGroup{} + this.Name = name + var stateful bool = true + this.Stateful = &stateful + return &this +} + +// NewSecurityGroupWithDefaults instantiates a new SecurityGroup 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 NewSecurityGroupWithDefaults() *SecurityGroup { + this := SecurityGroup{} + var stateful bool = true + this.Stateful = &stateful + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *SecurityGroup) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroup) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *SecurityGroup) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *SecurityGroup) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *SecurityGroup) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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 *SecurityGroup) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *SecurityGroup) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *SecurityGroup) SetDescription(v *string) { + o.Description = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SecurityGroup) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *SecurityGroup) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SecurityGroup) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SecurityGroup) SetId(v *string) { + o.Id = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *SecurityGroup) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *SecurityGroup) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *SecurityGroup) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *SecurityGroup) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *SecurityGroup) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SecurityGroup) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *SecurityGroup) SetName(v *string) { + o.Name = v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *SecurityGroup) GetRules() *[]SecurityGroupRule { + if o == nil || IsNil(o.Rules) { + var ret *[]SecurityGroupRule + return ret + } + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroup) GetRulesOk() (*[]SecurityGroupRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *SecurityGroup) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []SecurityGroupRule and assigns it to the Rules field. +func (o *SecurityGroup) SetRules(v *[]SecurityGroupRule) { + o.Rules = v +} + +// GetStateful returns the Stateful field value if set, zero value otherwise. +func (o *SecurityGroup) GetStateful() *bool { + if o == nil || IsNil(o.Stateful) { + var ret *bool + return ret + } + return o.Stateful +} + +// GetStatefulOk returns a tuple with the Stateful field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroup) GetStatefulOk() (*bool, bool) { + if o == nil || IsNil(o.Stateful) { + return nil, false + } + return o.Stateful, true +} + +// HasStateful returns a boolean if a field has been set. +func (o *SecurityGroup) HasStateful() bool { + if o != nil && !IsNil(o.Stateful) { + return true + } + + return false +} + +// SetStateful gets a reference to the given bool and assigns it to the Stateful field. +func (o *SecurityGroup) SetStateful(v *bool) { + o.Stateful = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *SecurityGroup) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroup) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *SecurityGroup) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *SecurityGroup) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +func (o SecurityGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + if !IsNil(o.Rules) { + toSerialize["rules"] = o.Rules + } + if !IsNil(o.Stateful) { + toSerialize["stateful"] = o.Stateful + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableSecurityGroup struct { + value *SecurityGroup + isSet bool +} + +func (v NullableSecurityGroup) Get() *SecurityGroup { + return v.value +} + +func (v *NullableSecurityGroup) Set(val *SecurityGroup) { + v.value = val + v.isSet = true +} + +func (v NullableSecurityGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableSecurityGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecurityGroup(val *SecurityGroup) *NullableSecurityGroup { + return &NullableSecurityGroup{value: val, isSet: true} +} + +func (v NullableSecurityGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecurityGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_security_group_list_response.go b/services/iaasalpha/model_security_group_list_response.go index 31d270c98..7598100cb 100644 --- a/services/iaasalpha/model_security_group_list_response.go +++ b/services/iaasalpha/model_security_group_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the SecurityGroupListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecurityGroupListResponse{} + // SecurityGroupListResponse Security group list response. type SecurityGroupListResponse struct { // A list containing security group objects. // REQUIRED Items *[]SecurityGroup `json:"items"` } + +type _SecurityGroupListResponse SecurityGroupListResponse + +// NewSecurityGroupListResponse instantiates a new SecurityGroupListResponse 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 NewSecurityGroupListResponse(items *[]SecurityGroup) *SecurityGroupListResponse { + this := SecurityGroupListResponse{} + this.Items = items + return &this +} + +// NewSecurityGroupListResponseWithDefaults instantiates a new SecurityGroupListResponse 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 NewSecurityGroupListResponseWithDefaults() *SecurityGroupListResponse { + this := SecurityGroupListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *SecurityGroupListResponse) GetItems() *[]SecurityGroup { + if o == nil { + var ret *[]SecurityGroup + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *SecurityGroupListResponse) GetItemsOk() (*[]SecurityGroup, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *SecurityGroupListResponse) SetItems(v *[]SecurityGroup) { + o.Items = v +} + +func (o SecurityGroupListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableSecurityGroupListResponse struct { + value *SecurityGroupListResponse + isSet bool +} + +func (v NullableSecurityGroupListResponse) Get() *SecurityGroupListResponse { + return v.value +} + +func (v *NullableSecurityGroupListResponse) Set(val *SecurityGroupListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSecurityGroupListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSecurityGroupListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecurityGroupListResponse(val *SecurityGroupListResponse) *NullableSecurityGroupListResponse { + return &NullableSecurityGroupListResponse{value: val, isSet: true} +} + +func (v NullableSecurityGroupListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecurityGroupListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_security_group_rule.go b/services/iaasalpha/model_security_group_rule.go index a005ad48a..2f47ba09e 100644 --- a/services/iaasalpha/model_security_group_rule.go +++ b/services/iaasalpha/model_security_group_rule.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the SecurityGroupRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecurityGroupRule{} + // SecurityGroupRule Object that represents a security group rule. type SecurityGroupRule struct { // Description Object. Allows string up to 127 Characters. @@ -31,3 +38,408 @@ type SecurityGroupRule struct { // Universally Unique Identifier (UUID). SecurityGroupId *string `json:"securityGroupId,omitempty"` } + +type _SecurityGroupRule SecurityGroupRule + +// NewSecurityGroupRule instantiates a new SecurityGroupRule 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 NewSecurityGroupRule(direction *string) *SecurityGroupRule { + this := SecurityGroupRule{} + this.Direction = direction + var ethertype string = "IPv4" + this.Ethertype = ðertype + return &this +} + +// NewSecurityGroupRuleWithDefaults instantiates a new SecurityGroupRule 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 NewSecurityGroupRuleWithDefaults() *SecurityGroupRule { + this := SecurityGroupRule{} + var ethertype string = "IPv4" + this.Ethertype = ðertype + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *SecurityGroupRule) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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 *SecurityGroupRule) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *SecurityGroupRule) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *SecurityGroupRule) SetDescription(v *string) { + o.Description = v +} + +// GetDirection returns the Direction field value +func (o *SecurityGroupRule) GetDirection() *string { + if o == nil { + var ret *string + return ret + } + + return o.Direction +} + +// GetDirectionOk returns a tuple with the Direction field value +// and a boolean to check if the value has been set. +func (o *SecurityGroupRule) GetDirectionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Direction, true +} + +// SetDirection sets field value +func (o *SecurityGroupRule) SetDirection(v *string) { + o.Direction = v +} + +// GetEthertype returns the Ethertype field value if set, zero value otherwise. +func (o *SecurityGroupRule) GetEthertype() *string { + if o == nil || IsNil(o.Ethertype) { + var ret *string + return ret + } + return o.Ethertype +} + +// GetEthertypeOk returns a tuple with the Ethertype field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroupRule) GetEthertypeOk() (*string, bool) { + if o == nil || IsNil(o.Ethertype) { + return nil, false + } + return o.Ethertype, true +} + +// HasEthertype returns a boolean if a field has been set. +func (o *SecurityGroupRule) HasEthertype() bool { + if o != nil && !IsNil(o.Ethertype) { + return true + } + + return false +} + +// SetEthertype gets a reference to the given string and assigns it to the Ethertype field. +func (o *SecurityGroupRule) SetEthertype(v *string) { + o.Ethertype = v +} + +// GetIcmpParameters returns the IcmpParameters field value if set, zero value otherwise. +func (o *SecurityGroupRule) GetIcmpParameters() *ICMPParameters { + if o == nil || IsNil(o.IcmpParameters) { + var ret *ICMPParameters + return ret + } + return o.IcmpParameters +} + +// GetIcmpParametersOk returns a tuple with the IcmpParameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroupRule) GetIcmpParametersOk() (*ICMPParameters, bool) { + if o == nil || IsNil(o.IcmpParameters) { + return nil, false + } + return o.IcmpParameters, true +} + +// HasIcmpParameters returns a boolean if a field has been set. +func (o *SecurityGroupRule) HasIcmpParameters() bool { + if o != nil && !IsNil(o.IcmpParameters) { + return true + } + + return false +} + +// SetIcmpParameters gets a reference to the given ICMPParameters and assigns it to the IcmpParameters field. +func (o *SecurityGroupRule) SetIcmpParameters(v *ICMPParameters) { + o.IcmpParameters = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SecurityGroupRule) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *SecurityGroupRule) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SecurityGroupRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SecurityGroupRule) SetId(v *string) { + o.Id = v +} + +// GetIpRange returns the IpRange field value if set, zero value otherwise. +func (o *SecurityGroupRule) GetIpRange() *string { + if o == nil || IsNil(o.IpRange) { + var ret *string + return ret + } + return o.IpRange +} + +// GetIpRangeOk returns a tuple with the IpRange field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroupRule) GetIpRangeOk() (*string, bool) { + if o == nil || IsNil(o.IpRange) { + return nil, false + } + return o.IpRange, true +} + +// HasIpRange returns a boolean if a field has been set. +func (o *SecurityGroupRule) HasIpRange() bool { + if o != nil && !IsNil(o.IpRange) { + return true + } + + return false +} + +// SetIpRange gets a reference to the given string and assigns it to the IpRange field. +func (o *SecurityGroupRule) SetIpRange(v *string) { + o.IpRange = v +} + +// GetPortRange returns the PortRange field value if set, zero value otherwise. +func (o *SecurityGroupRule) GetPortRange() *PortRange { + if o == nil || IsNil(o.PortRange) { + var ret *PortRange + return ret + } + return o.PortRange +} + +// GetPortRangeOk returns a tuple with the PortRange field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroupRule) GetPortRangeOk() (*PortRange, bool) { + if o == nil || IsNil(o.PortRange) { + return nil, false + } + return o.PortRange, true +} + +// HasPortRange returns a boolean if a field has been set. +func (o *SecurityGroupRule) HasPortRange() bool { + if o != nil && !IsNil(o.PortRange) { + return true + } + + return false +} + +// SetPortRange gets a reference to the given PortRange and assigns it to the PortRange field. +func (o *SecurityGroupRule) SetPortRange(v *PortRange) { + o.PortRange = v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *SecurityGroupRule) GetProtocol() *V1SecurityGroupRuleProtocol { + if o == nil || IsNil(o.Protocol) { + var ret *V1SecurityGroupRuleProtocol + return ret + } + return o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroupRule) GetProtocolOk() (*V1SecurityGroupRuleProtocol, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *SecurityGroupRule) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given V1SecurityGroupRuleProtocol and assigns it to the Protocol field. +func (o *SecurityGroupRule) SetProtocol(v *V1SecurityGroupRuleProtocol) { + o.Protocol = v +} + +// GetRemoteSecurityGroupId returns the RemoteSecurityGroupId field value if set, zero value otherwise. +func (o *SecurityGroupRule) GetRemoteSecurityGroupId() *string { + if o == nil || IsNil(o.RemoteSecurityGroupId) { + var ret *string + return ret + } + return o.RemoteSecurityGroupId +} + +// GetRemoteSecurityGroupIdOk returns a tuple with the RemoteSecurityGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroupRule) GetRemoteSecurityGroupIdOk() (*string, bool) { + if o == nil || IsNil(o.RemoteSecurityGroupId) { + return nil, false + } + return o.RemoteSecurityGroupId, true +} + +// HasRemoteSecurityGroupId returns a boolean if a field has been set. +func (o *SecurityGroupRule) HasRemoteSecurityGroupId() bool { + if o != nil && !IsNil(o.RemoteSecurityGroupId) { + return true + } + + return false +} + +// SetRemoteSecurityGroupId gets a reference to the given string and assigns it to the RemoteSecurityGroupId field. +func (o *SecurityGroupRule) SetRemoteSecurityGroupId(v *string) { + o.RemoteSecurityGroupId = v +} + +// GetSecurityGroupId returns the SecurityGroupId field value if set, zero value otherwise. +func (o *SecurityGroupRule) GetSecurityGroupId() *string { + if o == nil || IsNil(o.SecurityGroupId) { + var ret *string + return ret + } + return o.SecurityGroupId +} + +// GetSecurityGroupIdOk returns a tuple with the SecurityGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecurityGroupRule) GetSecurityGroupIdOk() (*string, bool) { + if o == nil || IsNil(o.SecurityGroupId) { + return nil, false + } + return o.SecurityGroupId, true +} + +// HasSecurityGroupId returns a boolean if a field has been set. +func (o *SecurityGroupRule) HasSecurityGroupId() bool { + if o != nil && !IsNil(o.SecurityGroupId) { + return true + } + + return false +} + +// SetSecurityGroupId gets a reference to the given string and assigns it to the SecurityGroupId field. +func (o *SecurityGroupRule) SetSecurityGroupId(v *string) { + o.SecurityGroupId = v +} + +func (o SecurityGroupRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["direction"] = o.Direction + if !IsNil(o.Ethertype) { + toSerialize["ethertype"] = o.Ethertype + } + if !IsNil(o.IcmpParameters) { + toSerialize["icmpParameters"] = o.IcmpParameters + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.IpRange) { + toSerialize["ipRange"] = o.IpRange + } + if !IsNil(o.PortRange) { + toSerialize["portRange"] = o.PortRange + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + if !IsNil(o.RemoteSecurityGroupId) { + toSerialize["remoteSecurityGroupId"] = o.RemoteSecurityGroupId + } + if !IsNil(o.SecurityGroupId) { + toSerialize["securityGroupId"] = o.SecurityGroupId + } + return toSerialize, nil +} + +type NullableSecurityGroupRule struct { + value *SecurityGroupRule + isSet bool +} + +func (v NullableSecurityGroupRule) Get() *SecurityGroupRule { + return v.value +} + +func (v *NullableSecurityGroupRule) Set(val *SecurityGroupRule) { + v.value = val + v.isSet = true +} + +func (v NullableSecurityGroupRule) IsSet() bool { + return v.isSet +} + +func (v *NullableSecurityGroupRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecurityGroupRule(val *SecurityGroupRule) *NullableSecurityGroupRule { + return &NullableSecurityGroupRule{value: val, isSet: true} +} + +func (v NullableSecurityGroupRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecurityGroupRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_security_group_rule_list_response.go b/services/iaasalpha/model_security_group_rule_list_response.go index ee2e2c6ee..5a6eb248d 100644 --- a/services/iaasalpha/model_security_group_rule_list_response.go +++ b/services/iaasalpha/model_security_group_rule_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the SecurityGroupRuleListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecurityGroupRuleListResponse{} + // SecurityGroupRuleListResponse Security group rule list response. type SecurityGroupRuleListResponse struct { // A list containing security group rule objects. // REQUIRED Items *[]SecurityGroupRule `json:"items"` } + +type _SecurityGroupRuleListResponse SecurityGroupRuleListResponse + +// NewSecurityGroupRuleListResponse instantiates a new SecurityGroupRuleListResponse 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 NewSecurityGroupRuleListResponse(items *[]SecurityGroupRule) *SecurityGroupRuleListResponse { + this := SecurityGroupRuleListResponse{} + this.Items = items + return &this +} + +// NewSecurityGroupRuleListResponseWithDefaults instantiates a new SecurityGroupRuleListResponse 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 NewSecurityGroupRuleListResponseWithDefaults() *SecurityGroupRuleListResponse { + this := SecurityGroupRuleListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *SecurityGroupRuleListResponse) GetItems() *[]SecurityGroupRule { + if o == nil { + var ret *[]SecurityGroupRule + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *SecurityGroupRuleListResponse) GetItemsOk() (*[]SecurityGroupRule, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *SecurityGroupRuleListResponse) SetItems(v *[]SecurityGroupRule) { + o.Items = v +} + +func (o SecurityGroupRuleListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableSecurityGroupRuleListResponse struct { + value *SecurityGroupRuleListResponse + isSet bool +} + +func (v NullableSecurityGroupRuleListResponse) Get() *SecurityGroupRuleListResponse { + return v.value +} + +func (v *NullableSecurityGroupRuleListResponse) Set(val *SecurityGroupRuleListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSecurityGroupRuleListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSecurityGroupRuleListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecurityGroupRuleListResponse(val *SecurityGroupRuleListResponse) *NullableSecurityGroupRuleListResponse { + return &NullableSecurityGroupRuleListResponse{value: val, isSet: true} +} + +func (v NullableSecurityGroupRuleListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecurityGroupRuleListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_server.go b/services/iaasalpha/model_server.go index ef1831ff3..2ded85dde 100644 --- a/services/iaasalpha/model_server.go +++ b/services/iaasalpha/model_server.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the Server type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Server{} + // Server Representation of a single server object. type Server struct { // Object that represents an availability zone. @@ -60,3 +64,815 @@ type Server struct { // A list of UUIDs. Volumes *[]string `json:"volumes,omitempty"` } + +type _Server Server + +// NewServer instantiates a new Server 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 NewServer(machineType *string, name *string) *Server { + this := Server{} + this.MachineType = machineType + this.Name = name + return &this +} + +// NewServerWithDefaults instantiates a new Server 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 NewServerWithDefaults() *Server { + this := Server{} + return &this +} + +// GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise. +func (o *Server) GetAvailabilityZone() *string { + if o == nil || IsNil(o.AvailabilityZone) { + var ret *string + return ret + } + return o.AvailabilityZone +} + +// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetAvailabilityZoneOk() (*string, bool) { + if o == nil || IsNil(o.AvailabilityZone) { + return nil, false + } + return o.AvailabilityZone, true +} + +// HasAvailabilityZone returns a boolean if a field has been set. +func (o *Server) HasAvailabilityZone() bool { + if o != nil && !IsNil(o.AvailabilityZone) { + return true + } + + return false +} + +// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. +func (o *Server) SetAvailabilityZone(v *string) { + o.AvailabilityZone = v +} + +// GetBootVolume returns the BootVolume field value if set, zero value otherwise. +func (o *Server) GetBootVolume() *CreateServerPayloadBootVolume { + if o == nil || IsNil(o.BootVolume) { + var ret *CreateServerPayloadBootVolume + return ret + } + return o.BootVolume +} + +// GetBootVolumeOk returns a tuple with the BootVolume field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetBootVolumeOk() (*CreateServerPayloadBootVolume, bool) { + if o == nil || IsNil(o.BootVolume) { + return nil, false + } + return o.BootVolume, true +} + +// HasBootVolume returns a boolean if a field has been set. +func (o *Server) HasBootVolume() bool { + if o != nil && !IsNil(o.BootVolume) { + return true + } + + return false +} + +// SetBootVolume gets a reference to the given CreateServerPayloadBootVolume and assigns it to the BootVolume field. +func (o *Server) SetBootVolume(v *CreateServerPayloadBootVolume) { + o.BootVolume = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Server) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Server) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Server) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise. +func (o *Server) GetErrorMessage() *string { + if o == nil || IsNil(o.ErrorMessage) { + var ret *string + return ret + } + return o.ErrorMessage +} + +// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetErrorMessageOk() (*string, bool) { + if o == nil || IsNil(o.ErrorMessage) { + return nil, false + } + return o.ErrorMessage, true +} + +// HasErrorMessage returns a boolean if a field has been set. +func (o *Server) HasErrorMessage() bool { + if o != nil && !IsNil(o.ErrorMessage) { + return true + } + + return false +} + +// SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field. +func (o *Server) SetErrorMessage(v *string) { + o.ErrorMessage = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Server) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *Server) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Server) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Server) SetId(v *string) { + o.Id = v +} + +// GetImageId returns the ImageId field value if set, zero value otherwise. +func (o *Server) GetImageId() *string { + if o == nil || IsNil(o.ImageId) { + var ret *string + return ret + } + return o.ImageId +} + +// GetImageIdOk returns a tuple with the ImageId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetImageIdOk() (*string, bool) { + if o == nil || IsNil(o.ImageId) { + return nil, false + } + return o.ImageId, true +} + +// HasImageId returns a boolean if a field has been set. +func (o *Server) HasImageId() bool { + if o != nil && !IsNil(o.ImageId) { + return true + } + + return false +} + +// SetImageId gets a reference to the given string and assigns it to the ImageId field. +func (o *Server) SetImageId(v *string) { + o.ImageId = v +} + +// GetKeypairName returns the KeypairName field value if set, zero value otherwise. +func (o *Server) GetKeypairName() *string { + if o == nil || IsNil(o.KeypairName) { + var ret *string + return ret + } + return o.KeypairName +} + +// GetKeypairNameOk returns a tuple with the KeypairName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetKeypairNameOk() (*string, bool) { + if o == nil || IsNil(o.KeypairName) { + return nil, false + } + return o.KeypairName, true +} + +// HasKeypairName returns a boolean if a field has been set. +func (o *Server) HasKeypairName() bool { + if o != nil && !IsNil(o.KeypairName) { + return true + } + + return false +} + +// SetKeypairName gets a reference to the given string and assigns it to the KeypairName field. +func (o *Server) SetKeypairName(v *string) { + o.KeypairName = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Server) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *Server) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Server) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *Server) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetLaunchedAt returns the LaunchedAt field value if set, zero value otherwise. +func (o *Server) GetLaunchedAt() *time.Time { + if o == nil || IsNil(o.LaunchedAt) { + var ret *time.Time + return ret + } + return o.LaunchedAt +} + +// GetLaunchedAtOk returns a tuple with the LaunchedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetLaunchedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LaunchedAt) { + return nil, false + } + return o.LaunchedAt, true +} + +// HasLaunchedAt returns a boolean if a field has been set. +func (o *Server) HasLaunchedAt() bool { + if o != nil && !IsNil(o.LaunchedAt) { + return true + } + + return false +} + +// SetLaunchedAt gets a reference to the given time.Time and assigns it to the LaunchedAt field. +func (o *Server) SetLaunchedAt(v *time.Time) { + o.LaunchedAt = v +} + +// GetMachineType returns the MachineType field value +func (o *Server) GetMachineType() *string { + if o == nil { + var ret *string + return ret + } + + return o.MachineType +} + +// GetMachineTypeOk returns a tuple with the MachineType field value +// and a boolean to check if the value has been set. +func (o *Server) GetMachineTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MachineType, true +} + +// SetMachineType sets field value +func (o *Server) SetMachineType(v *string) { + o.MachineType = v +} + +// GetMaintenanceWindow returns the MaintenanceWindow field value if set, zero value otherwise. +func (o *Server) GetMaintenanceWindow() *ServerMaintenance { + if o == nil || IsNil(o.MaintenanceWindow) { + var ret *ServerMaintenance + return ret + } + return o.MaintenanceWindow +} + +// GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetMaintenanceWindowOk() (*ServerMaintenance, bool) { + if o == nil || IsNil(o.MaintenanceWindow) { + return nil, false + } + return o.MaintenanceWindow, true +} + +// HasMaintenanceWindow returns a boolean if a field has been set. +func (o *Server) HasMaintenanceWindow() bool { + if o != nil && !IsNil(o.MaintenanceWindow) { + return true + } + + return false +} + +// SetMaintenanceWindow gets a reference to the given ServerMaintenance and assigns it to the MaintenanceWindow field. +func (o *Server) SetMaintenanceWindow(v *ServerMaintenance) { + o.MaintenanceWindow = v +} + +// GetName returns the Name field value +func (o *Server) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Server) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *Server) SetName(v *string) { + o.Name = v +} + +// GetNetworking returns the Networking field value if set, zero value otherwise. +func (o *Server) GetNetworking() *CreateServerPayloadNetworking { + if o == nil || IsNil(o.Networking) { + var ret *CreateServerPayloadNetworking + return ret + } + return o.Networking +} + +// GetNetworkingOk returns a tuple with the Networking field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetNetworkingOk() (*CreateServerPayloadNetworking, bool) { + if o == nil || IsNil(o.Networking) { + return nil, false + } + return o.Networking, true +} + +// HasNetworking returns a boolean if a field has been set. +func (o *Server) HasNetworking() bool { + if o != nil && !IsNil(o.Networking) { + return true + } + + return false +} + +// SetNetworking gets a reference to the given CreateServerPayloadNetworking and assigns it to the Networking field. +func (o *Server) SetNetworking(v *CreateServerPayloadNetworking) { + o.Networking = v +} + +// GetNics returns the Nics field value if set, zero value otherwise. +func (o *Server) GetNics() *[]ServerNetwork { + if o == nil || IsNil(o.Nics) { + var ret *[]ServerNetwork + return ret + } + return o.Nics +} + +// GetNicsOk returns a tuple with the Nics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetNicsOk() (*[]ServerNetwork, bool) { + if o == nil || IsNil(o.Nics) { + return nil, false + } + return o.Nics, true +} + +// HasNics returns a boolean if a field has been set. +func (o *Server) HasNics() bool { + if o != nil && !IsNil(o.Nics) { + return true + } + + return false +} + +// SetNics gets a reference to the given []ServerNetwork and assigns it to the Nics field. +func (o *Server) SetNics(v *[]ServerNetwork) { + o.Nics = v +} + +// GetPowerStatus returns the PowerStatus field value if set, zero value otherwise. +func (o *Server) GetPowerStatus() *string { + if o == nil || IsNil(o.PowerStatus) { + var ret *string + return ret + } + return o.PowerStatus +} + +// GetPowerStatusOk returns a tuple with the PowerStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetPowerStatusOk() (*string, bool) { + if o == nil || IsNil(o.PowerStatus) { + return nil, false + } + return o.PowerStatus, true +} + +// HasPowerStatus returns a boolean if a field has been set. +func (o *Server) HasPowerStatus() bool { + if o != nil && !IsNil(o.PowerStatus) { + return true + } + + return false +} + +// SetPowerStatus gets a reference to the given string and assigns it to the PowerStatus field. +func (o *Server) SetPowerStatus(v *string) { + o.PowerStatus = v +} + +// GetSecurityGroups returns the SecurityGroups field value if set, zero value otherwise. +func (o *Server) GetSecurityGroups() *[]string { + if o == nil || IsNil(o.SecurityGroups) { + var ret *[]string + return ret + } + return o.SecurityGroups +} + +// 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 *Server) GetSecurityGroupsOk() (*[]string, bool) { + if o == nil || IsNil(o.SecurityGroups) { + return nil, false + } + return o.SecurityGroups, true +} + +// HasSecurityGroups returns a boolean if a field has been set. +func (o *Server) HasSecurityGroups() bool { + if o != nil && !IsNil(o.SecurityGroups) { + return true + } + + return false +} + +// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. +func (o *Server) SetSecurityGroups(v *[]string) { + o.SecurityGroups = v +} + +// GetServerGroup returns the ServerGroup field value if set, zero value otherwise. +func (o *Server) GetServerGroup() *string { + if o == nil || IsNil(o.ServerGroup) { + var ret *string + return ret + } + return o.ServerGroup +} + +// GetServerGroupOk returns a tuple with the ServerGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetServerGroupOk() (*string, bool) { + if o == nil || IsNil(o.ServerGroup) { + return nil, false + } + return o.ServerGroup, true +} + +// HasServerGroup returns a boolean if a field has been set. +func (o *Server) HasServerGroup() bool { + if o != nil && !IsNil(o.ServerGroup) { + return true + } + + return false +} + +// SetServerGroup gets a reference to the given string and assigns it to the ServerGroup field. +func (o *Server) SetServerGroup(v *string) { + o.ServerGroup = v +} + +// GetServiceAccountMails returns the ServiceAccountMails field value if set, zero value otherwise. +func (o *Server) GetServiceAccountMails() *[]string { + if o == nil || IsNil(o.ServiceAccountMails) { + var ret *[]string + return ret + } + return o.ServiceAccountMails +} + +// GetServiceAccountMailsOk returns a tuple with the ServiceAccountMails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetServiceAccountMailsOk() (*[]string, bool) { + if o == nil || IsNil(o.ServiceAccountMails) { + return nil, false + } + return o.ServiceAccountMails, true +} + +// HasServiceAccountMails returns a boolean if a field has been set. +func (o *Server) HasServiceAccountMails() bool { + if o != nil && !IsNil(o.ServiceAccountMails) { + return true + } + + return false +} + +// SetServiceAccountMails gets a reference to the given []string and assigns it to the ServiceAccountMails field. +func (o *Server) SetServiceAccountMails(v *[]string) { + o.ServiceAccountMails = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Server) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// 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 *Server) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Server) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Server) SetStatus(v *string) { + o.Status = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Server) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Server) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Server) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +// GetUserData returns the UserData field value if set, zero value otherwise. +func (o *Server) GetUserData() *string { + if o == nil || IsNil(o.UserData) { + var ret *string + return ret + } + return o.UserData +} + +// GetUserDataOk returns a tuple with the UserData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetUserDataOk() (*string, bool) { + if o == nil || IsNil(o.UserData) { + return nil, false + } + return o.UserData, true +} + +// HasUserData returns a boolean if a field has been set. +func (o *Server) HasUserData() bool { + if o != nil && !IsNil(o.UserData) { + return true + } + + return false +} + +// SetUserData gets a reference to the given string and assigns it to the UserData field. +func (o *Server) SetUserData(v *string) { + o.UserData = v +} + +// GetVolumes returns the Volumes field value if set, zero value otherwise. +func (o *Server) GetVolumes() *[]string { + if o == nil || IsNil(o.Volumes) { + var ret *[]string + return ret + } + return o.Volumes +} + +// GetVolumesOk returns a tuple with the Volumes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Server) GetVolumesOk() (*[]string, bool) { + if o == nil || IsNil(o.Volumes) { + return nil, false + } + return o.Volumes, true +} + +// HasVolumes returns a boolean if a field has been set. +func (o *Server) HasVolumes() bool { + if o != nil && !IsNil(o.Volumes) { + return true + } + + return false +} + +// SetVolumes gets a reference to the given []string and assigns it to the Volumes field. +func (o *Server) SetVolumes(v *[]string) { + o.Volumes = v +} + +func (o Server) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvailabilityZone) { + toSerialize["availabilityZone"] = o.AvailabilityZone + } + if !IsNil(o.BootVolume) { + toSerialize["bootVolume"] = o.BootVolume + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.ErrorMessage) { + toSerialize["errorMessage"] = o.ErrorMessage + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ImageId) { + toSerialize["imageId"] = o.ImageId + } + if !IsNil(o.KeypairName) { + toSerialize["keypairName"] = o.KeypairName + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.LaunchedAt) { + toSerialize["launchedAt"] = o.LaunchedAt + } + toSerialize["machineType"] = o.MachineType + if !IsNil(o.MaintenanceWindow) { + toSerialize["maintenanceWindow"] = o.MaintenanceWindow + } + toSerialize["name"] = o.Name + if !IsNil(o.Networking) { + toSerialize["networking"] = o.Networking + } + if !IsNil(o.Nics) { + toSerialize["nics"] = o.Nics + } + if !IsNil(o.PowerStatus) { + toSerialize["powerStatus"] = o.PowerStatus + } + if !IsNil(o.SecurityGroups) { + toSerialize["securityGroups"] = o.SecurityGroups + } + if !IsNil(o.ServerGroup) { + toSerialize["serverGroup"] = o.ServerGroup + } + if !IsNil(o.ServiceAccountMails) { + toSerialize["serviceAccountMails"] = o.ServiceAccountMails + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + if !IsNil(o.UserData) { + toSerialize["userData"] = o.UserData + } + if !IsNil(o.Volumes) { + toSerialize["volumes"] = o.Volumes + } + return toSerialize, nil +} + +type NullableServer struct { + value *Server + isSet bool +} + +func (v NullableServer) Get() *Server { + return v.value +} + +func (v *NullableServer) Set(val *Server) { + v.value = val + v.isSet = true +} + +func (v NullableServer) IsSet() bool { + return v.isSet +} + +func (v *NullableServer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServer(val *Server) *NullableServer { + return &NullableServer{value: val, isSet: true} +} + +func (v NullableServer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_server_console_url.go b/services/iaasalpha/model_server_console_url.go index 89ebac854..ae465d320 100644 --- a/services/iaasalpha/model_server_console_url.go +++ b/services/iaasalpha/model_server_console_url.go @@ -10,8 +10,101 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the ServerConsoleUrl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServerConsoleUrl{} + // ServerConsoleUrl Object that represents a server console URL. type ServerConsoleUrl struct { // REQUIRED Url *string `json:"url"` } + +type _ServerConsoleUrl ServerConsoleUrl + +// NewServerConsoleUrl instantiates a new ServerConsoleUrl 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 NewServerConsoleUrl(url *string) *ServerConsoleUrl { + this := ServerConsoleUrl{} + this.Url = url + return &this +} + +// NewServerConsoleUrlWithDefaults instantiates a new ServerConsoleUrl 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 NewServerConsoleUrlWithDefaults() *ServerConsoleUrl { + this := ServerConsoleUrl{} + return &this +} + +// GetUrl returns the Url field value +func (o *ServerConsoleUrl) GetUrl() *string { + if o == nil { + var ret *string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *ServerConsoleUrl) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url, true +} + +// SetUrl sets field value +func (o *ServerConsoleUrl) SetUrl(v *string) { + o.Url = v +} + +func (o ServerConsoleUrl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + return toSerialize, nil +} + +type NullableServerConsoleUrl struct { + value *ServerConsoleUrl + isSet bool +} + +func (v NullableServerConsoleUrl) Get() *ServerConsoleUrl { + return v.value +} + +func (v *NullableServerConsoleUrl) Set(val *ServerConsoleUrl) { + v.value = val + v.isSet = true +} + +func (v NullableServerConsoleUrl) IsSet() bool { + return v.isSet +} + +func (v *NullableServerConsoleUrl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServerConsoleUrl(val *ServerConsoleUrl) *NullableServerConsoleUrl { + return &NullableServerConsoleUrl{value: val, isSet: true} +} + +func (v NullableServerConsoleUrl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServerConsoleUrl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_server_group.go b/services/iaasalpha/model_server_group.go index 23af198f6..e620b989f 100644 --- a/services/iaasalpha/model_server_group.go +++ b/services/iaasalpha/model_server_group.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the ServerGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServerGroup{} + // ServerGroup Definition of a server group. type ServerGroup struct { // Universally Unique Identifier (UUID). @@ -23,3 +30,185 @@ type ServerGroup struct { // REQUIRED Policy *string `json:"policy"` } + +type _ServerGroup ServerGroup + +// NewServerGroup instantiates a new ServerGroup 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 NewServerGroup(name *string, policy *string) *ServerGroup { + this := ServerGroup{} + this.Name = name + this.Policy = policy + return &this +} + +// NewServerGroupWithDefaults instantiates a new ServerGroup 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 NewServerGroupWithDefaults() *ServerGroup { + this := ServerGroup{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ServerGroup) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *ServerGroup) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ServerGroup) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ServerGroup) SetId(v *string) { + o.Id = v +} + +// GetMembers returns the Members field value if set, zero value otherwise. +func (o *ServerGroup) GetMembers() *[]string { + if o == nil || IsNil(o.Members) { + var ret *[]string + return ret + } + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerGroup) GetMembersOk() (*[]string, bool) { + if o == nil || IsNil(o.Members) { + return nil, false + } + return o.Members, true +} + +// HasMembers returns a boolean if a field has been set. +func (o *ServerGroup) HasMembers() bool { + if o != nil && !IsNil(o.Members) { + return true + } + + return false +} + +// SetMembers gets a reference to the given []string and assigns it to the Members field. +func (o *ServerGroup) SetMembers(v *[]string) { + o.Members = v +} + +// GetName returns the Name field value +func (o *ServerGroup) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ServerGroup) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *ServerGroup) SetName(v *string) { + o.Name = v +} + +// GetPolicy returns the Policy field value +func (o *ServerGroup) GetPolicy() *string { + if o == nil { + var ret *string + return ret + } + + return o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value +// and a boolean to check if the value has been set. +func (o *ServerGroup) GetPolicyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Policy, true +} + +// SetPolicy sets field value +func (o *ServerGroup) SetPolicy(v *string) { + o.Policy = v +} + +func (o ServerGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Members) { + toSerialize["members"] = o.Members + } + toSerialize["name"] = o.Name + toSerialize["policy"] = o.Policy + return toSerialize, nil +} + +type NullableServerGroup struct { + value *ServerGroup + isSet bool +} + +func (v NullableServerGroup) Get() *ServerGroup { + return v.value +} + +func (v *NullableServerGroup) Set(val *ServerGroup) { + v.value = val + v.isSet = true +} + +func (v NullableServerGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableServerGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServerGroup(val *ServerGroup) *NullableServerGroup { + return &NullableServerGroup{value: val, isSet: true} +} + +func (v NullableServerGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServerGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_server_group_list_response.go b/services/iaasalpha/model_server_group_list_response.go index b1d1a4cd8..67db3b63b 100644 --- a/services/iaasalpha/model_server_group_list_response.go +++ b/services/iaasalpha/model_server_group_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the ServerGroupListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServerGroupListResponse{} + // ServerGroupListResponse Response object for server-group list request. type ServerGroupListResponse struct { // A list of servers-groups. // REQUIRED Items *[]ServerGroup `json:"items"` } + +type _ServerGroupListResponse ServerGroupListResponse + +// NewServerGroupListResponse instantiates a new ServerGroupListResponse 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 NewServerGroupListResponse(items *[]ServerGroup) *ServerGroupListResponse { + this := ServerGroupListResponse{} + this.Items = items + return &this +} + +// NewServerGroupListResponseWithDefaults instantiates a new ServerGroupListResponse 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 NewServerGroupListResponseWithDefaults() *ServerGroupListResponse { + this := ServerGroupListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *ServerGroupListResponse) GetItems() *[]ServerGroup { + if o == nil { + var ret *[]ServerGroup + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ServerGroupListResponse) GetItemsOk() (*[]ServerGroup, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ServerGroupListResponse) SetItems(v *[]ServerGroup) { + o.Items = v +} + +func (o ServerGroupListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableServerGroupListResponse struct { + value *ServerGroupListResponse + isSet bool +} + +func (v NullableServerGroupListResponse) Get() *ServerGroupListResponse { + return v.value +} + +func (v *NullableServerGroupListResponse) Set(val *ServerGroupListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableServerGroupListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableServerGroupListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServerGroupListResponse(val *ServerGroupListResponse) *NullableServerGroupListResponse { + return &NullableServerGroupListResponse{value: val, isSet: true} +} + +func (v NullableServerGroupListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServerGroupListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_server_list_response.go b/services/iaasalpha/model_server_list_response.go index 1f467fbe7..ee671450f 100644 --- a/services/iaasalpha/model_server_list_response.go +++ b/services/iaasalpha/model_server_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the ServerListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServerListResponse{} + // ServerListResponse Response object for server list request. type ServerListResponse struct { // A list of servers. // REQUIRED Items *[]Server `json:"items"` } + +type _ServerListResponse ServerListResponse + +// NewServerListResponse instantiates a new ServerListResponse 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 NewServerListResponse(items *[]Server) *ServerListResponse { + this := ServerListResponse{} + this.Items = items + return &this +} + +// NewServerListResponseWithDefaults instantiates a new ServerListResponse 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 NewServerListResponseWithDefaults() *ServerListResponse { + this := ServerListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *ServerListResponse) GetItems() *[]Server { + if o == nil { + var ret *[]Server + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ServerListResponse) GetItemsOk() (*[]Server, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ServerListResponse) SetItems(v *[]Server) { + o.Items = v +} + +func (o ServerListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableServerListResponse struct { + value *ServerListResponse + isSet bool +} + +func (v NullableServerListResponse) Get() *ServerListResponse { + return v.value +} + +func (v *NullableServerListResponse) Set(val *ServerListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableServerListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableServerListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServerListResponse(val *ServerListResponse) *NullableServerListResponse { + return &NullableServerListResponse{value: val, isSet: true} +} + +func (v NullableServerListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServerListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_server_maintenance.go b/services/iaasalpha/model_server_maintenance.go index aa45183c9..468cbcb33 100644 --- a/services/iaasalpha/model_server_maintenance.go +++ b/services/iaasalpha/model_server_maintenance.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the ServerMaintenance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServerMaintenance{} + // ServerMaintenance Object that represents the information about the next planned server maintenance window. type ServerMaintenance struct { Details *string `json:"details,omitempty"` @@ -26,3 +30,176 @@ type ServerMaintenance struct { // REQUIRED Status *string `json:"status"` } + +type _ServerMaintenance ServerMaintenance + +// NewServerMaintenance instantiates a new ServerMaintenance 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 NewServerMaintenance(endsAt *time.Time, startsAt *time.Time, status *string) *ServerMaintenance { + this := ServerMaintenance{} + this.EndsAt = endsAt + this.StartsAt = startsAt + this.Status = status + return &this +} + +// NewServerMaintenanceWithDefaults instantiates a new ServerMaintenance 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 NewServerMaintenanceWithDefaults() *ServerMaintenance { + this := ServerMaintenance{} + return &this +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ServerMaintenance) GetDetails() *string { + if o == nil || IsNil(o.Details) { + var ret *string + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerMaintenance) GetDetailsOk() (*string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ServerMaintenance) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given string and assigns it to the Details field. +func (o *ServerMaintenance) SetDetails(v *string) { + o.Details = v +} + +// GetEndsAt returns the EndsAt field value +func (o *ServerMaintenance) GetEndsAt() *time.Time { + if o == nil { + var ret *time.Time + return ret + } + + return o.EndsAt +} + +// GetEndsAtOk returns a tuple with the EndsAt field value +// and a boolean to check if the value has been set. +func (o *ServerMaintenance) GetEndsAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.EndsAt, true +} + +// SetEndsAt sets field value +func (o *ServerMaintenance) SetEndsAt(v *time.Time) { + o.EndsAt = v +} + +// GetStartsAt returns the StartsAt field value +func (o *ServerMaintenance) GetStartsAt() *time.Time { + if o == nil { + var ret *time.Time + return ret + } + + return o.StartsAt +} + +// GetStartsAtOk returns a tuple with the StartsAt field value +// and a boolean to check if the value has been set. +func (o *ServerMaintenance) GetStartsAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.StartsAt, true +} + +// SetStartsAt sets field value +func (o *ServerMaintenance) SetStartsAt(v *time.Time) { + o.StartsAt = v +} + +// GetStatus returns the Status field value +func (o *ServerMaintenance) GetStatus() *string { + if o == nil { + var ret *string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ServerMaintenance) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status, true +} + +// SetStatus sets field value +func (o *ServerMaintenance) SetStatus(v *string) { + o.Status = v +} + +func (o ServerMaintenance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + toSerialize["endsAt"] = o.EndsAt + toSerialize["startsAt"] = o.StartsAt + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableServerMaintenance struct { + value *ServerMaintenance + isSet bool +} + +func (v NullableServerMaintenance) Get() *ServerMaintenance { + return v.value +} + +func (v *NullableServerMaintenance) Set(val *ServerMaintenance) { + v.value = val + v.isSet = true +} + +func (v NullableServerMaintenance) IsSet() bool { + return v.isSet +} + +func (v *NullableServerMaintenance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServerMaintenance(val *ServerMaintenance) *NullableServerMaintenance { + return &NullableServerMaintenance{value: val, isSet: true} +} + +func (v NullableServerMaintenance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServerMaintenance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_server_network.go b/services/iaasalpha/model_server_network.go index 4da4b2a14..3e69c9187 100644 --- a/services/iaasalpha/model_server_network.go +++ b/services/iaasalpha/model_server_network.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the ServerNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServerNetwork{} + // ServerNetwork Describes the object that matches servers to its networks. type ServerNetwork struct { // A list of IPs or CIDR notations. @@ -38,3 +45,370 @@ type ServerNetwork struct { // A list of UUIDs. SecurityGroups *[]string `json:"securityGroups,omitempty"` } + +type _ServerNetwork ServerNetwork + +// NewServerNetwork instantiates a new ServerNetwork 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 NewServerNetwork(mac *string, networkId *string, networkName *string, nicId *string, nicSecurity *bool) *ServerNetwork { + this := ServerNetwork{} + this.Mac = mac + this.NetworkId = networkId + this.NetworkName = networkName + this.NicId = nicId + this.NicSecurity = nicSecurity + return &this +} + +// NewServerNetworkWithDefaults instantiates a new ServerNetwork 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 NewServerNetworkWithDefaults() *ServerNetwork { + this := ServerNetwork{} + var nicSecurity bool = true + this.NicSecurity = &nicSecurity + return &this +} + +// GetAllowedAddresses returns the AllowedAddresses field value if set, zero value otherwise. +func (o *ServerNetwork) GetAllowedAddresses() *[]AllowedAddressesInner { + if o == nil || IsNil(o.AllowedAddresses) { + var ret *[]AllowedAddressesInner + return ret + } + return o.AllowedAddresses +} + +// 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 *ServerNetwork) GetAllowedAddressesOk() (*[]AllowedAddressesInner, bool) { + if o == nil || IsNil(o.AllowedAddresses) { + return nil, false + } + return o.AllowedAddresses, true +} + +// HasAllowedAddresses returns a boolean if a field has been set. +func (o *ServerNetwork) HasAllowedAddresses() bool { + if o != nil && !IsNil(o.AllowedAddresses) { + return true + } + + return false +} + +// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field. +func (o *ServerNetwork) SetAllowedAddresses(v *[]AllowedAddressesInner) { + o.AllowedAddresses = v +} + +// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. +func (o *ServerNetwork) GetIpv4() *string { + if o == nil || IsNil(o.Ipv4) { + var ret *string + return ret + } + return o.Ipv4 +} + +// 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 *ServerNetwork) GetIpv4Ok() (*string, bool) { + if o == nil || IsNil(o.Ipv4) { + return nil, false + } + return o.Ipv4, true +} + +// HasIpv4 returns a boolean if a field has been set. +func (o *ServerNetwork) HasIpv4() bool { + if o != nil && !IsNil(o.Ipv4) { + return true + } + + return false +} + +// SetIpv4 gets a reference to the given string and assigns it to the Ipv4 field. +func (o *ServerNetwork) SetIpv4(v *string) { + o.Ipv4 = v +} + +// GetIpv6 returns the Ipv6 field value if set, zero value otherwise. +func (o *ServerNetwork) GetIpv6() *string { + if o == nil || IsNil(o.Ipv6) { + var ret *string + return ret + } + return o.Ipv6 +} + +// 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 *ServerNetwork) GetIpv6Ok() (*string, bool) { + if o == nil || IsNil(o.Ipv6) { + return nil, false + } + return o.Ipv6, true +} + +// HasIpv6 returns a boolean if a field has been set. +func (o *ServerNetwork) HasIpv6() bool { + if o != nil && !IsNil(o.Ipv6) { + return true + } + + return false +} + +// SetIpv6 gets a reference to the given string and assigns it to the Ipv6 field. +func (o *ServerNetwork) SetIpv6(v *string) { + o.Ipv6 = v +} + +// GetMac returns the Mac field value +func (o *ServerNetwork) GetMac() *string { + if o == nil { + var ret *string + return ret + } + + return o.Mac +} + +// GetMacOk returns a tuple with the Mac field value +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetMacOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Mac, true +} + +// SetMac sets field value +func (o *ServerNetwork) SetMac(v *string) { + o.Mac = v +} + +// GetNetworkId returns the NetworkId field value +func (o *ServerNetwork) GetNetworkId() *string { + if o == nil { + var ret *string + return ret + } + + return o.NetworkId +} + +// GetNetworkIdOk returns a tuple with the NetworkId field value +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetNetworkIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NetworkId, true +} + +// SetNetworkId sets field value +func (o *ServerNetwork) SetNetworkId(v *string) { + o.NetworkId = v +} + +// GetNetworkName returns the NetworkName field value +func (o *ServerNetwork) GetNetworkName() *string { + if o == nil { + var ret *string + return ret + } + + return o.NetworkName +} + +// GetNetworkNameOk returns a tuple with the NetworkName field value +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetNetworkNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NetworkName, true +} + +// SetNetworkName sets field value +func (o *ServerNetwork) SetNetworkName(v *string) { + o.NetworkName = v +} + +// GetNicId returns the NicId field value +func (o *ServerNetwork) GetNicId() *string { + if o == nil { + var ret *string + return ret + } + + return o.NicId +} + +// GetNicIdOk returns a tuple with the NicId field value +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetNicIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NicId, true +} + +// SetNicId sets field value +func (o *ServerNetwork) SetNicId(v *string) { + o.NicId = v +} + +// GetNicSecurity returns the NicSecurity field value +func (o *ServerNetwork) GetNicSecurity() *bool { + if o == nil { + var ret *bool + return ret + } + + return o.NicSecurity +} + +// GetNicSecurityOk returns a tuple with the NicSecurity field value +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetNicSecurityOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.NicSecurity, true +} + +// SetNicSecurity sets field value +func (o *ServerNetwork) SetNicSecurity(v *bool) { + o.NicSecurity = v +} + +// GetPublicIp returns the PublicIp field value if set, zero value otherwise. +func (o *ServerNetwork) GetPublicIp() *string { + if o == nil || IsNil(o.PublicIp) { + var ret *string + return ret + } + return o.PublicIp +} + +// GetPublicIpOk returns a tuple with the PublicIp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServerNetwork) GetPublicIpOk() (*string, bool) { + if o == nil || IsNil(o.PublicIp) { + return nil, false + } + return o.PublicIp, true +} + +// HasPublicIp returns a boolean if a field has been set. +func (o *ServerNetwork) HasPublicIp() bool { + if o != nil && !IsNil(o.PublicIp) { + return true + } + + return false +} + +// SetPublicIp gets a reference to the given string and assigns it to the PublicIp field. +func (o *ServerNetwork) SetPublicIp(v *string) { + o.PublicIp = v +} + +// GetSecurityGroups returns the SecurityGroups field value if set, zero value otherwise. +func (o *ServerNetwork) GetSecurityGroups() *[]string { + if o == nil || IsNil(o.SecurityGroups) { + var ret *[]string + return ret + } + return o.SecurityGroups +} + +// 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 *ServerNetwork) GetSecurityGroupsOk() (*[]string, bool) { + if o == nil || IsNil(o.SecurityGroups) { + return nil, false + } + return o.SecurityGroups, true +} + +// HasSecurityGroups returns a boolean if a field has been set. +func (o *ServerNetwork) HasSecurityGroups() bool { + if o != nil && !IsNil(o.SecurityGroups) { + return true + } + + return false +} + +// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. +func (o *ServerNetwork) SetSecurityGroups(v *[]string) { + o.SecurityGroups = v +} + +func (o ServerNetwork) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowedAddresses) { + toSerialize["allowedAddresses"] = o.AllowedAddresses + } + if !IsNil(o.Ipv4) { + toSerialize["ipv4"] = o.Ipv4 + } + if !IsNil(o.Ipv6) { + toSerialize["ipv6"] = o.Ipv6 + } + toSerialize["mac"] = o.Mac + toSerialize["networkId"] = o.NetworkId + toSerialize["networkName"] = o.NetworkName + toSerialize["nicId"] = o.NicId + toSerialize["nicSecurity"] = o.NicSecurity + if !IsNil(o.PublicIp) { + toSerialize["publicIp"] = o.PublicIp + } + if !IsNil(o.SecurityGroups) { + toSerialize["securityGroups"] = o.SecurityGroups + } + return toSerialize, nil +} + +type NullableServerNetwork struct { + value *ServerNetwork + isSet bool +} + +func (v NullableServerNetwork) Get() *ServerNetwork { + return v.value +} + +func (v *NullableServerNetwork) Set(val *ServerNetwork) { + v.value = val + v.isSet = true +} + +func (v NullableServerNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableServerNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServerNetwork(val *ServerNetwork) *NullableServerNetwork { + return &NullableServerNetwork{value: val, isSet: true} +} + +func (v NullableServerNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServerNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_service_account_mail_list_response.go b/services/iaasalpha/model_service_account_mail_list_response.go index 23ea18ab5..f5114d775 100644 --- a/services/iaasalpha/model_service_account_mail_list_response.go +++ b/services/iaasalpha/model_service_account_mail_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the ServiceAccountMailListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceAccountMailListResponse{} + // ServiceAccountMailListResponse Service account mail list response. type ServiceAccountMailListResponse struct { // A list of service account mails. // REQUIRED Items *[]string `json:"items"` } + +type _ServiceAccountMailListResponse ServiceAccountMailListResponse + +// NewServiceAccountMailListResponse instantiates a new ServiceAccountMailListResponse 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 NewServiceAccountMailListResponse(items *[]string) *ServiceAccountMailListResponse { + this := ServiceAccountMailListResponse{} + this.Items = items + return &this +} + +// NewServiceAccountMailListResponseWithDefaults instantiates a new ServiceAccountMailListResponse 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 NewServiceAccountMailListResponseWithDefaults() *ServiceAccountMailListResponse { + this := ServiceAccountMailListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *ServiceAccountMailListResponse) GetItems() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ServiceAccountMailListResponse) GetItemsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ServiceAccountMailListResponse) SetItems(v *[]string) { + o.Items = v +} + +func (o ServiceAccountMailListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableServiceAccountMailListResponse struct { + value *ServiceAccountMailListResponse + isSet bool +} + +func (v NullableServiceAccountMailListResponse) Get() *ServiceAccountMailListResponse { + return v.value +} + +func (v *NullableServiceAccountMailListResponse) Set(val *ServiceAccountMailListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableServiceAccountMailListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceAccountMailListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceAccountMailListResponse(val *ServiceAccountMailListResponse) *NullableServiceAccountMailListResponse { + return &NullableServiceAccountMailListResponse{value: val, isSet: true} +} + +func (v NullableServiceAccountMailListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceAccountMailListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_update_area_address_family.go b/services/iaasalpha/model_update_area_address_family.go index 74b8ec3ca..972bfcbb4 100644 --- a/services/iaasalpha/model_update_area_address_family.go +++ b/services/iaasalpha/model_update_area_address_family.go @@ -10,7 +10,107 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the UpdateAreaAddressFamily type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAreaAddressFamily{} + // UpdateAreaAddressFamily The addressFamily object for a area update request. type UpdateAreaAddressFamily struct { Ipv4 *UpdateAreaIPv4 `json:"ipv4,omitempty"` } + +// NewUpdateAreaAddressFamily instantiates a new UpdateAreaAddressFamily 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 NewUpdateAreaAddressFamily() *UpdateAreaAddressFamily { + this := UpdateAreaAddressFamily{} + return &this +} + +// NewUpdateAreaAddressFamilyWithDefaults instantiates a new UpdateAreaAddressFamily 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 NewUpdateAreaAddressFamilyWithDefaults() *UpdateAreaAddressFamily { + this := UpdateAreaAddressFamily{} + return &this +} + +// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. +func (o *UpdateAreaAddressFamily) GetIpv4() *UpdateAreaIPv4 { + if o == nil || IsNil(o.Ipv4) { + var ret *UpdateAreaIPv4 + return ret + } + return o.Ipv4 +} + +// 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 *UpdateAreaAddressFamily) GetIpv4Ok() (*UpdateAreaIPv4, bool) { + if o == nil || IsNil(o.Ipv4) { + return nil, false + } + return o.Ipv4, true +} + +// HasIpv4 returns a boolean if a field has been set. +func (o *UpdateAreaAddressFamily) HasIpv4() bool { + if o != nil && !IsNil(o.Ipv4) { + return true + } + + return false +} + +// SetIpv4 gets a reference to the given UpdateAreaIPv4 and assigns it to the Ipv4 field. +func (o *UpdateAreaAddressFamily) SetIpv4(v *UpdateAreaIPv4) { + o.Ipv4 = v +} + +func (o UpdateAreaAddressFamily) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ipv4) { + toSerialize["ipv4"] = o.Ipv4 + } + return toSerialize, nil +} + +type NullableUpdateAreaAddressFamily struct { + value *UpdateAreaAddressFamily + isSet bool +} + +func (v NullableUpdateAreaAddressFamily) Get() *UpdateAreaAddressFamily { + return v.value +} + +func (v *NullableUpdateAreaAddressFamily) Set(val *UpdateAreaAddressFamily) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAreaAddressFamily) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAreaAddressFamily) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAreaAddressFamily(val *UpdateAreaAddressFamily) *NullableUpdateAreaAddressFamily { + return &NullableUpdateAreaAddressFamily{value: val, isSet: true} +} + +func (v NullableUpdateAreaAddressFamily) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAreaAddressFamily) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_update_area_ipv4.go b/services/iaasalpha/model_update_area_ipv4.go index 85a06553c..e40374abf 100644 --- a/services/iaasalpha/model_update_area_ipv4.go +++ b/services/iaasalpha/model_update_area_ipv4.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the UpdateAreaIPv4 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAreaIPv4{} + // UpdateAreaIPv4 The update object for a IPv4 network area. type UpdateAreaIPv4 struct { DefaultNameservers *[]string `json:"defaultNameservers,omitempty"` @@ -20,3 +27,201 @@ type UpdateAreaIPv4 struct { // The minimal prefix length for networks in the network area. MinPrefixLen *int64 `json:"minPrefixLen,omitempty"` } + +// NewUpdateAreaIPv4 instantiates a new UpdateAreaIPv4 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 NewUpdateAreaIPv4() *UpdateAreaIPv4 { + this := UpdateAreaIPv4{} + return &this +} + +// NewUpdateAreaIPv4WithDefaults instantiates a new UpdateAreaIPv4 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 NewUpdateAreaIPv4WithDefaults() *UpdateAreaIPv4 { + this := UpdateAreaIPv4{} + return &this +} + +// GetDefaultNameservers returns the DefaultNameservers field value if set, zero value otherwise. +func (o *UpdateAreaIPv4) GetDefaultNameservers() *[]string { + if o == nil || IsNil(o.DefaultNameservers) { + var ret *[]string + return ret + } + return o.DefaultNameservers +} + +// GetDefaultNameserversOk returns a tuple with the DefaultNameservers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAreaIPv4) GetDefaultNameserversOk() (*[]string, bool) { + if o == nil || IsNil(o.DefaultNameservers) { + return nil, false + } + return o.DefaultNameservers, true +} + +// HasDefaultNameservers returns a boolean if a field has been set. +func (o *UpdateAreaIPv4) HasDefaultNameservers() bool { + if o != nil && !IsNil(o.DefaultNameservers) { + return true + } + + return false +} + +// SetDefaultNameservers gets a reference to the given []string and assigns it to the DefaultNameservers field. +func (o *UpdateAreaIPv4) SetDefaultNameservers(v *[]string) { + o.DefaultNameservers = v +} + +// GetDefaultPrefixLen returns the DefaultPrefixLen field value if set, zero value otherwise. +func (o *UpdateAreaIPv4) GetDefaultPrefixLen() *int64 { + if o == nil || IsNil(o.DefaultPrefixLen) { + var ret *int64 + return ret + } + return o.DefaultPrefixLen +} + +// GetDefaultPrefixLenOk returns a tuple with the DefaultPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAreaIPv4) GetDefaultPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.DefaultPrefixLen) { + return nil, false + } + return o.DefaultPrefixLen, true +} + +// HasDefaultPrefixLen returns a boolean if a field has been set. +func (o *UpdateAreaIPv4) HasDefaultPrefixLen() bool { + if o != nil && !IsNil(o.DefaultPrefixLen) { + return true + } + + return false +} + +// SetDefaultPrefixLen gets a reference to the given int64 and assigns it to the DefaultPrefixLen field. +func (o *UpdateAreaIPv4) SetDefaultPrefixLen(v *int64) { + o.DefaultPrefixLen = v +} + +// GetMaxPrefixLen returns the MaxPrefixLen field value if set, zero value otherwise. +func (o *UpdateAreaIPv4) GetMaxPrefixLen() *int64 { + if o == nil || IsNil(o.MaxPrefixLen) { + var ret *int64 + return ret + } + return o.MaxPrefixLen +} + +// GetMaxPrefixLenOk returns a tuple with the MaxPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAreaIPv4) GetMaxPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.MaxPrefixLen) { + return nil, false + } + return o.MaxPrefixLen, true +} + +// HasMaxPrefixLen returns a boolean if a field has been set. +func (o *UpdateAreaIPv4) HasMaxPrefixLen() bool { + if o != nil && !IsNil(o.MaxPrefixLen) { + return true + } + + return false +} + +// SetMaxPrefixLen gets a reference to the given int64 and assigns it to the MaxPrefixLen field. +func (o *UpdateAreaIPv4) SetMaxPrefixLen(v *int64) { + o.MaxPrefixLen = v +} + +// GetMinPrefixLen returns the MinPrefixLen field value if set, zero value otherwise. +func (o *UpdateAreaIPv4) GetMinPrefixLen() *int64 { + if o == nil || IsNil(o.MinPrefixLen) { + var ret *int64 + return ret + } + return o.MinPrefixLen +} + +// GetMinPrefixLenOk returns a tuple with the MinPrefixLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAreaIPv4) GetMinPrefixLenOk() (*int64, bool) { + if o == nil || IsNil(o.MinPrefixLen) { + return nil, false + } + return o.MinPrefixLen, true +} + +// HasMinPrefixLen returns a boolean if a field has been set. +func (o *UpdateAreaIPv4) HasMinPrefixLen() bool { + if o != nil && !IsNil(o.MinPrefixLen) { + return true + } + + return false +} + +// SetMinPrefixLen gets a reference to the given int64 and assigns it to the MinPrefixLen field. +func (o *UpdateAreaIPv4) SetMinPrefixLen(v *int64) { + o.MinPrefixLen = v +} + +func (o UpdateAreaIPv4) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultNameservers) { + toSerialize["defaultNameservers"] = o.DefaultNameservers + } + if !IsNil(o.DefaultPrefixLen) { + toSerialize["defaultPrefixLen"] = o.DefaultPrefixLen + } + if !IsNil(o.MaxPrefixLen) { + toSerialize["maxPrefixLen"] = o.MaxPrefixLen + } + if !IsNil(o.MinPrefixLen) { + toSerialize["minPrefixLen"] = o.MinPrefixLen + } + return toSerialize, nil +} + +type NullableUpdateAreaIPv4 struct { + value *UpdateAreaIPv4 + isSet bool +} + +func (v NullableUpdateAreaIPv4) Get() *UpdateAreaIPv4 { + return v.value +} + +func (v *NullableUpdateAreaIPv4) Set(val *UpdateAreaIPv4) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAreaIPv4) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAreaIPv4) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAreaIPv4(val *UpdateAreaIPv4) *NullableUpdateAreaIPv4 { + return &NullableUpdateAreaIPv4{value: val, isSet: true} +} + +func (v NullableUpdateAreaIPv4) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAreaIPv4) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_update_attached_volume_payload.go b/services/iaasalpha/model_update_attached_volume_payload.go index 7ebb0cac6..40a2405e3 100644 --- a/services/iaasalpha/model_update_attached_volume_payload.go +++ b/services/iaasalpha/model_update_attached_volume_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the UpdateAttachedVolumePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAttachedVolumePayload{} + // UpdateAttachedVolumePayload Object that represents a Volume attachment to a server. type UpdateAttachedVolumePayload struct { // Delete the volume during the termination of the server. Defaults to false. @@ -19,3 +26,170 @@ type UpdateAttachedVolumePayload struct { // Universally Unique Identifier (UUID). VolumeId *string `json:"volumeId,omitempty"` } + +// NewUpdateAttachedVolumePayload instantiates a new UpdateAttachedVolumePayload 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 NewUpdateAttachedVolumePayload() *UpdateAttachedVolumePayload { + this := UpdateAttachedVolumePayload{} + var deleteOnTermination bool = false + this.DeleteOnTermination = &deleteOnTermination + return &this +} + +// NewUpdateAttachedVolumePayloadWithDefaults instantiates a new UpdateAttachedVolumePayload 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 NewUpdateAttachedVolumePayloadWithDefaults() *UpdateAttachedVolumePayload { + this := UpdateAttachedVolumePayload{} + var deleteOnTermination bool = false + this.DeleteOnTermination = &deleteOnTermination + return &this +} + +// GetDeleteOnTermination returns the DeleteOnTermination field value if set, zero value otherwise. +func (o *UpdateAttachedVolumePayload) GetDeleteOnTermination() *bool { + if o == nil || IsNil(o.DeleteOnTermination) { + var ret *bool + return ret + } + return o.DeleteOnTermination +} + +// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAttachedVolumePayload) GetDeleteOnTerminationOk() (*bool, bool) { + if o == nil || IsNil(o.DeleteOnTermination) { + return nil, false + } + return o.DeleteOnTermination, true +} + +// HasDeleteOnTermination returns a boolean if a field has been set. +func (o *UpdateAttachedVolumePayload) HasDeleteOnTermination() bool { + if o != nil && !IsNil(o.DeleteOnTermination) { + return true + } + + return false +} + +// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field. +func (o *UpdateAttachedVolumePayload) SetDeleteOnTermination(v *bool) { + o.DeleteOnTermination = v +} + +// GetServerId returns the ServerId field value if set, zero value otherwise. +func (o *UpdateAttachedVolumePayload) GetServerId() *string { + if o == nil || IsNil(o.ServerId) { + var ret *string + return ret + } + return o.ServerId +} + +// GetServerIdOk returns a tuple with the ServerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAttachedVolumePayload) GetServerIdOk() (*string, bool) { + if o == nil || IsNil(o.ServerId) { + return nil, false + } + return o.ServerId, true +} + +// HasServerId returns a boolean if a field has been set. +func (o *UpdateAttachedVolumePayload) HasServerId() bool { + if o != nil && !IsNil(o.ServerId) { + return true + } + + return false +} + +// SetServerId gets a reference to the given string and assigns it to the ServerId field. +func (o *UpdateAttachedVolumePayload) SetServerId(v *string) { + o.ServerId = v +} + +// GetVolumeId returns the VolumeId field value if set, zero value otherwise. +func (o *UpdateAttachedVolumePayload) GetVolumeId() *string { + if o == nil || IsNil(o.VolumeId) { + var ret *string + return ret + } + return o.VolumeId +} + +// GetVolumeIdOk returns a tuple with the VolumeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAttachedVolumePayload) GetVolumeIdOk() (*string, bool) { + if o == nil || IsNil(o.VolumeId) { + return nil, false + } + return o.VolumeId, true +} + +// HasVolumeId returns a boolean if a field has been set. +func (o *UpdateAttachedVolumePayload) HasVolumeId() bool { + if o != nil && !IsNil(o.VolumeId) { + return true + } + + return false +} + +// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field. +func (o *UpdateAttachedVolumePayload) SetVolumeId(v *string) { + o.VolumeId = v +} + +func (o UpdateAttachedVolumePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DeleteOnTermination) { + toSerialize["deleteOnTermination"] = o.DeleteOnTermination + } + if !IsNil(o.ServerId) { + toSerialize["serverId"] = o.ServerId + } + if !IsNil(o.VolumeId) { + toSerialize["volumeId"] = o.VolumeId + } + return toSerialize, nil +} + +type NullableUpdateAttachedVolumePayload struct { + value *UpdateAttachedVolumePayload + isSet bool +} + +func (v NullableUpdateAttachedVolumePayload) Get() *UpdateAttachedVolumePayload { + return v.value +} + +func (v *NullableUpdateAttachedVolumePayload) Set(val *UpdateAttachedVolumePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAttachedVolumePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAttachedVolumePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAttachedVolumePayload(val *UpdateAttachedVolumePayload) *NullableUpdateAttachedVolumePayload { + return &NullableUpdateAttachedVolumePayload{value: val, isSet: true} +} + +func (v NullableUpdateAttachedVolumePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAttachedVolumePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_update_key_pair_payload.go b/services/iaasalpha/model_update_key_pair_payload.go index 6bdf95ef0..80768d2d0 100644 --- a/services/iaasalpha/model_update_key_pair_payload.go +++ b/services/iaasalpha/model_update_key_pair_payload.go @@ -10,8 +10,108 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the UpdateKeyPairPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateKeyPairPayload{} + // UpdateKeyPairPayload Object that represents an update request body of a public key of an SSH keypair. type UpdateKeyPairPayload struct { // Object that represents the labels of an object. Labels *map[string]interface{} `json:"labels,omitempty"` } + +// NewUpdateKeyPairPayload instantiates a new UpdateKeyPairPayload 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 NewUpdateKeyPairPayload() *UpdateKeyPairPayload { + this := UpdateKeyPairPayload{} + return &this +} + +// NewUpdateKeyPairPayloadWithDefaults instantiates a new UpdateKeyPairPayload 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 NewUpdateKeyPairPayloadWithDefaults() *UpdateKeyPairPayload { + this := UpdateKeyPairPayload{} + return &this +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateKeyPairPayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *UpdateKeyPairPayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateKeyPairPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *UpdateKeyPairPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +func (o UpdateKeyPairPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + return toSerialize, nil +} + +type NullableUpdateKeyPairPayload struct { + value *UpdateKeyPairPayload + isSet bool +} + +func (v NullableUpdateKeyPairPayload) Get() *UpdateKeyPairPayload { + return v.value +} + +func (v *NullableUpdateKeyPairPayload) Set(val *UpdateKeyPairPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateKeyPairPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateKeyPairPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateKeyPairPayload(val *UpdateKeyPairPayload) *NullableUpdateKeyPairPayload { + return &NullableUpdateKeyPairPayload{value: val, isSet: true} +} + +func (v NullableUpdateKeyPairPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateKeyPairPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_update_nic_payload.go b/services/iaasalpha/model_update_nic_payload.go index fa577485d..d0290e825 100644 --- a/services/iaasalpha/model_update_nic_payload.go +++ b/services/iaasalpha/model_update_nic_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the UpdateNICPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateNICPayload{} + // UpdateNICPayload Object that represents a network interface update. type UpdateNICPayload struct { // A list of IPs or CIDR notations. @@ -23,3 +30,236 @@ type UpdateNICPayload struct { // A list of UUIDs. SecurityGroups *[]string `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() *[]AllowedAddressesInner { + if o == nil || IsNil(o.AllowedAddresses) { + var ret *[]AllowedAddressesInner + return ret + } + return o.AllowedAddresses +} + +// 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() (*[]AllowedAddressesInner, bool) { + if o == nil || IsNil(o.AllowedAddresses) { + return nil, false + } + return o.AllowedAddresses, true +} + +// HasAllowedAddresses returns a boolean if a field has been set. +func (o *UpdateNICPayload) HasAllowedAddresses() bool { + if o != nil && !IsNil(o.AllowedAddresses) { + return true + } + + return false +} + +// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field. +func (o *UpdateNICPayload) SetAllowedAddresses(v *[]AllowedAddressesInner) { + o.AllowedAddresses = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateNICPayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateNICPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *UpdateNICPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateNICPayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateNICPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateNICPayload) SetName(v *string) { + o.Name = v +} + +// GetNicSecurity returns the NicSecurity field value if set, zero value otherwise. +func (o *UpdateNICPayload) GetNicSecurity() *bool { + if o == nil || IsNil(o.NicSecurity) { + var ret *bool + return ret + } + return o.NicSecurity +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.NicSecurity) { + return nil, false + } + return o.NicSecurity, true +} + +// HasNicSecurity returns a boolean if a field has been set. +func (o *UpdateNICPayload) HasNicSecurity() bool { + if o != nil && !IsNil(o.NicSecurity) { + return true + } + + return false +} + +// SetNicSecurity gets a reference to the given bool and assigns it to the NicSecurity field. +func (o *UpdateNICPayload) SetNicSecurity(v *bool) { + o.NicSecurity = v +} + +// GetSecurityGroups returns the SecurityGroups field value if set, zero value otherwise. +func (o *UpdateNICPayload) GetSecurityGroups() *[]string { + if o == nil || IsNil(o.SecurityGroups) { + var ret *[]string + return ret + } + return o.SecurityGroups +} + +// 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() (*[]string, bool) { + if o == nil || IsNil(o.SecurityGroups) { + return nil, false + } + return o.SecurityGroups, true +} + +// HasSecurityGroups returns a boolean if a field has been set. +func (o *UpdateNICPayload) HasSecurityGroups() bool { + if o != nil && !IsNil(o.SecurityGroups) { + return true + } + + return false +} + +// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field. +func (o *UpdateNICPayload) SetSecurityGroups(v *[]string) { + o.SecurityGroups = v +} + +func (o UpdateNICPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowedAddresses) { + toSerialize["allowedAddresses"] = o.AllowedAddresses + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.NicSecurity) { + toSerialize["nicSecurity"] = o.NicSecurity + } + if !IsNil(o.SecurityGroups) { + toSerialize["securityGroups"] = o.SecurityGroups + } + 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) +} diff --git a/services/iaasalpha/model_update_public_ip_payload.go b/services/iaasalpha/model_update_public_ip_payload.go index 8dd9e2d86..35aee757d 100644 --- a/services/iaasalpha/model_update_public_ip_payload.go +++ b/services/iaasalpha/model_update_public_ip_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the UpdatePublicIPPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatePublicIPPayload{} + // UpdatePublicIPPayload Object that represents a public IP. type UpdatePublicIPPayload struct { // Universally Unique Identifier (UUID). @@ -18,4 +25,215 @@ type UpdatePublicIPPayload struct { Ip *string `json:"ip,omitempty"` // Object that represents the labels of an object. Labels *map[string]interface{} `json:"labels,omitempty"` + // Universally Unique Identifier (UUID). + NetworkInterface *NullableString `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() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UpdatePublicIPPayload) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UpdatePublicIPPayload) SetId(v *string) { + o.Id = v +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *UpdatePublicIPPayload) GetIp() *string { + if o == nil || IsNil(o.Ip) { + var ret *string + return ret + } + return o.Ip +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *UpdatePublicIPPayload) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given string and assigns it to the Ip field. +func (o *UpdatePublicIPPayload) SetIp(v *string) { + o.Ip = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdatePublicIPPayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdatePublicIPPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *UpdatePublicIPPayload) SetLabels(v *map[string]interface{}) { + 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() *string { + if o == nil || IsNil(o.NetworkInterface.Get()) { + var ret *string + return ret + } + return o.NetworkInterface.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.NetworkInterface.Get(), o.NetworkInterface.IsSet() +} + +// HasNetworkInterface returns a boolean if a field has been set. +func (o *UpdatePublicIPPayload) HasNetworkInterface() bool { + if o != nil && o.NetworkInterface.IsSet() { + return true + } + + return false +} + +// SetNetworkInterface gets a reference to the given string and assigns it to the NetworkInterface field. +func (o *UpdatePublicIPPayload) SetNetworkInterface(v *string) { + o.NetworkInterface.Set(v) +} + +// SetNetworkInterfaceNil sets the value for NetworkInterface to be an explicit nil +func (o *UpdatePublicIPPayload) SetNetworkInterfaceNil() { + o.NetworkInterface.Set(nil) +} + +// UnsetNetworkInterface ensures that no value is present for NetworkInterface, not even an explicit nil +func (o *UpdatePublicIPPayload) UnsetNetworkInterface() { + o.NetworkInterface.Unset() +} + +func (o UpdatePublicIPPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if o.NetworkInterface.IsSet() { + toSerialize["networkInterface"] = o.NetworkInterface.Get() + } + 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) } diff --git a/services/iaasalpha/model_update_security_group_payload.go b/services/iaasalpha/model_update_security_group_payload.go index 93641b364..8358df1e5 100644 --- a/services/iaasalpha/model_update_security_group_payload.go +++ b/services/iaasalpha/model_update_security_group_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the UpdateSecurityGroupPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateSecurityGroupPayload{} + // UpdateSecurityGroupPayload Object that represents an update request body of a security group. type UpdateSecurityGroupPayload struct { // Description Object. Allows string up to 127 Characters. @@ -19,3 +26,166 @@ type UpdateSecurityGroupPayload struct { // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` } + +// NewUpdateSecurityGroupPayload instantiates a new UpdateSecurityGroupPayload 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 NewUpdateSecurityGroupPayload() *UpdateSecurityGroupPayload { + this := UpdateSecurityGroupPayload{} + return &this +} + +// NewUpdateSecurityGroupPayloadWithDefaults instantiates a new UpdateSecurityGroupPayload 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 NewUpdateSecurityGroupPayloadWithDefaults() *UpdateSecurityGroupPayload { + this := UpdateSecurityGroupPayload{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateSecurityGroupPayload) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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 *UpdateSecurityGroupPayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateSecurityGroupPayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UpdateSecurityGroupPayload) SetDescription(v *string) { + o.Description = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateSecurityGroupPayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *UpdateSecurityGroupPayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateSecurityGroupPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *UpdateSecurityGroupPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateSecurityGroupPayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *UpdateSecurityGroupPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateSecurityGroupPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateSecurityGroupPayload) SetName(v *string) { + o.Name = v +} + +func (o UpdateSecurityGroupPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableUpdateSecurityGroupPayload struct { + value *UpdateSecurityGroupPayload + isSet bool +} + +func (v NullableUpdateSecurityGroupPayload) Get() *UpdateSecurityGroupPayload { + return v.value +} + +func (v *NullableUpdateSecurityGroupPayload) Set(val *UpdateSecurityGroupPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateSecurityGroupPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateSecurityGroupPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateSecurityGroupPayload(val *UpdateSecurityGroupPayload) *NullableUpdateSecurityGroupPayload { + return &NullableUpdateSecurityGroupPayload{value: val, isSet: true} +} + +func (v NullableUpdateSecurityGroupPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateSecurityGroupPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_update_server_payload.go b/services/iaasalpha/model_update_server_payload.go index 5b2e64ceb..a0be49e13 100644 --- a/services/iaasalpha/model_update_server_payload.go +++ b/services/iaasalpha/model_update_server_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the UpdateServerPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateServerPayload{} + // UpdateServerPayload Object that represents an update request body of a server. type UpdateServerPayload struct { // Object that represents the labels of an object. @@ -17,3 +24,131 @@ type UpdateServerPayload struct { // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` } + +// NewUpdateServerPayload instantiates a new UpdateServerPayload 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 NewUpdateServerPayload() *UpdateServerPayload { + this := UpdateServerPayload{} + return &this +} + +// NewUpdateServerPayloadWithDefaults instantiates a new UpdateServerPayload 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 NewUpdateServerPayloadWithDefaults() *UpdateServerPayload { + this := UpdateServerPayload{} + return &this +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateServerPayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *UpdateServerPayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateServerPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *UpdateServerPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateServerPayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *UpdateServerPayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateServerPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateServerPayload) SetName(v *string) { + o.Name = v +} + +func (o UpdateServerPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableUpdateServerPayload struct { + value *UpdateServerPayload + isSet bool +} + +func (v NullableUpdateServerPayload) Get() *UpdateServerPayload { + return v.value +} + +func (v *NullableUpdateServerPayload) Set(val *UpdateServerPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateServerPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateServerPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateServerPayload(val *UpdateServerPayload) *NullableUpdateServerPayload { + return &NullableUpdateServerPayload{value: val, isSet: true} +} + +func (v NullableUpdateServerPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateServerPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_update_volume_payload.go b/services/iaasalpha/model_update_volume_payload.go index a5ea1a12e..001de1372 100644 --- a/services/iaasalpha/model_update_volume_payload.go +++ b/services/iaasalpha/model_update_volume_payload.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the UpdateVolumePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateVolumePayload{} + // UpdateVolumePayload Object that represents an update request body of a volume. type UpdateVolumePayload struct { // Description Object. Allows string up to 127 Characters. @@ -19,3 +26,166 @@ type UpdateVolumePayload struct { // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` } + +// NewUpdateVolumePayload instantiates a new UpdateVolumePayload 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 NewUpdateVolumePayload() *UpdateVolumePayload { + this := UpdateVolumePayload{} + return &this +} + +// NewUpdateVolumePayloadWithDefaults instantiates a new UpdateVolumePayload 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 NewUpdateVolumePayloadWithDefaults() *UpdateVolumePayload { + this := UpdateVolumePayload{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateVolumePayload) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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 *UpdateVolumePayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateVolumePayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UpdateVolumePayload) SetDescription(v *string) { + o.Description = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateVolumePayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *UpdateVolumePayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateVolumePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *UpdateVolumePayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateVolumePayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *UpdateVolumePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateVolumePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateVolumePayload) SetName(v *string) { + o.Name = v +} + +func (o UpdateVolumePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableUpdateVolumePayload struct { + value *UpdateVolumePayload + isSet bool +} + +func (v NullableUpdateVolumePayload) Get() *UpdateVolumePayload { + return v.value +} + +func (v *NullableUpdateVolumePayload) Set(val *UpdateVolumePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateVolumePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateVolumePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateVolumePayload(val *UpdateVolumePayload) *NullableUpdateVolumePayload { + return &NullableUpdateVolumePayload{value: val, isSet: true} +} + +func (v NullableUpdateVolumePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateVolumePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_v1_network_gateway.go b/services/iaasalpha/model_v1_network_gateway.go index 797e979ca..b279652d3 100644 --- a/services/iaasalpha/model_v1_network_gateway.go +++ b/services/iaasalpha/model_v1_network_gateway.go @@ -10,6 +10,71 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the V1NetworkGateway type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &V1NetworkGateway{} + // V1NetworkGateway The gateway of a network. If not specified the first ip of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway. type V1NetworkGateway struct { } + +// NewV1NetworkGateway instantiates a new V1NetworkGateway 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 NewV1NetworkGateway() *V1NetworkGateway { + this := V1NetworkGateway{} + return &this +} + +// NewV1NetworkGatewayWithDefaults instantiates a new V1NetworkGateway 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 NewV1NetworkGatewayWithDefaults() *V1NetworkGateway { + this := V1NetworkGateway{} + return &this +} + +func (o V1NetworkGateway) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + return toSerialize, nil +} + +type NullableV1NetworkGateway struct { + value *V1NetworkGateway + isSet bool +} + +func (v NullableV1NetworkGateway) Get() *V1NetworkGateway { + return v.value +} + +func (v *NullableV1NetworkGateway) Set(val *V1NetworkGateway) { + v.value = val + v.isSet = true +} + +func (v NullableV1NetworkGateway) IsSet() bool { + return v.isSet +} + +func (v *NullableV1NetworkGateway) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableV1NetworkGateway(val *V1NetworkGateway) *NullableV1NetworkGateway { + return &NullableV1NetworkGateway{value: val, isSet: true} +} + +func (v NullableV1NetworkGateway) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableV1NetworkGateway) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_v1_public_network.go b/services/iaasalpha/model_v1_public_network.go index be089363b..36c1b7e43 100644 --- a/services/iaasalpha/model_v1_public_network.go +++ b/services/iaasalpha/model_v1_public_network.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the V1PublicNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &V1PublicNetwork{} + // V1PublicNetwork Public network. type V1PublicNetwork struct { // Classless Inter-Domain Routing (CIDR). // REQUIRED Cidr *string `json:"cidr"` } + +type _V1PublicNetwork V1PublicNetwork + +// NewV1PublicNetwork instantiates a new V1PublicNetwork 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 NewV1PublicNetwork(cidr *string) *V1PublicNetwork { + this := V1PublicNetwork{} + this.Cidr = cidr + return &this +} + +// NewV1PublicNetworkWithDefaults instantiates a new V1PublicNetwork 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 NewV1PublicNetworkWithDefaults() *V1PublicNetwork { + this := V1PublicNetwork{} + return &this +} + +// GetCidr returns the Cidr field value +func (o *V1PublicNetwork) GetCidr() *string { + if o == nil { + var ret *string + return ret + } + + return o.Cidr +} + +// GetCidrOk returns a tuple with the Cidr field value +// and a boolean to check if the value has been set. +func (o *V1PublicNetwork) GetCidrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Cidr, true +} + +// SetCidr sets field value +func (o *V1PublicNetwork) SetCidr(v *string) { + o.Cidr = v +} + +func (o V1PublicNetwork) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cidr"] = o.Cidr + return toSerialize, nil +} + +type NullableV1PublicNetwork struct { + value *V1PublicNetwork + isSet bool +} + +func (v NullableV1PublicNetwork) Get() *V1PublicNetwork { + return v.value +} + +func (v *NullableV1PublicNetwork) Set(val *V1PublicNetwork) { + v.value = val + v.isSet = true +} + +func (v NullableV1PublicNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableV1PublicNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableV1PublicNetwork(val *V1PublicNetwork) *NullableV1PublicNetwork { + return &NullableV1PublicNetwork{value: val, isSet: true} +} + +func (v NullableV1PublicNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableV1PublicNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_v1_security_group_rule_protocol.go b/services/iaasalpha/model_v1_security_group_rule_protocol.go index 339d4b102..7a8513087 100644 --- a/services/iaasalpha/model_v1_security_group_rule_protocol.go +++ b/services/iaasalpha/model_v1_security_group_rule_protocol.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the V1SecurityGroupRuleProtocol type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &V1SecurityGroupRuleProtocol{} + // V1SecurityGroupRuleProtocol The internet protocol which the rule should match. type V1SecurityGroupRuleProtocol struct { // The protocol name which the rule should match. @@ -17,3 +24,131 @@ type V1SecurityGroupRuleProtocol struct { // The protocol number which the rule should match. Protocol *int64 `json:"protocol,omitempty"` } + +// NewV1SecurityGroupRuleProtocol instantiates a new V1SecurityGroupRuleProtocol 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 NewV1SecurityGroupRuleProtocol() *V1SecurityGroupRuleProtocol { + this := V1SecurityGroupRuleProtocol{} + return &this +} + +// NewV1SecurityGroupRuleProtocolWithDefaults instantiates a new V1SecurityGroupRuleProtocol 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 NewV1SecurityGroupRuleProtocolWithDefaults() *V1SecurityGroupRuleProtocol { + this := V1SecurityGroupRuleProtocol{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *V1SecurityGroupRuleProtocol) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *V1SecurityGroupRuleProtocol) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *V1SecurityGroupRuleProtocol) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *V1SecurityGroupRuleProtocol) SetName(v *string) { + o.Name = v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *V1SecurityGroupRuleProtocol) GetProtocol() *int64 { + if o == nil || IsNil(o.Protocol) { + var ret *int64 + return ret + } + return o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *V1SecurityGroupRuleProtocol) GetProtocolOk() (*int64, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *V1SecurityGroupRuleProtocol) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given int64 and assigns it to the Protocol field. +func (o *V1SecurityGroupRuleProtocol) SetProtocol(v *int64) { + o.Protocol = v +} + +func (o V1SecurityGroupRuleProtocol) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + return toSerialize, nil +} + +type NullableV1SecurityGroupRuleProtocol struct { + value *V1SecurityGroupRuleProtocol + isSet bool +} + +func (v NullableV1SecurityGroupRuleProtocol) Get() *V1SecurityGroupRuleProtocol { + return v.value +} + +func (v *NullableV1SecurityGroupRuleProtocol) Set(val *V1SecurityGroupRuleProtocol) { + v.value = val + v.isSet = true +} + +func (v NullableV1SecurityGroupRuleProtocol) IsSet() bool { + return v.isSet +} + +func (v *NullableV1SecurityGroupRuleProtocol) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableV1SecurityGroupRuleProtocol(val *V1SecurityGroupRuleProtocol) *NullableV1SecurityGroupRuleProtocol { + return &NullableV1SecurityGroupRuleProtocol{value: val, isSet: true} +} + +func (v NullableV1SecurityGroupRuleProtocol) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableV1SecurityGroupRuleProtocol) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_v1_volume_attachment_list_response.go b/services/iaasalpha/model_v1_volume_attachment_list_response.go index ab96ea327..2fbcd87c6 100644 --- a/services/iaasalpha/model_v1_volume_attachment_list_response.go +++ b/services/iaasalpha/model_v1_volume_attachment_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the V1VolumeAttachmentListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &V1VolumeAttachmentListResponse{} + // V1VolumeAttachmentListResponse Volume attachment list response. type V1VolumeAttachmentListResponse struct { // A list containing Volume attachments of a server. // REQUIRED Items *[]VolumeAttachment `json:"items"` } + +type _V1VolumeAttachmentListResponse V1VolumeAttachmentListResponse + +// NewV1VolumeAttachmentListResponse instantiates a new V1VolumeAttachmentListResponse 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 NewV1VolumeAttachmentListResponse(items *[]VolumeAttachment) *V1VolumeAttachmentListResponse { + this := V1VolumeAttachmentListResponse{} + this.Items = items + return &this +} + +// NewV1VolumeAttachmentListResponseWithDefaults instantiates a new V1VolumeAttachmentListResponse 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 NewV1VolumeAttachmentListResponseWithDefaults() *V1VolumeAttachmentListResponse { + this := V1VolumeAttachmentListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *V1VolumeAttachmentListResponse) GetItems() *[]VolumeAttachment { + if o == nil { + var ret *[]VolumeAttachment + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *V1VolumeAttachmentListResponse) GetItemsOk() (*[]VolumeAttachment, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *V1VolumeAttachmentListResponse) SetItems(v *[]VolumeAttachment) { + o.Items = v +} + +func (o V1VolumeAttachmentListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableV1VolumeAttachmentListResponse struct { + value *V1VolumeAttachmentListResponse + isSet bool +} + +func (v NullableV1VolumeAttachmentListResponse) Get() *V1VolumeAttachmentListResponse { + return v.value +} + +func (v *NullableV1VolumeAttachmentListResponse) Set(val *V1VolumeAttachmentListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableV1VolumeAttachmentListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableV1VolumeAttachmentListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableV1VolumeAttachmentListResponse(val *V1VolumeAttachmentListResponse) *NullableV1VolumeAttachmentListResponse { + return &NullableV1VolumeAttachmentListResponse{value: val, isSet: true} +} + +func (v NullableV1VolumeAttachmentListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableV1VolumeAttachmentListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_volume.go b/services/iaasalpha/model_volume.go index de7baa034..ee1648167 100644 --- a/services/iaasalpha/model_volume.go +++ b/services/iaasalpha/model_volume.go @@ -11,9 +11,13 @@ API version: 1alpha1 package iaasalpha import ( + "encoding/json" "time" ) +// checks if the Volume type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Volume{} + // Volume Object that represents a volume and its parameters. Used for Creating and returning (get/list). type Volume struct { // Object that represents an availability zone. @@ -41,3 +45,474 @@ type Volume struct { // Date-time when resource was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` } + +type _Volume Volume + +// NewVolume instantiates a new Volume 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 NewVolume(availabilityZone *string) *Volume { + this := Volume{} + this.AvailabilityZone = availabilityZone + return &this +} + +// NewVolumeWithDefaults instantiates a new Volume 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 NewVolumeWithDefaults() *Volume { + this := Volume{} + return &this +} + +// GetAvailabilityZone returns the AvailabilityZone field value +func (o *Volume) GetAvailabilityZone() *string { + if o == nil { + var ret *string + return ret + } + + return o.AvailabilityZone +} + +// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value +// and a boolean to check if the value has been set. +func (o *Volume) GetAvailabilityZoneOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AvailabilityZone, true +} + +// SetAvailabilityZone sets field value +func (o *Volume) SetAvailabilityZone(v *string) { + o.AvailabilityZone = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Volume) GetCreatedAt() *time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret *time.Time + return ret + } + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Volume) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Volume) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Volume) SetCreatedAt(v *time.Time) { + o.CreatedAt = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Volume) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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 *Volume) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Volume) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Volume) SetDescription(v *string) { + o.Description = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Volume) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// 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 *Volume) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Volume) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Volume) SetId(v *string) { + o.Id = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Volume) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *Volume) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Volume) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *Volume) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Volume) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *Volume) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Volume) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Volume) SetName(v *string) { + o.Name = v +} + +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +func (o *Volume) GetPerformanceClass() *string { + if o == nil || IsNil(o.PerformanceClass) { + var ret *string + return ret + } + return o.PerformanceClass +} + +// GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Volume) GetPerformanceClassOk() (*string, bool) { + if o == nil || IsNil(o.PerformanceClass) { + return nil, false + } + return o.PerformanceClass, true +} + +// HasPerformanceClass returns a boolean if a field has been set. +func (o *Volume) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false +} + +// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. +func (o *Volume) SetPerformanceClass(v *string) { + o.PerformanceClass = v +} + +// GetServerId returns the ServerId field value if set, zero value otherwise. +func (o *Volume) GetServerId() *string { + if o == nil || IsNil(o.ServerId) { + var ret *string + return ret + } + return o.ServerId +} + +// GetServerIdOk returns a tuple with the ServerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Volume) GetServerIdOk() (*string, bool) { + if o == nil || IsNil(o.ServerId) { + return nil, false + } + return o.ServerId, true +} + +// HasServerId returns a boolean if a field has been set. +func (o *Volume) HasServerId() bool { + if o != nil && !IsNil(o.ServerId) { + return true + } + + return false +} + +// SetServerId gets a reference to the given string and assigns it to the ServerId field. +func (o *Volume) SetServerId(v *string) { + o.ServerId = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Volume) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Volume) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Volume) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *Volume) SetSize(v *int64) { + o.Size = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *Volume) GetSource() *VolumeSource { + if o == nil || IsNil(o.Source) { + var ret *VolumeSource + return ret + } + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Volume) GetSourceOk() (*VolumeSource, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *Volume) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given VolumeSource and assigns it to the Source field. +func (o *Volume) SetSource(v *VolumeSource) { + o.Source = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Volume) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// 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 *Volume) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Volume) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Volume) SetStatus(v *string) { + o.Status = v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Volume) GetUpdatedAt() *time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret *time.Time + return ret + } + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Volume) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Volume) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Volume) SetUpdatedAt(v *time.Time) { + o.UpdatedAt = v +} + +func (o Volume) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["availabilityZone"] = o.AvailabilityZone + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } + if !IsNil(o.ServerId) { + toSerialize["serverId"] = o.ServerId + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableVolume struct { + value *Volume + isSet bool +} + +func (v NullableVolume) Get() *Volume { + return v.value +} + +func (v *NullableVolume) Set(val *Volume) { + v.value = val + v.isSet = true +} + +func (v NullableVolume) IsSet() bool { + return v.isSet +} + +func (v *NullableVolume) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolume(val *Volume) *NullableVolume { + return &NullableVolume{value: val, isSet: true} +} + +func (v NullableVolume) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolume) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_volume_attachment.go b/services/iaasalpha/model_volume_attachment.go index 2d76f9e92..ac88398fb 100644 --- a/services/iaasalpha/model_volume_attachment.go +++ b/services/iaasalpha/model_volume_attachment.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the VolumeAttachment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VolumeAttachment{} + // VolumeAttachment Object that represents a Volume attachment to a server. type VolumeAttachment struct { // Delete the volume during the termination of the server. Defaults to false. @@ -19,3 +26,170 @@ type VolumeAttachment struct { // Universally Unique Identifier (UUID). VolumeId *string `json:"volumeId,omitempty"` } + +// NewVolumeAttachment instantiates a new VolumeAttachment 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 NewVolumeAttachment() *VolumeAttachment { + this := VolumeAttachment{} + var deleteOnTermination bool = false + this.DeleteOnTermination = &deleteOnTermination + return &this +} + +// NewVolumeAttachmentWithDefaults instantiates a new VolumeAttachment 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 NewVolumeAttachmentWithDefaults() *VolumeAttachment { + this := VolumeAttachment{} + var deleteOnTermination bool = false + this.DeleteOnTermination = &deleteOnTermination + return &this +} + +// GetDeleteOnTermination returns the DeleteOnTermination field value if set, zero value otherwise. +func (o *VolumeAttachment) GetDeleteOnTermination() *bool { + if o == nil || IsNil(o.DeleteOnTermination) { + var ret *bool + return ret + } + return o.DeleteOnTermination +} + +// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VolumeAttachment) GetDeleteOnTerminationOk() (*bool, bool) { + if o == nil || IsNil(o.DeleteOnTermination) { + return nil, false + } + return o.DeleteOnTermination, true +} + +// HasDeleteOnTermination returns a boolean if a field has been set. +func (o *VolumeAttachment) HasDeleteOnTermination() bool { + if o != nil && !IsNil(o.DeleteOnTermination) { + return true + } + + return false +} + +// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field. +func (o *VolumeAttachment) SetDeleteOnTermination(v *bool) { + o.DeleteOnTermination = v +} + +// GetServerId returns the ServerId field value if set, zero value otherwise. +func (o *VolumeAttachment) GetServerId() *string { + if o == nil || IsNil(o.ServerId) { + var ret *string + return ret + } + return o.ServerId +} + +// GetServerIdOk returns a tuple with the ServerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VolumeAttachment) GetServerIdOk() (*string, bool) { + if o == nil || IsNil(o.ServerId) { + return nil, false + } + return o.ServerId, true +} + +// HasServerId returns a boolean if a field has been set. +func (o *VolumeAttachment) HasServerId() bool { + if o != nil && !IsNil(o.ServerId) { + return true + } + + return false +} + +// SetServerId gets a reference to the given string and assigns it to the ServerId field. +func (o *VolumeAttachment) SetServerId(v *string) { + o.ServerId = v +} + +// GetVolumeId returns the VolumeId field value if set, zero value otherwise. +func (o *VolumeAttachment) GetVolumeId() *string { + if o == nil || IsNil(o.VolumeId) { + var ret *string + return ret + } + return o.VolumeId +} + +// GetVolumeIdOk returns a tuple with the VolumeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VolumeAttachment) GetVolumeIdOk() (*string, bool) { + if o == nil || IsNil(o.VolumeId) { + return nil, false + } + return o.VolumeId, true +} + +// HasVolumeId returns a boolean if a field has been set. +func (o *VolumeAttachment) HasVolumeId() bool { + if o != nil && !IsNil(o.VolumeId) { + return true + } + + return false +} + +// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field. +func (o *VolumeAttachment) SetVolumeId(v *string) { + o.VolumeId = v +} + +func (o VolumeAttachment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DeleteOnTermination) { + toSerialize["deleteOnTermination"] = o.DeleteOnTermination + } + if !IsNil(o.ServerId) { + toSerialize["serverId"] = o.ServerId + } + if !IsNil(o.VolumeId) { + toSerialize["volumeId"] = o.VolumeId + } + return toSerialize, nil +} + +type NullableVolumeAttachment struct { + value *VolumeAttachment + isSet bool +} + +func (v NullableVolumeAttachment) Get() *VolumeAttachment { + return v.value +} + +func (v *NullableVolumeAttachment) Set(val *VolumeAttachment) { + v.value = val + v.isSet = true +} + +func (v NullableVolumeAttachment) IsSet() bool { + return v.isSet +} + +func (v *NullableVolumeAttachment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolumeAttachment(val *VolumeAttachment) *NullableVolumeAttachment { + return &NullableVolumeAttachment{value: val, isSet: true} +} + +func (v NullableVolumeAttachment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolumeAttachment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_volume_list_response.go b/services/iaasalpha/model_volume_list_response.go index 7bab1e21a..b247c77ca 100644 --- a/services/iaasalpha/model_volume_list_response.go +++ b/services/iaasalpha/model_volume_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the VolumeListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VolumeListResponse{} + // VolumeListResponse Volume list response. type VolumeListResponse struct { // A list containing volume objects. // REQUIRED Items *[]Volume `json:"items"` } + +type _VolumeListResponse VolumeListResponse + +// NewVolumeListResponse instantiates a new VolumeListResponse 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 NewVolumeListResponse(items *[]Volume) *VolumeListResponse { + this := VolumeListResponse{} + this.Items = items + return &this +} + +// NewVolumeListResponseWithDefaults instantiates a new VolumeListResponse 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 NewVolumeListResponseWithDefaults() *VolumeListResponse { + this := VolumeListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *VolumeListResponse) GetItems() *[]Volume { + if o == nil { + var ret *[]Volume + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *VolumeListResponse) GetItemsOk() (*[]Volume, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *VolumeListResponse) SetItems(v *[]Volume) { + o.Items = v +} + +func (o VolumeListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableVolumeListResponse struct { + value *VolumeListResponse + isSet bool +} + +func (v NullableVolumeListResponse) Get() *VolumeListResponse { + return v.value +} + +func (v *NullableVolumeListResponse) Set(val *VolumeListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableVolumeListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableVolumeListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolumeListResponse(val *VolumeListResponse) *NullableVolumeListResponse { + return &NullableVolumeListResponse{value: val, isSet: true} +} + +func (v NullableVolumeListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolumeListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_volume_performance_class.go b/services/iaasalpha/model_volume_performance_class.go index 201b1e936..2ea704f59 100644 --- a/services/iaasalpha/model_volume_performance_class.go +++ b/services/iaasalpha/model_volume_performance_class.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the VolumePerformanceClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VolumePerformanceClass{} + // VolumePerformanceClass Object that represents a Volume performance class. type VolumePerformanceClass struct { // Description Object. Allows string up to 127 Characters. @@ -20,3 +27,159 @@ type VolumePerformanceClass struct { // REQUIRED Name *string `json:"name"` } + +type _VolumePerformanceClass VolumePerformanceClass + +// NewVolumePerformanceClass instantiates a new VolumePerformanceClass 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 NewVolumePerformanceClass(name *string) *VolumePerformanceClass { + this := VolumePerformanceClass{} + this.Name = name + return &this +} + +// NewVolumePerformanceClassWithDefaults instantiates a new VolumePerformanceClass 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 NewVolumePerformanceClassWithDefaults() *VolumePerformanceClass { + this := VolumePerformanceClass{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *VolumePerformanceClass) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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 *VolumePerformanceClass) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *VolumePerformanceClass) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *VolumePerformanceClass) SetDescription(v *string) { + o.Description = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *VolumePerformanceClass) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// 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 *VolumePerformanceClass) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *VolumePerformanceClass) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *VolumePerformanceClass) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *VolumePerformanceClass) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *VolumePerformanceClass) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *VolumePerformanceClass) SetName(v *string) { + o.Name = v +} + +func (o VolumePerformanceClass) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableVolumePerformanceClass struct { + value *VolumePerformanceClass + isSet bool +} + +func (v NullableVolumePerformanceClass) Get() *VolumePerformanceClass { + return v.value +} + +func (v *NullableVolumePerformanceClass) Set(val *VolumePerformanceClass) { + v.value = val + v.isSet = true +} + +func (v NullableVolumePerformanceClass) IsSet() bool { + return v.isSet +} + +func (v *NullableVolumePerformanceClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolumePerformanceClass(val *VolumePerformanceClass) *NullableVolumePerformanceClass { + return &NullableVolumePerformanceClass{value: val, isSet: true} +} + +func (v NullableVolumePerformanceClass) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolumePerformanceClass) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_volume_performance_class_list_response.go b/services/iaasalpha/model_volume_performance_class_list_response.go index 9db6519ba..d2fc8037c 100644 --- a/services/iaasalpha/model_volume_performance_class_list_response.go +++ b/services/iaasalpha/model_volume_performance_class_list_response.go @@ -10,9 +10,102 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the VolumePerformanceClassListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VolumePerformanceClassListResponse{} + // VolumePerformanceClassListResponse Volume performance class list response. type VolumePerformanceClassListResponse struct { // A list containing Volume performance classes. // REQUIRED Items *[]VolumePerformanceClass `json:"items"` } + +type _VolumePerformanceClassListResponse VolumePerformanceClassListResponse + +// NewVolumePerformanceClassListResponse instantiates a new VolumePerformanceClassListResponse 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 NewVolumePerformanceClassListResponse(items *[]VolumePerformanceClass) *VolumePerformanceClassListResponse { + this := VolumePerformanceClassListResponse{} + this.Items = items + return &this +} + +// NewVolumePerformanceClassListResponseWithDefaults instantiates a new VolumePerformanceClassListResponse 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 NewVolumePerformanceClassListResponseWithDefaults() *VolumePerformanceClassListResponse { + this := VolumePerformanceClassListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *VolumePerformanceClassListResponse) GetItems() *[]VolumePerformanceClass { + if o == nil { + var ret *[]VolumePerformanceClass + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *VolumePerformanceClassListResponse) GetItemsOk() (*[]VolumePerformanceClass, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *VolumePerformanceClassListResponse) SetItems(v *[]VolumePerformanceClass) { + o.Items = v +} + +func (o VolumePerformanceClassListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableVolumePerformanceClassListResponse struct { + value *VolumePerformanceClassListResponse + isSet bool +} + +func (v NullableVolumePerformanceClassListResponse) Get() *VolumePerformanceClassListResponse { + return v.value +} + +func (v *NullableVolumePerformanceClassListResponse) Set(val *VolumePerformanceClassListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableVolumePerformanceClassListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableVolumePerformanceClassListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolumePerformanceClassListResponse(val *VolumePerformanceClassListResponse) *NullableVolumePerformanceClassListResponse { + return &NullableVolumePerformanceClassListResponse{value: val, isSet: true} +} + +func (v NullableVolumePerformanceClassListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolumePerformanceClassListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaasalpha/model_volume_source.go b/services/iaasalpha/model_volume_source.go index 4fa428646..b8cf26a09 100644 --- a/services/iaasalpha/model_volume_source.go +++ b/services/iaasalpha/model_volume_source.go @@ -10,6 +10,13 @@ API version: 1alpha1 package iaasalpha +import ( + "encoding/json" +) + +// checks if the VolumeSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VolumeSource{} + // VolumeSource The source object of a volume. type VolumeSource struct { // Universally Unique Identifier (UUID). @@ -19,3 +26,115 @@ type VolumeSource struct { // REQUIRED Type *string `json:"type"` } + +type _VolumeSource VolumeSource + +// NewVolumeSource instantiates a new VolumeSource 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 NewVolumeSource(id *string, type_ *string) *VolumeSource { + this := VolumeSource{} + this.Id = id + this.Type = type_ + return &this +} + +// NewVolumeSourceWithDefaults instantiates a new VolumeSource 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 NewVolumeSourceWithDefaults() *VolumeSource { + this := VolumeSource{} + return &this +} + +// GetId returns the Id field value +func (o *VolumeSource) GetId() *string { + if o == nil { + var ret *string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *VolumeSource) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id, true +} + +// SetId sets field value +func (o *VolumeSource) SetId(v *string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *VolumeSource) GetType() *string { + if o == nil { + var ret *string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *VolumeSource) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type, true +} + +// SetType sets field value +func (o *VolumeSource) SetType(v *string) { + o.Type = v +} + +func (o VolumeSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableVolumeSource struct { + value *VolumeSource + isSet bool +} + +func (v NullableVolumeSource) Get() *VolumeSource { + return v.value +} + +func (v *NullableVolumeSource) Set(val *VolumeSource) { + v.value = val + v.isSet = true +} + +func (v NullableVolumeSource) IsSet() bool { + return v.isSet +} + +func (v *NullableVolumeSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVolumeSource(val *VolumeSource) *NullableVolumeSource { + return &NullableVolumeSource{value: val, isSet: true} +} + +func (v NullableVolumeSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVolumeSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}