diff --git a/services/iaas/CHANGELOG.md b/services/iaas/CHANGELOG.md index eeaf9935e..c81004cf2 100644 --- a/services/iaas/CHANGELOG.md +++ b/services/iaas/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.12.0 (2024-10-14) + +- **Feature:** Add support for nullable models + ## v0.11.0 (2024-10-11) - **Feature:** Filter networks by labels using the new `LabelSelector` method on `ApiListNetworksRequest` diff --git a/services/iaas/model_area.go b/services/iaas/model_area.go index fd325ff0f..2f1acd941 100644 --- a/services/iaas/model_area.go +++ b/services/iaas/model_area.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +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/iaas/model_area_config.go b/services/iaas/model_area_config.go index 22ba5d4b3..9a2f6f1a6 100644 --- a/services/iaas/model_area_config.go +++ b/services/iaas/model_area_config.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +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/iaas/model_area_prefix_config_ipv4.go b/services/iaas/model_area_prefix_config_ipv4.go index 35eefbda5..d722168d7 100644 --- a/services/iaas/model_area_prefix_config_ipv4.go +++ b/services/iaas/model_area_prefix_config_ipv4.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +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/iaas/model_create_area_address_family.go b/services/iaas/model_create_area_address_family.go index 59595af74..4933bf32d 100644 --- a/services/iaas/model_create_area_address_family.go +++ b/services/iaas/model_create_area_address_family.go @@ -10,7 +10,107 @@ API version: 1beta1 package iaas +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/iaas/model_create_area_ipv4.go b/services/iaas/model_create_area_ipv4.go index 0d9bcd744..edb391852 100644 --- a/services/iaas/model_create_area_ipv4.go +++ b/services/iaas/model_create_area_ipv4.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +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/iaas/model_create_network_address_family.go b/services/iaas/model_create_network_address_family.go index cfce7d77e..e142511df 100644 --- a/services/iaas/model_create_network_address_family.go +++ b/services/iaas/model_create_network_address_family.go @@ -10,8 +10,143 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the CreateNetworkAddressFamily type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNetworkAddressFamily{} + // CreateNetworkAddressFamily The addressFamily object for a network create request. type CreateNetworkAddressFamily struct { Ipv4 *CreateNetworkIPv4Body `json:"ipv4,omitempty"` Ipv6 *CreateNetworkIPv6Body `json:"ipv6,omitempty"` } + +// NewCreateNetworkAddressFamily instantiates a new CreateNetworkAddressFamily 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 NewCreateNetworkAddressFamily() *CreateNetworkAddressFamily { + this := CreateNetworkAddressFamily{} + return &this +} + +// NewCreateNetworkAddressFamilyWithDefaults instantiates a new CreateNetworkAddressFamily 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 NewCreateNetworkAddressFamilyWithDefaults() *CreateNetworkAddressFamily { + this := CreateNetworkAddressFamily{} + return &this +} + +// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. +func (o *CreateNetworkAddressFamily) GetIpv4() *CreateNetworkIPv4Body { + if o == nil || IsNil(o.Ipv4) { + var ret *CreateNetworkIPv4Body + 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 *CreateNetworkAddressFamily) GetIpv4Ok() (*CreateNetworkIPv4Body, 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 *CreateNetworkAddressFamily) HasIpv4() bool { + if o != nil && !IsNil(o.Ipv4) { + return true + } + + return false +} + +// SetIpv4 gets a reference to the given CreateNetworkIPv4Body and assigns it to the Ipv4 field. +func (o *CreateNetworkAddressFamily) SetIpv4(v *CreateNetworkIPv4Body) { + o.Ipv4 = v +} + +// GetIpv6 returns the Ipv6 field value if set, zero value otherwise. +func (o *CreateNetworkAddressFamily) GetIpv6() *CreateNetworkIPv6Body { + if o == nil || IsNil(o.Ipv6) { + var ret *CreateNetworkIPv6Body + 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 *CreateNetworkAddressFamily) GetIpv6Ok() (*CreateNetworkIPv6Body, 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 *CreateNetworkAddressFamily) HasIpv6() bool { + if o != nil && !IsNil(o.Ipv6) { + return true + } + + return false +} + +// SetIpv6 gets a reference to the given CreateNetworkIPv6Body and assigns it to the Ipv6 field. +func (o *CreateNetworkAddressFamily) SetIpv6(v *CreateNetworkIPv6Body) { + o.Ipv6 = v +} + +func (o CreateNetworkAddressFamily) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ipv4) { + toSerialize["ipv4"] = o.Ipv4 + } + if !IsNil(o.Ipv6) { + toSerialize["ipv6"] = o.Ipv6 + } + return toSerialize, nil +} + +type NullableCreateNetworkAddressFamily struct { + value *CreateNetworkAddressFamily + isSet bool +} + +func (v NullableCreateNetworkAddressFamily) Get() *CreateNetworkAddressFamily { + return v.value +} + +func (v *NullableCreateNetworkAddressFamily) Set(val *CreateNetworkAddressFamily) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNetworkAddressFamily) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNetworkAddressFamily) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNetworkAddressFamily(val *CreateNetworkAddressFamily) *NullableCreateNetworkAddressFamily { + return &NullableCreateNetworkAddressFamily{value: val, isSet: true} +} + +func (v NullableCreateNetworkAddressFamily) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNetworkAddressFamily) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_create_network_area_payload.go b/services/iaas/model_create_network_area_payload.go index 4ec1864b4..b05d3a585 100644 --- a/services/iaas/model_create_network_area_payload.go +++ b/services/iaas/model_create_network_area_payload.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the CreateNetworkAreaPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNetworkAreaPayload{} + // CreateNetworkAreaPayload struct for CreateNetworkAreaPayload type CreateNetworkAreaPayload struct { // REQUIRED @@ -20,3 +27,150 @@ type CreateNetworkAreaPayload struct { // REQUIRED Name *string `json:"name"` } + +type _CreateNetworkAreaPayload CreateNetworkAreaPayload + +// NewCreateNetworkAreaPayload instantiates a new CreateNetworkAreaPayload 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 NewCreateNetworkAreaPayload(addressFamily *CreateAreaAddressFamily, name *string) *CreateNetworkAreaPayload { + this := CreateNetworkAreaPayload{} + this.AddressFamily = addressFamily + this.Name = name + return &this +} + +// NewCreateNetworkAreaPayloadWithDefaults instantiates a new CreateNetworkAreaPayload 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 NewCreateNetworkAreaPayloadWithDefaults() *CreateNetworkAreaPayload { + this := CreateNetworkAreaPayload{} + return &this +} + +// GetAddressFamily returns the AddressFamily field value +func (o *CreateNetworkAreaPayload) GetAddressFamily() *CreateAreaAddressFamily { + if o == nil { + var ret *CreateAreaAddressFamily + return ret + } + + return o.AddressFamily +} + +// GetAddressFamilyOk returns a tuple with the AddressFamily field value +// and a boolean to check if the value has been set. +func (o *CreateNetworkAreaPayload) GetAddressFamilyOk() (*CreateAreaAddressFamily, bool) { + if o == nil { + return nil, false + } + return o.AddressFamily, true +} + +// SetAddressFamily sets field value +func (o *CreateNetworkAreaPayload) SetAddressFamily(v *CreateAreaAddressFamily) { + o.AddressFamily = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateNetworkAreaPayload) 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 *CreateNetworkAreaPayload) 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 *CreateNetworkAreaPayload) 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 *CreateNetworkAreaPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *CreateNetworkAreaPayload) 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 *CreateNetworkAreaPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateNetworkAreaPayload) SetName(v *string) { + o.Name = v +} + +func (o CreateNetworkAreaPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["addressFamily"] = o.AddressFamily + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableCreateNetworkAreaPayload struct { + value *CreateNetworkAreaPayload + isSet bool +} + +func (v NullableCreateNetworkAreaPayload) Get() *CreateNetworkAreaPayload { + return v.value +} + +func (v *NullableCreateNetworkAreaPayload) Set(val *CreateNetworkAreaPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNetworkAreaPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNetworkAreaPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNetworkAreaPayload(val *CreateNetworkAreaPayload) *NullableCreateNetworkAreaPayload { + return &NullableCreateNetworkAreaPayload{value: val, isSet: true} +} + +func (v NullableCreateNetworkAreaPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNetworkAreaPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_create_network_area_range_payload.go b/services/iaas/model_create_network_area_range_payload.go index 56018297a..837d3d22d 100644 --- a/services/iaas/model_create_network_area_range_payload.go +++ b/services/iaas/model_create_network_area_range_payload.go @@ -10,8 +10,108 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the CreateNetworkAreaRangePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNetworkAreaRangePayload{} + // CreateNetworkAreaRangePayload struct for CreateNetworkAreaRangePayload type CreateNetworkAreaRangePayload struct { // A list of network ranges. Ipv4 *[]NetworkRange `json:"ipv4,omitempty"` } + +// NewCreateNetworkAreaRangePayload instantiates a new CreateNetworkAreaRangePayload 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 NewCreateNetworkAreaRangePayload() *CreateNetworkAreaRangePayload { + this := CreateNetworkAreaRangePayload{} + return &this +} + +// NewCreateNetworkAreaRangePayloadWithDefaults instantiates a new CreateNetworkAreaRangePayload 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 NewCreateNetworkAreaRangePayloadWithDefaults() *CreateNetworkAreaRangePayload { + this := CreateNetworkAreaRangePayload{} + return &this +} + +// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. +func (o *CreateNetworkAreaRangePayload) GetIpv4() *[]NetworkRange { + if o == nil || IsNil(o.Ipv4) { + var ret *[]NetworkRange + 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 *CreateNetworkAreaRangePayload) GetIpv4Ok() (*[]NetworkRange, 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 *CreateNetworkAreaRangePayload) HasIpv4() bool { + if o != nil && !IsNil(o.Ipv4) { + return true + } + + return false +} + +// SetIpv4 gets a reference to the given []NetworkRange and assigns it to the Ipv4 field. +func (o *CreateNetworkAreaRangePayload) SetIpv4(v *[]NetworkRange) { + o.Ipv4 = v +} + +func (o CreateNetworkAreaRangePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ipv4) { + toSerialize["ipv4"] = o.Ipv4 + } + return toSerialize, nil +} + +type NullableCreateNetworkAreaRangePayload struct { + value *CreateNetworkAreaRangePayload + isSet bool +} + +func (v NullableCreateNetworkAreaRangePayload) Get() *CreateNetworkAreaRangePayload { + return v.value +} + +func (v *NullableCreateNetworkAreaRangePayload) Set(val *CreateNetworkAreaRangePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNetworkAreaRangePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNetworkAreaRangePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNetworkAreaRangePayload(val *CreateNetworkAreaRangePayload) *NullableCreateNetworkAreaRangePayload { + return &NullableCreateNetworkAreaRangePayload{value: val, isSet: true} +} + +func (v NullableCreateNetworkAreaRangePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNetworkAreaRangePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_create_network_area_route_payload.go b/services/iaas/model_create_network_area_route_payload.go index 191ff1d5d..26c47565f 100644 --- a/services/iaas/model_create_network_area_route_payload.go +++ b/services/iaas/model_create_network_area_route_payload.go @@ -10,8 +10,108 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the CreateNetworkAreaRoutePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNetworkAreaRoutePayload{} + // CreateNetworkAreaRoutePayload struct for CreateNetworkAreaRoutePayload type CreateNetworkAreaRoutePayload struct { // A list of routes. Ipv4 *[]Route `json:"ipv4,omitempty"` } + +// NewCreateNetworkAreaRoutePayload instantiates a new CreateNetworkAreaRoutePayload 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 NewCreateNetworkAreaRoutePayload() *CreateNetworkAreaRoutePayload { + this := CreateNetworkAreaRoutePayload{} + return &this +} + +// NewCreateNetworkAreaRoutePayloadWithDefaults instantiates a new CreateNetworkAreaRoutePayload 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 NewCreateNetworkAreaRoutePayloadWithDefaults() *CreateNetworkAreaRoutePayload { + this := CreateNetworkAreaRoutePayload{} + return &this +} + +// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. +func (o *CreateNetworkAreaRoutePayload) GetIpv4() *[]Route { + if o == nil || IsNil(o.Ipv4) { + var ret *[]Route + 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 *CreateNetworkAreaRoutePayload) GetIpv4Ok() (*[]Route, 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 *CreateNetworkAreaRoutePayload) HasIpv4() bool { + if o != nil && !IsNil(o.Ipv4) { + return true + } + + return false +} + +// SetIpv4 gets a reference to the given []Route and assigns it to the Ipv4 field. +func (o *CreateNetworkAreaRoutePayload) SetIpv4(v *[]Route) { + o.Ipv4 = v +} + +func (o CreateNetworkAreaRoutePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ipv4) { + toSerialize["ipv4"] = o.Ipv4 + } + return toSerialize, nil +} + +type NullableCreateNetworkAreaRoutePayload struct { + value *CreateNetworkAreaRoutePayload + isSet bool +} + +func (v NullableCreateNetworkAreaRoutePayload) Get() *CreateNetworkAreaRoutePayload { + return v.value +} + +func (v *NullableCreateNetworkAreaRoutePayload) Set(val *CreateNetworkAreaRoutePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNetworkAreaRoutePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNetworkAreaRoutePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNetworkAreaRoutePayload(val *CreateNetworkAreaRoutePayload) *NullableCreateNetworkAreaRoutePayload { + return &NullableCreateNetworkAreaRoutePayload{value: val, isSet: true} +} + +func (v NullableCreateNetworkAreaRoutePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNetworkAreaRoutePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_create_network_ipv4_body.go b/services/iaas/model_create_network_ipv4_body.go index 8624382d8..209527378 100644 --- a/services/iaas/model_create_network_ipv4_body.go +++ b/services/iaas/model_create_network_ipv4_body.go @@ -10,11 +10,228 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the CreateNetworkIPv4Body type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNetworkIPv4Body{} + // CreateNetworkIPv4Body The config object for an IPv4 network. type CreateNetworkIPv4Body struct { + Gateway *NullableV1NetworkGateway `json:"gateway,omitempty"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers *[]string `json:"nameservers,omitempty"` // Classless Inter-Domain Routing (CIDR). Prefix *string `json:"prefix,omitempty"` PrefixLength *int64 `json:"prefixLength,omitempty"` } + +// NewCreateNetworkIPv4Body instantiates a new CreateNetworkIPv4Body 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 NewCreateNetworkIPv4Body() *CreateNetworkIPv4Body { + this := CreateNetworkIPv4Body{} + return &this +} + +// NewCreateNetworkIPv4BodyWithDefaults instantiates a new CreateNetworkIPv4Body 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 NewCreateNetworkIPv4BodyWithDefaults() *CreateNetworkIPv4Body { + this := CreateNetworkIPv4Body{} + return &this +} + +// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateNetworkIPv4Body) 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 *CreateNetworkIPv4Body) 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 *CreateNetworkIPv4Body) 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 *CreateNetworkIPv4Body) SetGateway(v *V1NetworkGateway) { + o.Gateway.Set(v) +} + +// SetGatewayNil sets the value for Gateway to be an explicit nil +func (o *CreateNetworkIPv4Body) SetGatewayNil() { + o.Gateway.Set(nil) +} + +// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil +func (o *CreateNetworkIPv4Body) UnsetGateway() { + o.Gateway.Unset() +} + +// GetNameservers returns the Nameservers field value if set, zero value otherwise. +func (o *CreateNetworkIPv4Body) 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 *CreateNetworkIPv4Body) 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 *CreateNetworkIPv4Body) 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 *CreateNetworkIPv4Body) SetNameservers(v *[]string) { + o.Nameservers = v +} + +// GetPrefix returns the Prefix field value if set, zero value otherwise. +func (o *CreateNetworkIPv4Body) GetPrefix() *string { + if o == nil || IsNil(o.Prefix) { + var ret *string + return ret + } + return o.Prefix +} + +// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNetworkIPv4Body) GetPrefixOk() (*string, bool) { + if o == nil || IsNil(o.Prefix) { + return nil, false + } + return o.Prefix, true +} + +// HasPrefix returns a boolean if a field has been set. +func (o *CreateNetworkIPv4Body) HasPrefix() bool { + if o != nil && !IsNil(o.Prefix) { + return true + } + + return false +} + +// SetPrefix gets a reference to the given string and assigns it to the Prefix field. +func (o *CreateNetworkIPv4Body) SetPrefix(v *string) { + o.Prefix = v +} + +// GetPrefixLength returns the PrefixLength field value if set, zero value otherwise. +func (o *CreateNetworkIPv4Body) GetPrefixLength() *int64 { + if o == nil || IsNil(o.PrefixLength) { + var ret *int64 + return ret + } + return o.PrefixLength +} + +// GetPrefixLengthOk returns a tuple with the PrefixLength field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNetworkIPv4Body) GetPrefixLengthOk() (*int64, bool) { + if o == nil || IsNil(o.PrefixLength) { + return nil, false + } + return o.PrefixLength, true +} + +// HasPrefixLength returns a boolean if a field has been set. +func (o *CreateNetworkIPv4Body) HasPrefixLength() bool { + if o != nil && !IsNil(o.PrefixLength) { + return true + } + + return false +} + +// SetPrefixLength gets a reference to the given int64 and assigns it to the PrefixLength field. +func (o *CreateNetworkIPv4Body) SetPrefixLength(v *int64) { + o.PrefixLength = v +} + +func (o CreateNetworkIPv4Body) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Gateway.IsSet() { + toSerialize["gateway"] = o.Gateway.Get() + } + if !IsNil(o.Nameservers) { + toSerialize["nameservers"] = o.Nameservers + } + if !IsNil(o.Prefix) { + toSerialize["prefix"] = o.Prefix + } + if !IsNil(o.PrefixLength) { + toSerialize["prefixLength"] = o.PrefixLength + } + return toSerialize, nil +} + +type NullableCreateNetworkIPv4Body struct { + value *CreateNetworkIPv4Body + isSet bool +} + +func (v NullableCreateNetworkIPv4Body) Get() *CreateNetworkIPv4Body { + return v.value +} + +func (v *NullableCreateNetworkIPv4Body) Set(val *CreateNetworkIPv4Body) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNetworkIPv4Body) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNetworkIPv4Body) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNetworkIPv4Body(val *CreateNetworkIPv4Body) *NullableCreateNetworkIPv4Body { + return &NullableCreateNetworkIPv4Body{value: val, isSet: true} +} + +func (v NullableCreateNetworkIPv4Body) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNetworkIPv4Body) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_create_network_ipv6_body.go b/services/iaas/model_create_network_ipv6_body.go index b5d8d1998..afc80c150 100644 --- a/services/iaas/model_create_network_ipv6_body.go +++ b/services/iaas/model_create_network_ipv6_body.go @@ -10,11 +10,228 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the CreateNetworkIPv6Body type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNetworkIPv6Body{} + // CreateNetworkIPv6Body The config object for an IPv6 network. type CreateNetworkIPv6Body struct { + Gateway *NullableV1NetworkGateway `json:"gateway,omitempty"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers *[]string `json:"nameservers,omitempty"` // Classless Inter-Domain Routing (CIDR) for IPv6. Prefix *string `json:"prefix,omitempty"` PrefixLength *int64 `json:"prefixLength,omitempty"` } + +// NewCreateNetworkIPv6Body instantiates a new CreateNetworkIPv6Body 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 NewCreateNetworkIPv6Body() *CreateNetworkIPv6Body { + this := CreateNetworkIPv6Body{} + return &this +} + +// NewCreateNetworkIPv6BodyWithDefaults instantiates a new CreateNetworkIPv6Body 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 NewCreateNetworkIPv6BodyWithDefaults() *CreateNetworkIPv6Body { + this := CreateNetworkIPv6Body{} + return &this +} + +// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateNetworkIPv6Body) 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 *CreateNetworkIPv6Body) 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 *CreateNetworkIPv6Body) 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 *CreateNetworkIPv6Body) SetGateway(v *V1NetworkGateway) { + o.Gateway.Set(v) +} + +// SetGatewayNil sets the value for Gateway to be an explicit nil +func (o *CreateNetworkIPv6Body) SetGatewayNil() { + o.Gateway.Set(nil) +} + +// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil +func (o *CreateNetworkIPv6Body) UnsetGateway() { + o.Gateway.Unset() +} + +// GetNameservers returns the Nameservers field value if set, zero value otherwise. +func (o *CreateNetworkIPv6Body) 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 *CreateNetworkIPv6Body) 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 *CreateNetworkIPv6Body) 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 *CreateNetworkIPv6Body) SetNameservers(v *[]string) { + o.Nameservers = v +} + +// GetPrefix returns the Prefix field value if set, zero value otherwise. +func (o *CreateNetworkIPv6Body) GetPrefix() *string { + if o == nil || IsNil(o.Prefix) { + var ret *string + return ret + } + return o.Prefix +} + +// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNetworkIPv6Body) GetPrefixOk() (*string, bool) { + if o == nil || IsNil(o.Prefix) { + return nil, false + } + return o.Prefix, true +} + +// HasPrefix returns a boolean if a field has been set. +func (o *CreateNetworkIPv6Body) HasPrefix() bool { + if o != nil && !IsNil(o.Prefix) { + return true + } + + return false +} + +// SetPrefix gets a reference to the given string and assigns it to the Prefix field. +func (o *CreateNetworkIPv6Body) SetPrefix(v *string) { + o.Prefix = v +} + +// GetPrefixLength returns the PrefixLength field value if set, zero value otherwise. +func (o *CreateNetworkIPv6Body) GetPrefixLength() *int64 { + if o == nil || IsNil(o.PrefixLength) { + var ret *int64 + return ret + } + return o.PrefixLength +} + +// GetPrefixLengthOk returns a tuple with the PrefixLength field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNetworkIPv6Body) GetPrefixLengthOk() (*int64, bool) { + if o == nil || IsNil(o.PrefixLength) { + return nil, false + } + return o.PrefixLength, true +} + +// HasPrefixLength returns a boolean if a field has been set. +func (o *CreateNetworkIPv6Body) HasPrefixLength() bool { + if o != nil && !IsNil(o.PrefixLength) { + return true + } + + return false +} + +// SetPrefixLength gets a reference to the given int64 and assigns it to the PrefixLength field. +func (o *CreateNetworkIPv6Body) SetPrefixLength(v *int64) { + o.PrefixLength = v +} + +func (o CreateNetworkIPv6Body) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Gateway.IsSet() { + toSerialize["gateway"] = o.Gateway.Get() + } + if !IsNil(o.Nameservers) { + toSerialize["nameservers"] = o.Nameservers + } + if !IsNil(o.Prefix) { + toSerialize["prefix"] = o.Prefix + } + if !IsNil(o.PrefixLength) { + toSerialize["prefixLength"] = o.PrefixLength + } + return toSerialize, nil +} + +type NullableCreateNetworkIPv6Body struct { + value *CreateNetworkIPv6Body + isSet bool +} + +func (v NullableCreateNetworkIPv6Body) Get() *CreateNetworkIPv6Body { + return v.value +} + +func (v *NullableCreateNetworkIPv6Body) Set(val *CreateNetworkIPv6Body) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNetworkIPv6Body) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNetworkIPv6Body) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNetworkIPv6Body(val *CreateNetworkIPv6Body) *NullableCreateNetworkIPv6Body { + return &NullableCreateNetworkIPv6Body{value: val, isSet: true} +} + +func (v NullableCreateNetworkIPv6Body) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNetworkIPv6Body) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_create_network_payload.go b/services/iaas/model_create_network_payload.go index d9865f867..6cc8b548c 100644 --- a/services/iaas/model_create_network_payload.go +++ b/services/iaas/model_create_network_payload.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the CreateNetworkPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNetworkPayload{} + // CreateNetworkPayload Object that represents the request body for a network create. type CreateNetworkPayload struct { AddressFamily *CreateNetworkAddressFamily `json:"addressFamily,omitempty"` @@ -21,3 +28,194 @@ type CreateNetworkPayload struct { // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` } + +type _CreateNetworkPayload CreateNetworkPayload + +// NewCreateNetworkPayload instantiates a new CreateNetworkPayload 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 NewCreateNetworkPayload(name *string) *CreateNetworkPayload { + this := CreateNetworkPayload{} + this.Name = name + return &this +} + +// NewCreateNetworkPayloadWithDefaults instantiates a new CreateNetworkPayload 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 NewCreateNetworkPayloadWithDefaults() *CreateNetworkPayload { + this := CreateNetworkPayload{} + return &this +} + +// GetAddressFamily returns the AddressFamily field value if set, zero value otherwise. +func (o *CreateNetworkPayload) GetAddressFamily() *CreateNetworkAddressFamily { + if o == nil || IsNil(o.AddressFamily) { + var ret *CreateNetworkAddressFamily + return ret + } + return o.AddressFamily +} + +// GetAddressFamilyOk returns a tuple with the AddressFamily field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNetworkPayload) GetAddressFamilyOk() (*CreateNetworkAddressFamily, bool) { + if o == nil || IsNil(o.AddressFamily) { + return nil, false + } + return o.AddressFamily, true +} + +// HasAddressFamily returns a boolean if a field has been set. +func (o *CreateNetworkPayload) HasAddressFamily() bool { + if o != nil && !IsNil(o.AddressFamily) { + return true + } + + return false +} + +// SetAddressFamily gets a reference to the given CreateNetworkAddressFamily and assigns it to the AddressFamily field. +func (o *CreateNetworkPayload) SetAddressFamily(v *CreateNetworkAddressFamily) { + o.AddressFamily = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateNetworkPayload) 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 *CreateNetworkPayload) 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 *CreateNetworkPayload) 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 *CreateNetworkPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *CreateNetworkPayload) 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 *CreateNetworkPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateNetworkPayload) SetName(v *string) { + o.Name = v +} + +// GetRouted returns the Routed field value if set, zero value otherwise. +func (o *CreateNetworkPayload) 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 *CreateNetworkPayload) 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 *CreateNetworkPayload) 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 *CreateNetworkPayload) SetRouted(v *bool) { + o.Routed = v +} + +func (o CreateNetworkPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AddressFamily) { + toSerialize["addressFamily"] = o.AddressFamily + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + if !IsNil(o.Routed) { + toSerialize["routed"] = o.Routed + } + return toSerialize, nil +} + +type NullableCreateNetworkPayload struct { + value *CreateNetworkPayload + isSet bool +} + +func (v NullableCreateNetworkPayload) Get() *CreateNetworkPayload { + return v.value +} + +func (v *NullableCreateNetworkPayload) Set(val *CreateNetworkPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNetworkPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNetworkPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNetworkPayload(val *CreateNetworkPayload) *NullableCreateNetworkPayload { + return &NullableCreateNetworkPayload{value: val, isSet: true} +} + +func (v NullableCreateNetworkPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNetworkPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_error.go b/services/iaas/model_error.go index 9eeabd0ea..1b134c618 100644 --- a/services/iaas/model_error.go +++ b/services/iaas/model_error.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +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/iaas/model_network.go b/services/iaas/model_network.go index a2ddd3ffe..5cb35d8dc 100644 --- a/services/iaas/model_network.go +++ b/services/iaas/model_network.go @@ -11,13 +11,19 @@ API version: 1beta1 package iaas 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/iaas/model_network_area.go b/services/iaas/model_network_area.go index 39dbea805..280c4db0f 100644 --- a/services/iaas/model_network_area.go +++ b/services/iaas/model_network_area.go @@ -11,9 +11,13 @@ API version: 1beta1 package iaas 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/iaas/model_network_area_ipv4.go b/services/iaas/model_network_area_ipv4.go index 517856f8b..7e7358d56 100644 --- a/services/iaas/model_network_area_ipv4.go +++ b/services/iaas/model_network_area_ipv4.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +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/iaas/model_network_area_list_response.go b/services/iaas/model_network_area_list_response.go index 1c61e05dd..480ec0904 100644 --- a/services/iaas/model_network_area_list_response.go +++ b/services/iaas/model_network_area_list_response.go @@ -10,9 +10,102 @@ API version: 1beta1 package iaas +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/iaas/model_network_list_response.go b/services/iaas/model_network_list_response.go index a07f3be8f..f897d1c74 100644 --- a/services/iaas/model_network_list_response.go +++ b/services/iaas/model_network_list_response.go @@ -10,9 +10,102 @@ API version: 1beta1 package iaas +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/iaas/model_network_range.go b/services/iaas/model_network_range.go index dc8c63878..0a6a32ae9 100644 --- a/services/iaas/model_network_range.go +++ b/services/iaas/model_network_range.go @@ -11,9 +11,13 @@ API version: 1beta1 package iaas 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/iaas/model_network_range_list_response.go b/services/iaas/model_network_range_list_response.go index 7ec59c696..09abb9a73 100644 --- a/services/iaas/model_network_range_list_response.go +++ b/services/iaas/model_network_range_list_response.go @@ -10,9 +10,102 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the NetworkRangeListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkRangeListResponse{} + // NetworkRangeListResponse Network Range list response. type NetworkRangeListResponse struct { // A list of network ranges. // REQUIRED Items *[]NetworkRange `json:"items"` } + +type _NetworkRangeListResponse NetworkRangeListResponse + +// NewNetworkRangeListResponse instantiates a new NetworkRangeListResponse 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 NewNetworkRangeListResponse(items *[]NetworkRange) *NetworkRangeListResponse { + this := NetworkRangeListResponse{} + this.Items = items + return &this +} + +// NewNetworkRangeListResponseWithDefaults instantiates a new NetworkRangeListResponse 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 NewNetworkRangeListResponseWithDefaults() *NetworkRangeListResponse { + this := NetworkRangeListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *NetworkRangeListResponse) GetItems() *[]NetworkRange { + if o == nil { + var ret *[]NetworkRange + 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 *NetworkRangeListResponse) GetItemsOk() (*[]NetworkRange, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *NetworkRangeListResponse) SetItems(v *[]NetworkRange) { + o.Items = v +} + +func (o NetworkRangeListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableNetworkRangeListResponse struct { + value *NetworkRangeListResponse + isSet bool +} + +func (v NullableNetworkRangeListResponse) Get() *NetworkRangeListResponse { + return v.value +} + +func (v *NullableNetworkRangeListResponse) Set(val *NetworkRangeListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkRangeListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkRangeListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkRangeListResponse(val *NetworkRangeListResponse) *NullableNetworkRangeListResponse { + return &NullableNetworkRangeListResponse{value: val, isSet: true} +} + +func (v NullableNetworkRangeListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkRangeListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_partial_update_network_area_payload.go b/services/iaas/model_partial_update_network_area_payload.go index acf3b736b..4db59e096 100644 --- a/services/iaas/model_partial_update_network_area_payload.go +++ b/services/iaas/model_partial_update_network_area_payload.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the PartialUpdateNetworkAreaPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateNetworkAreaPayload{} + // PartialUpdateNetworkAreaPayload struct for PartialUpdateNetworkAreaPayload type PartialUpdateNetworkAreaPayload struct { AddressFamily *UpdateAreaAddressFamily `json:"addressFamily,omitempty"` @@ -18,3 +25,166 @@ type PartialUpdateNetworkAreaPayload struct { // The name for a General Object. Matches Names and also UUIDs. Name *string `json:"name,omitempty"` } + +// NewPartialUpdateNetworkAreaPayload instantiates a new PartialUpdateNetworkAreaPayload 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 NewPartialUpdateNetworkAreaPayload() *PartialUpdateNetworkAreaPayload { + this := PartialUpdateNetworkAreaPayload{} + return &this +} + +// NewPartialUpdateNetworkAreaPayloadWithDefaults instantiates a new PartialUpdateNetworkAreaPayload 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 NewPartialUpdateNetworkAreaPayloadWithDefaults() *PartialUpdateNetworkAreaPayload { + this := PartialUpdateNetworkAreaPayload{} + return &this +} + +// GetAddressFamily returns the AddressFamily field value if set, zero value otherwise. +func (o *PartialUpdateNetworkAreaPayload) GetAddressFamily() *UpdateAreaAddressFamily { + if o == nil || IsNil(o.AddressFamily) { + var ret *UpdateAreaAddressFamily + return ret + } + return o.AddressFamily +} + +// GetAddressFamilyOk returns a tuple with the AddressFamily field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateNetworkAreaPayload) GetAddressFamilyOk() (*UpdateAreaAddressFamily, bool) { + if o == nil || IsNil(o.AddressFamily) { + return nil, false + } + return o.AddressFamily, true +} + +// HasAddressFamily returns a boolean if a field has been set. +func (o *PartialUpdateNetworkAreaPayload) HasAddressFamily() bool { + if o != nil && !IsNil(o.AddressFamily) { + return true + } + + return false +} + +// SetAddressFamily gets a reference to the given UpdateAreaAddressFamily and assigns it to the AddressFamily field. +func (o *PartialUpdateNetworkAreaPayload) SetAddressFamily(v *UpdateAreaAddressFamily) { + o.AddressFamily = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PartialUpdateNetworkAreaPayload) 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 *PartialUpdateNetworkAreaPayload) 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 *PartialUpdateNetworkAreaPayload) 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 *PartialUpdateNetworkAreaPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PartialUpdateNetworkAreaPayload) 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 *PartialUpdateNetworkAreaPayload) 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 *PartialUpdateNetworkAreaPayload) 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 *PartialUpdateNetworkAreaPayload) SetName(v *string) { + o.Name = v +} + +func (o PartialUpdateNetworkAreaPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AddressFamily) { + toSerialize["addressFamily"] = o.AddressFamily + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullablePartialUpdateNetworkAreaPayload struct { + value *PartialUpdateNetworkAreaPayload + isSet bool +} + +func (v NullablePartialUpdateNetworkAreaPayload) Get() *PartialUpdateNetworkAreaPayload { + return v.value +} + +func (v *NullablePartialUpdateNetworkAreaPayload) Set(val *PartialUpdateNetworkAreaPayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateNetworkAreaPayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateNetworkAreaPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateNetworkAreaPayload(val *PartialUpdateNetworkAreaPayload) *NullablePartialUpdateNetworkAreaPayload { + return &NullablePartialUpdateNetworkAreaPayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateNetworkAreaPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateNetworkAreaPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_partial_update_network_payload.go b/services/iaas/model_partial_update_network_payload.go index 25159c41f..b178b3094 100644 --- a/services/iaas/model_partial_update_network_payload.go +++ b/services/iaas/model_partial_update_network_payload.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the PartialUpdateNetworkPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateNetworkPayload{} + // PartialUpdateNetworkPayload Object that represents the request body for a network update. type PartialUpdateNetworkPayload struct { AddressFamily *UpdateNetworkAddressFamily `json:"addressFamily,omitempty"` @@ -20,3 +27,201 @@ type PartialUpdateNetworkPayload struct { // Shows if the network is routed and therefore accessible from other networks. Routed *bool `json:"routed,omitempty"` } + +// NewPartialUpdateNetworkPayload instantiates a new PartialUpdateNetworkPayload 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 NewPartialUpdateNetworkPayload() *PartialUpdateNetworkPayload { + this := PartialUpdateNetworkPayload{} + return &this +} + +// NewPartialUpdateNetworkPayloadWithDefaults instantiates a new PartialUpdateNetworkPayload 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 NewPartialUpdateNetworkPayloadWithDefaults() *PartialUpdateNetworkPayload { + this := PartialUpdateNetworkPayload{} + return &this +} + +// GetAddressFamily returns the AddressFamily field value if set, zero value otherwise. +func (o *PartialUpdateNetworkPayload) GetAddressFamily() *UpdateNetworkAddressFamily { + if o == nil || IsNil(o.AddressFamily) { + var ret *UpdateNetworkAddressFamily + return ret + } + return o.AddressFamily +} + +// GetAddressFamilyOk returns a tuple with the AddressFamily field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateNetworkPayload) GetAddressFamilyOk() (*UpdateNetworkAddressFamily, bool) { + if o == nil || IsNil(o.AddressFamily) { + return nil, false + } + return o.AddressFamily, true +} + +// HasAddressFamily returns a boolean if a field has been set. +func (o *PartialUpdateNetworkPayload) HasAddressFamily() bool { + if o != nil && !IsNil(o.AddressFamily) { + return true + } + + return false +} + +// SetAddressFamily gets a reference to the given UpdateNetworkAddressFamily and assigns it to the AddressFamily field. +func (o *PartialUpdateNetworkPayload) SetAddressFamily(v *UpdateNetworkAddressFamily) { + o.AddressFamily = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PartialUpdateNetworkPayload) 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 *PartialUpdateNetworkPayload) 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 *PartialUpdateNetworkPayload) 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 *PartialUpdateNetworkPayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PartialUpdateNetworkPayload) 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 *PartialUpdateNetworkPayload) 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 *PartialUpdateNetworkPayload) 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 *PartialUpdateNetworkPayload) SetName(v *string) { + o.Name = v +} + +// GetRouted returns the Routed field value if set, zero value otherwise. +func (o *PartialUpdateNetworkPayload) 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 *PartialUpdateNetworkPayload) 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 *PartialUpdateNetworkPayload) 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 *PartialUpdateNetworkPayload) SetRouted(v *bool) { + o.Routed = v +} + +func (o PartialUpdateNetworkPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AddressFamily) { + toSerialize["addressFamily"] = o.AddressFamily + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Routed) { + toSerialize["routed"] = o.Routed + } + return toSerialize, nil +} + +type NullablePartialUpdateNetworkPayload struct { + value *PartialUpdateNetworkPayload + isSet bool +} + +func (v NullablePartialUpdateNetworkPayload) Get() *PartialUpdateNetworkPayload { + return v.value +} + +func (v *NullablePartialUpdateNetworkPayload) Set(val *PartialUpdateNetworkPayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateNetworkPayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateNetworkPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateNetworkPayload(val *PartialUpdateNetworkPayload) *NullablePartialUpdateNetworkPayload { + return &NullablePartialUpdateNetworkPayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateNetworkPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateNetworkPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_project_list_response.go b/services/iaas/model_project_list_response.go index ea9f45dee..82abca80b 100644 --- a/services/iaas/model_project_list_response.go +++ b/services/iaas/model_project_list_response.go @@ -10,9 +10,102 @@ API version: 1beta1 package iaas +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/iaas/model_request.go b/services/iaas/model_request.go index 5ccf31232..3e7f86bb5 100644 --- a/services/iaas/model_request.go +++ b/services/iaas/model_request.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +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/iaas/model_request_resource.go b/services/iaas/model_request_resource.go index ac5306d09..ac087e30d 100644 --- a/services/iaas/model_request_resource.go +++ b/services/iaas/model_request_resource.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +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/iaas/model_route.go b/services/iaas/model_route.go index d923b725a..5b2e09ff7 100644 --- a/services/iaas/model_route.go +++ b/services/iaas/model_route.go @@ -11,9 +11,13 @@ API version: 1beta1 package iaas 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/iaas/model_route_list_response.go b/services/iaas/model_route_list_response.go index 486f609dd..fe896100e 100644 --- a/services/iaas/model_route_list_response.go +++ b/services/iaas/model_route_list_response.go @@ -10,9 +10,102 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the RouteListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RouteListResponse{} + // RouteListResponse Route list response. type RouteListResponse struct { // A list of routes. // REQUIRED Items *[]Route `json:"items"` } + +type _RouteListResponse RouteListResponse + +// NewRouteListResponse instantiates a new RouteListResponse 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 NewRouteListResponse(items *[]Route) *RouteListResponse { + this := RouteListResponse{} + this.Items = items + return &this +} + +// NewRouteListResponseWithDefaults instantiates a new RouteListResponse 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 NewRouteListResponseWithDefaults() *RouteListResponse { + this := RouteListResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *RouteListResponse) GetItems() *[]Route { + if o == nil { + var ret *[]Route + 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 *RouteListResponse) GetItemsOk() (*[]Route, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *RouteListResponse) SetItems(v *[]Route) { + o.Items = v +} + +func (o RouteListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableRouteListResponse struct { + value *RouteListResponse + isSet bool +} + +func (v NullableRouteListResponse) Get() *RouteListResponse { + return v.value +} + +func (v *NullableRouteListResponse) Set(val *RouteListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRouteListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRouteListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRouteListResponse(val *RouteListResponse) *NullableRouteListResponse { + return &NullableRouteListResponse{value: val, isSet: true} +} + +func (v NullableRouteListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRouteListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_update_area_address_family.go b/services/iaas/model_update_area_address_family.go index 328b34648..ca1cf7314 100644 --- a/services/iaas/model_update_area_address_family.go +++ b/services/iaas/model_update_area_address_family.go @@ -10,7 +10,107 @@ API version: 1beta1 package iaas +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/iaas/model_update_area_ipv4.go b/services/iaas/model_update_area_ipv4.go index c51021aeb..2bb172fe1 100644 --- a/services/iaas/model_update_area_ipv4.go +++ b/services/iaas/model_update_area_ipv4.go @@ -10,6 +10,13 @@ API version: 1beta1 package iaas +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/iaas/model_update_network_address_family.go b/services/iaas/model_update_network_address_family.go index a568818e4..c17c3e9e0 100644 --- a/services/iaas/model_update_network_address_family.go +++ b/services/iaas/model_update_network_address_family.go @@ -10,8 +10,143 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the UpdateNetworkAddressFamily type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateNetworkAddressFamily{} + // UpdateNetworkAddressFamily The addressFamily object for a network update request. type UpdateNetworkAddressFamily struct { Ipv4 *UpdateNetworkIPv4Body `json:"ipv4,omitempty"` Ipv6 *UpdateNetworkIPv6Body `json:"ipv6,omitempty"` } + +// NewUpdateNetworkAddressFamily instantiates a new UpdateNetworkAddressFamily 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 NewUpdateNetworkAddressFamily() *UpdateNetworkAddressFamily { + this := UpdateNetworkAddressFamily{} + return &this +} + +// NewUpdateNetworkAddressFamilyWithDefaults instantiates a new UpdateNetworkAddressFamily 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 NewUpdateNetworkAddressFamilyWithDefaults() *UpdateNetworkAddressFamily { + this := UpdateNetworkAddressFamily{} + return &this +} + +// GetIpv4 returns the Ipv4 field value if set, zero value otherwise. +func (o *UpdateNetworkAddressFamily) GetIpv4() *UpdateNetworkIPv4Body { + if o == nil || IsNil(o.Ipv4) { + var ret *UpdateNetworkIPv4Body + 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 *UpdateNetworkAddressFamily) GetIpv4Ok() (*UpdateNetworkIPv4Body, 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 *UpdateNetworkAddressFamily) HasIpv4() bool { + if o != nil && !IsNil(o.Ipv4) { + return true + } + + return false +} + +// SetIpv4 gets a reference to the given UpdateNetworkIPv4Body and assigns it to the Ipv4 field. +func (o *UpdateNetworkAddressFamily) SetIpv4(v *UpdateNetworkIPv4Body) { + o.Ipv4 = v +} + +// GetIpv6 returns the Ipv6 field value if set, zero value otherwise. +func (o *UpdateNetworkAddressFamily) GetIpv6() *UpdateNetworkIPv6Body { + if o == nil || IsNil(o.Ipv6) { + var ret *UpdateNetworkIPv6Body + 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 *UpdateNetworkAddressFamily) GetIpv6Ok() (*UpdateNetworkIPv6Body, 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 *UpdateNetworkAddressFamily) HasIpv6() bool { + if o != nil && !IsNil(o.Ipv6) { + return true + } + + return false +} + +// SetIpv6 gets a reference to the given UpdateNetworkIPv6Body and assigns it to the Ipv6 field. +func (o *UpdateNetworkAddressFamily) SetIpv6(v *UpdateNetworkIPv6Body) { + o.Ipv6 = v +} + +func (o UpdateNetworkAddressFamily) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ipv4) { + toSerialize["ipv4"] = o.Ipv4 + } + if !IsNil(o.Ipv6) { + toSerialize["ipv6"] = o.Ipv6 + } + return toSerialize, nil +} + +type NullableUpdateNetworkAddressFamily struct { + value *UpdateNetworkAddressFamily + isSet bool +} + +func (v NullableUpdateNetworkAddressFamily) Get() *UpdateNetworkAddressFamily { + return v.value +} + +func (v *NullableUpdateNetworkAddressFamily) Set(val *UpdateNetworkAddressFamily) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateNetworkAddressFamily) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateNetworkAddressFamily) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateNetworkAddressFamily(val *UpdateNetworkAddressFamily) *NullableUpdateNetworkAddressFamily { + return &NullableUpdateNetworkAddressFamily{value: val, isSet: true} +} + +func (v NullableUpdateNetworkAddressFamily) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateNetworkAddressFamily) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_update_network_ipv4_body.go b/services/iaas/model_update_network_ipv4_body.go index 1edeb60de..d7eeb30c4 100644 --- a/services/iaas/model_update_network_ipv4_body.go +++ b/services/iaas/model_update_network_ipv4_body.go @@ -10,8 +10,155 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the UpdateNetworkIPv4Body type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateNetworkIPv4Body{} + // UpdateNetworkIPv4Body The config object for a IPv4 network update. type UpdateNetworkIPv4Body struct { + Gateway *NullableV1NetworkGateway `json:"gateway,omitempty"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers *[]string `json:"nameservers,omitempty"` } + +// NewUpdateNetworkIPv4Body instantiates a new UpdateNetworkIPv4Body 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 NewUpdateNetworkIPv4Body() *UpdateNetworkIPv4Body { + this := UpdateNetworkIPv4Body{} + return &this +} + +// NewUpdateNetworkIPv4BodyWithDefaults instantiates a new UpdateNetworkIPv4Body 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 NewUpdateNetworkIPv4BodyWithDefaults() *UpdateNetworkIPv4Body { + this := UpdateNetworkIPv4Body{} + return &this +} + +// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpdateNetworkIPv4Body) 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 *UpdateNetworkIPv4Body) 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 *UpdateNetworkIPv4Body) 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 *UpdateNetworkIPv4Body) SetGateway(v *V1NetworkGateway) { + o.Gateway.Set(v) +} + +// SetGatewayNil sets the value for Gateway to be an explicit nil +func (o *UpdateNetworkIPv4Body) SetGatewayNil() { + o.Gateway.Set(nil) +} + +// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil +func (o *UpdateNetworkIPv4Body) UnsetGateway() { + o.Gateway.Unset() +} + +// GetNameservers returns the Nameservers field value if set, zero value otherwise. +func (o *UpdateNetworkIPv4Body) 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 *UpdateNetworkIPv4Body) 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 *UpdateNetworkIPv4Body) 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 *UpdateNetworkIPv4Body) SetNameservers(v *[]string) { + o.Nameservers = v +} + +func (o UpdateNetworkIPv4Body) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Gateway.IsSet() { + toSerialize["gateway"] = o.Gateway.Get() + } + if !IsNil(o.Nameservers) { + toSerialize["nameservers"] = o.Nameservers + } + return toSerialize, nil +} + +type NullableUpdateNetworkIPv4Body struct { + value *UpdateNetworkIPv4Body + isSet bool +} + +func (v NullableUpdateNetworkIPv4Body) Get() *UpdateNetworkIPv4Body { + return v.value +} + +func (v *NullableUpdateNetworkIPv4Body) Set(val *UpdateNetworkIPv4Body) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateNetworkIPv4Body) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateNetworkIPv4Body) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateNetworkIPv4Body(val *UpdateNetworkIPv4Body) *NullableUpdateNetworkIPv4Body { + return &NullableUpdateNetworkIPv4Body{value: val, isSet: true} +} + +func (v NullableUpdateNetworkIPv4Body) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateNetworkIPv4Body) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_update_network_ipv6_body.go b/services/iaas/model_update_network_ipv6_body.go index d7c0c5723..42ec0feca 100644 --- a/services/iaas/model_update_network_ipv6_body.go +++ b/services/iaas/model_update_network_ipv6_body.go @@ -10,8 +10,155 @@ API version: 1beta1 package iaas +import ( + "encoding/json" +) + +// checks if the UpdateNetworkIPv6Body type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateNetworkIPv6Body{} + // UpdateNetworkIPv6Body The config object for a IPv6 network update. type UpdateNetworkIPv6Body struct { + Gateway *NullableV1NetworkGateway `json:"gateway,omitempty"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers *[]string `json:"nameservers,omitempty"` } + +// NewUpdateNetworkIPv6Body instantiates a new UpdateNetworkIPv6Body 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 NewUpdateNetworkIPv6Body() *UpdateNetworkIPv6Body { + this := UpdateNetworkIPv6Body{} + return &this +} + +// NewUpdateNetworkIPv6BodyWithDefaults instantiates a new UpdateNetworkIPv6Body 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 NewUpdateNetworkIPv6BodyWithDefaults() *UpdateNetworkIPv6Body { + this := UpdateNetworkIPv6Body{} + return &this +} + +// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpdateNetworkIPv6Body) 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 *UpdateNetworkIPv6Body) 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 *UpdateNetworkIPv6Body) 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 *UpdateNetworkIPv6Body) SetGateway(v *V1NetworkGateway) { + o.Gateway.Set(v) +} + +// SetGatewayNil sets the value for Gateway to be an explicit nil +func (o *UpdateNetworkIPv6Body) SetGatewayNil() { + o.Gateway.Set(nil) +} + +// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil +func (o *UpdateNetworkIPv6Body) UnsetGateway() { + o.Gateway.Unset() +} + +// GetNameservers returns the Nameservers field value if set, zero value otherwise. +func (o *UpdateNetworkIPv6Body) 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 *UpdateNetworkIPv6Body) 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 *UpdateNetworkIPv6Body) 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 *UpdateNetworkIPv6Body) SetNameservers(v *[]string) { + o.Nameservers = v +} + +func (o UpdateNetworkIPv6Body) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Gateway.IsSet() { + toSerialize["gateway"] = o.Gateway.Get() + } + if !IsNil(o.Nameservers) { + toSerialize["nameservers"] = o.Nameservers + } + return toSerialize, nil +} + +type NullableUpdateNetworkIPv6Body struct { + value *UpdateNetworkIPv6Body + isSet bool +} + +func (v NullableUpdateNetworkIPv6Body) Get() *UpdateNetworkIPv6Body { + return v.value +} + +func (v *NullableUpdateNetworkIPv6Body) Set(val *UpdateNetworkIPv6Body) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateNetworkIPv6Body) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateNetworkIPv6Body) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateNetworkIPv6Body(val *UpdateNetworkIPv6Body) *NullableUpdateNetworkIPv6Body { + return &NullableUpdateNetworkIPv6Body{value: val, isSet: true} +} + +func (v NullableUpdateNetworkIPv6Body) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateNetworkIPv6Body) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/iaas/model_v1_network_gateway.go b/services/iaas/model_v1_network_gateway.go index 67649b6ed..29ca461ba 100644 --- a/services/iaas/model_v1_network_gateway.go +++ b/services/iaas/model_v1_network_gateway.go @@ -10,6 +10,71 @@ API version: 1beta1 package iaas +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) +}