From 5b3d3687af240680f86d226d7959db0b17138adf Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 7 Jul 2025 07:21:10 +0000 Subject: [PATCH] Generate iaasalpha --- ...model_add_routing_table_to_area_payload.go | 2 +- .../model_create_network_ipv4_with_prefix.go | 20 +++-- .../model_create_network_ipv6_with_prefix.go | 20 +++-- .../iaasalpha/model_create_network_payload.go | 50 ++++++++++++ services/iaasalpha/model_network.go | 50 +++++++++++- .../iaasalpha/model_network_gateway_ipv4.go | 80 ------------------- .../model_network_gateway_ipv4_test.go | 11 --- .../iaasalpha/model_network_gateway_ipv6.go | 80 ------------------- .../model_network_gateway_ipv6_test.go | 11 --- services/iaasalpha/model_network_ipv4.go | 20 +++-- services/iaasalpha/model_network_ipv6.go | 20 +++-- .../model_partial_update_network_payload.go | 48 +++++++++++ services/iaasalpha/model_routing_table.go | 2 +- .../model_update_network_ipv4_body.go | 20 +++-- .../model_update_network_ipv6_body.go | 20 +++-- 15 files changed, 227 insertions(+), 227 deletions(-) delete mode 100644 services/iaasalpha/model_network_gateway_ipv4.go delete mode 100644 services/iaasalpha/model_network_gateway_ipv4_test.go delete mode 100644 services/iaasalpha/model_network_gateway_ipv6.go delete mode 100644 services/iaasalpha/model_network_gateway_ipv6_test.go diff --git a/services/iaasalpha/model_add_routing_table_to_area_payload.go b/services/iaasalpha/model_add_routing_table_to_area_payload.go index ffc9ffe9c..4544b797d 100644 --- a/services/iaasalpha/model_add_routing_table_to_area_payload.go +++ b/services/iaasalpha/model_add_routing_table_to_area_payload.go @@ -185,7 +185,7 @@ func setAddRoutingTableToAreaPayloadGetUpdatedAtAttributeType(arg *AddRoutingTab type AddRoutingTableToAreaPayload struct { // Date-time when resource was created. CreatedAt AddRoutingTableToAreaPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // This is the default routing table for this area. It can't be deleted and is used if the user does not specify it otherwise. + // This is the default routing table. It can't be deleted and is used if the user does not specify it otherwise. Default AddRoutingTableToAreaPayloadgetDefaultAttributeType `json:"default,omitempty"` // Description Object. Allows string up to 255 Characters. Description AddRoutingTableToAreaPayloadGetDescriptionAttributeType `json:"description,omitempty"` diff --git a/services/iaasalpha/model_create_network_ipv4_with_prefix.go b/services/iaasalpha/model_create_network_ipv4_with_prefix.go index 58704b15b..34753520e 100644 --- a/services/iaasalpha/model_create_network_ipv4_with_prefix.go +++ b/services/iaasalpha/model_create_network_ipv4_with_prefix.go @@ -21,22 +21,27 @@ var _ MappedNullable = &CreateNetworkIPv4WithPrefix{} types and functions for gateway */ -// isModel -type CreateNetworkIPv4WithPrefixGetGatewayAttributeType = *NullableNetworkGatewayIPv4 -type CreateNetworkIPv4WithPrefixGetGatewayArgType = *NullableNetworkGatewayIPv4 -type CreateNetworkIPv4WithPrefixGetGatewayRetType = *NullableNetworkGatewayIPv4 +// isNullableString +type CreateNetworkIPv4WithPrefixGetGatewayAttributeType = *NullableString func getCreateNetworkIPv4WithPrefixGetGatewayAttributeTypeOk(arg CreateNetworkIPv4WithPrefixGetGatewayAttributeType) (ret CreateNetworkIPv4WithPrefixGetGatewayRetType, ok bool) { if arg == nil { return nil, false } - return arg, true + return arg.Get(), true } func setCreateNetworkIPv4WithPrefixGetGatewayAttributeType(arg *CreateNetworkIPv4WithPrefixGetGatewayAttributeType, val CreateNetworkIPv4WithPrefixGetGatewayRetType) { - *arg = val + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } } +type CreateNetworkIPv4WithPrefixGetGatewayArgType = *string +type CreateNetworkIPv4WithPrefixGetGatewayRetType = *string + /* types and functions for nameservers */ @@ -80,6 +85,7 @@ type CreateNetworkIPv4WithPrefixGetPrefixRetType = string // CreateNetworkIPv4WithPrefix The create request for an IPv4 network with a specified prefix. type CreateNetworkIPv4WithPrefix struct { + // The IPv4 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. Gateway CreateNetworkIPv4WithPrefixGetGatewayAttributeType `json:"gateway,omitempty"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers CreateNetworkIPv4WithPrefixGetNameserversAttributeType `json:"nameservers,omitempty"` @@ -127,7 +133,7 @@ func (o *CreateNetworkIPv4WithPrefix) HasGateway() bool { return ok } -// SetGateway gets a reference to the given NetworkGatewayIPv4 and assigns it to the Gateway field. +// SetGateway gets a reference to the given string and assigns it to the Gateway field. func (o *CreateNetworkIPv4WithPrefix) SetGateway(v CreateNetworkIPv4WithPrefixGetGatewayRetType) { setCreateNetworkIPv4WithPrefixGetGatewayAttributeType(&o.Gateway, v) } diff --git a/services/iaasalpha/model_create_network_ipv6_with_prefix.go b/services/iaasalpha/model_create_network_ipv6_with_prefix.go index ae9230a9d..364d1dbb9 100644 --- a/services/iaasalpha/model_create_network_ipv6_with_prefix.go +++ b/services/iaasalpha/model_create_network_ipv6_with_prefix.go @@ -21,22 +21,27 @@ var _ MappedNullable = &CreateNetworkIPv6WithPrefix{} types and functions for gateway */ -// isModel -type CreateNetworkIPv6WithPrefixGetGatewayAttributeType = *NullableNetworkGatewayIPv6 -type CreateNetworkIPv6WithPrefixGetGatewayArgType = *NullableNetworkGatewayIPv6 -type CreateNetworkIPv6WithPrefixGetGatewayRetType = *NullableNetworkGatewayIPv6 +// isNullableString +type CreateNetworkIPv6WithPrefixGetGatewayAttributeType = *NullableString func getCreateNetworkIPv6WithPrefixGetGatewayAttributeTypeOk(arg CreateNetworkIPv6WithPrefixGetGatewayAttributeType) (ret CreateNetworkIPv6WithPrefixGetGatewayRetType, ok bool) { if arg == nil { return nil, false } - return arg, true + return arg.Get(), true } func setCreateNetworkIPv6WithPrefixGetGatewayAttributeType(arg *CreateNetworkIPv6WithPrefixGetGatewayAttributeType, val CreateNetworkIPv6WithPrefixGetGatewayRetType) { - *arg = val + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } } +type CreateNetworkIPv6WithPrefixGetGatewayArgType = *string +type CreateNetworkIPv6WithPrefixGetGatewayRetType = *string + /* types and functions for nameservers */ @@ -80,6 +85,7 @@ type CreateNetworkIPv6WithPrefixGetPrefixRetType = string // CreateNetworkIPv6WithPrefix The create request for an IPv6 network with a specified prefix. type CreateNetworkIPv6WithPrefix struct { + // The IPv6 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. Gateway CreateNetworkIPv6WithPrefixGetGatewayAttributeType `json:"gateway,omitempty"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers CreateNetworkIPv6WithPrefixGetNameserversAttributeType `json:"nameservers,omitempty"` @@ -127,7 +133,7 @@ func (o *CreateNetworkIPv6WithPrefix) HasGateway() bool { return ok } -// SetGateway gets a reference to the given NetworkGatewayIPv6 and assigns it to the Gateway field. +// SetGateway gets a reference to the given string and assigns it to the Gateway field. func (o *CreateNetworkIPv6WithPrefix) SetGateway(v CreateNetworkIPv6WithPrefixGetGatewayRetType) { setCreateNetworkIPv6WithPrefixGetGatewayAttributeType(&o.Gateway, v) } diff --git a/services/iaasalpha/model_create_network_payload.go b/services/iaasalpha/model_create_network_payload.go index 2b73435fa..a2aab3722 100644 --- a/services/iaasalpha/model_create_network_payload.go +++ b/services/iaasalpha/model_create_network_payload.go @@ -17,6 +17,26 @@ import ( // checks if the CreateNetworkPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateNetworkPayload{} +/* + types and functions for dhcp +*/ + +// isBoolean +type CreateNetworkPayloadgetDhcpAttributeType = *bool +type CreateNetworkPayloadgetDhcpArgType = bool +type CreateNetworkPayloadgetDhcpRetType = bool + +func getCreateNetworkPayloadgetDhcpAttributeTypeOk(arg CreateNetworkPayloadgetDhcpAttributeType) (ret CreateNetworkPayloadgetDhcpRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateNetworkPayloadgetDhcpAttributeType(arg *CreateNetworkPayloadgetDhcpAttributeType, val CreateNetworkPayloadgetDhcpRetType) { + *arg = &val +} + /* types and functions for ipv4 */ @@ -141,6 +161,8 @@ type CreateNetworkPayloadGetRoutingTableIdRetType = string // CreateNetworkPayload Object that represents the request body for a network create. type CreateNetworkPayload struct { + // Enable or disable DHCP for a network. + Dhcp CreateNetworkPayloadgetDhcpAttributeType `json:"dhcp,omitempty"` Ipv4 CreateNetworkPayloadGetIpv4AttributeType `json:"ipv4,omitempty"` Ipv6 CreateNetworkPayloadGetIpv6AttributeType `json:"ipv6,omitempty"` // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. @@ -171,9 +193,34 @@ func NewCreateNetworkPayload(name CreateNetworkPayloadGetNameArgType) *CreateNet // but it doesn't guarantee that properties required by API are set func NewCreateNetworkPayloadWithDefaults() *CreateNetworkPayload { this := CreateNetworkPayload{} + var dhcp bool = true + this.Dhcp = &dhcp return &this } +// GetDhcp returns the Dhcp field value if set, zero value otherwise. +func (o *CreateNetworkPayload) GetDhcp() (res CreateNetworkPayloadgetDhcpRetType) { + res, _ = o.GetDhcpOk() + return +} + +// GetDhcpOk returns a tuple with the Dhcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateNetworkPayload) GetDhcpOk() (ret CreateNetworkPayloadgetDhcpRetType, ok bool) { + return getCreateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp) +} + +// HasDhcp returns a boolean if a field has been set. +func (o *CreateNetworkPayload) HasDhcp() bool { + _, ok := o.GetDhcpOk() + return ok +} + +// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field. +func (o *CreateNetworkPayload) SetDhcp(v CreateNetworkPayloadgetDhcpRetType) { + setCreateNetworkPayloadgetDhcpAttributeType(&o.Dhcp, v) +} + // GetIpv4 returns the Ipv4 field value if set, zero value otherwise. func (o *CreateNetworkPayload) GetIpv4() (res CreateNetworkPayloadGetIpv4RetType) { res, _ = o.GetIpv4Ok() @@ -308,6 +355,9 @@ func (o *CreateNetworkPayload) SetRoutingTableId(v CreateNetworkPayloadGetRoutin func (o CreateNetworkPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getCreateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok { + toSerialize["Dhcp"] = val + } if val, ok := getCreateNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok { toSerialize["Ipv4"] = val } diff --git a/services/iaasalpha/model_network.go b/services/iaasalpha/model_network.go index 3f3bc74b7..056a8556c 100644 --- a/services/iaasalpha/model_network.go +++ b/services/iaasalpha/model_network.go @@ -38,6 +38,26 @@ func setNetworkGetCreatedAtAttributeType(arg *NetworkGetCreatedAtAttributeType, *arg = &val } +/* + types and functions for dhcp +*/ + +// isBoolean +type NetworkgetDhcpAttributeType = *bool +type NetworkgetDhcpArgType = bool +type NetworkgetDhcpRetType = bool + +func getNetworkgetDhcpAttributeTypeOk(arg NetworkgetDhcpAttributeType) (ret NetworkgetDhcpRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setNetworkgetDhcpAttributeType(arg *NetworkgetDhcpAttributeType, val NetworkgetDhcpRetType) { + *arg = &val +} + /* types and functions for id */ @@ -222,10 +242,12 @@ func setNetworkGetUpdatedAtAttributeType(arg *NetworkGetUpdatedAtAttributeType, *arg = &val } -// Network Object that represents a network. +// Network Object that represents a network. If no routing table is specified, the default routing table is used. type Network struct { // Date-time when resource was created. CreatedAt NetworkGetCreatedAtAttributeType `json:"createdAt,omitempty"` + // Enable or disable DHCP for a network. + Dhcp NetworkgetDhcpAttributeType `json:"dhcp,omitempty"` // Universally Unique Identifier (UUID). // REQUIRED Id NetworkGetIdAttributeType `json:"id" required:"true"` @@ -291,6 +313,29 @@ func (o *Network) SetCreatedAt(v NetworkGetCreatedAtRetType) { setNetworkGetCreatedAtAttributeType(&o.CreatedAt, v) } +// GetDhcp returns the Dhcp field value if set, zero value otherwise. +func (o *Network) GetDhcp() (res NetworkgetDhcpRetType) { + res, _ = o.GetDhcpOk() + return +} + +// GetDhcpOk returns a tuple with the Dhcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetDhcpOk() (ret NetworkgetDhcpRetType, ok bool) { + return getNetworkgetDhcpAttributeTypeOk(o.Dhcp) +} + +// HasDhcp returns a boolean if a field has been set. +func (o *Network) HasDhcp() bool { + _, ok := o.GetDhcpOk() + return ok +} + +// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field. +func (o *Network) SetDhcp(v NetworkgetDhcpRetType) { + setNetworkgetDhcpAttributeType(&o.Dhcp, v) +} + // GetId returns the Id field value func (o *Network) GetId() (ret NetworkGetIdRetType) { ret, _ = o.GetIdOk() @@ -485,6 +530,9 @@ func (o Network) ToMap() (map[string]interface{}, error) { if val, ok := getNetworkGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { toSerialize["CreatedAt"] = val } + if val, ok := getNetworkgetDhcpAttributeTypeOk(o.Dhcp); ok { + toSerialize["Dhcp"] = val + } if val, ok := getNetworkGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } diff --git a/services/iaasalpha/model_network_gateway_ipv4.go b/services/iaasalpha/model_network_gateway_ipv4.go deleted file mode 100644 index 25e8c707b..000000000 --- a/services/iaasalpha/model_network_gateway_ipv4.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -IaaS-API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaasalpha - -import ( - "encoding/json" -) - -// checks if the NetworkGatewayIPv4 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkGatewayIPv4{} - -// NetworkGatewayIPv4 The IPv4 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 NetworkGatewayIPv4 struct { -} - -// NewNetworkGatewayIPv4 instantiates a new NetworkGatewayIPv4 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 NewNetworkGatewayIPv4() *NetworkGatewayIPv4 { - this := NetworkGatewayIPv4{} - return &this -} - -// NewNetworkGatewayIPv4WithDefaults instantiates a new NetworkGatewayIPv4 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 NewNetworkGatewayIPv4WithDefaults() *NetworkGatewayIPv4 { - this := NetworkGatewayIPv4{} - return &this -} - -func (o NetworkGatewayIPv4) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - return toSerialize, nil -} - -type NullableNetworkGatewayIPv4 struct { - value *NetworkGatewayIPv4 - isSet bool -} - -func (v NullableNetworkGatewayIPv4) Get() *NetworkGatewayIPv4 { - return v.value -} - -func (v *NullableNetworkGatewayIPv4) Set(val *NetworkGatewayIPv4) { - v.value = val - v.isSet = true -} - -func (v NullableNetworkGatewayIPv4) IsSet() bool { - return v.isSet -} - -func (v *NullableNetworkGatewayIPv4) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetworkGatewayIPv4(val *NetworkGatewayIPv4) *NullableNetworkGatewayIPv4 { - return &NullableNetworkGatewayIPv4{value: val, isSet: true} -} - -func (v NullableNetworkGatewayIPv4) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetworkGatewayIPv4) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaasalpha/model_network_gateway_ipv4_test.go b/services/iaasalpha/model_network_gateway_ipv4_test.go deleted file mode 100644 index 7b8f0d01a..000000000 --- a/services/iaasalpha/model_network_gateway_ipv4_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -IaaS-API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaasalpha diff --git a/services/iaasalpha/model_network_gateway_ipv6.go b/services/iaasalpha/model_network_gateway_ipv6.go deleted file mode 100644 index 754aee566..000000000 --- a/services/iaasalpha/model_network_gateway_ipv6.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -IaaS-API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaasalpha - -import ( - "encoding/json" -) - -// checks if the NetworkGatewayIPv6 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NetworkGatewayIPv6{} - -// NetworkGatewayIPv6 The IPv6 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 NetworkGatewayIPv6 struct { -} - -// NewNetworkGatewayIPv6 instantiates a new NetworkGatewayIPv6 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 NewNetworkGatewayIPv6() *NetworkGatewayIPv6 { - this := NetworkGatewayIPv6{} - return &this -} - -// NewNetworkGatewayIPv6WithDefaults instantiates a new NetworkGatewayIPv6 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 NewNetworkGatewayIPv6WithDefaults() *NetworkGatewayIPv6 { - this := NetworkGatewayIPv6{} - return &this -} - -func (o NetworkGatewayIPv6) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - return toSerialize, nil -} - -type NullableNetworkGatewayIPv6 struct { - value *NetworkGatewayIPv6 - isSet bool -} - -func (v NullableNetworkGatewayIPv6) Get() *NetworkGatewayIPv6 { - return v.value -} - -func (v *NullableNetworkGatewayIPv6) Set(val *NetworkGatewayIPv6) { - v.value = val - v.isSet = true -} - -func (v NullableNetworkGatewayIPv6) IsSet() bool { - return v.isSet -} - -func (v *NullableNetworkGatewayIPv6) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNetworkGatewayIPv6(val *NetworkGatewayIPv6) *NullableNetworkGatewayIPv6 { - return &NullableNetworkGatewayIPv6{value: val, isSet: true} -} - -func (v NullableNetworkGatewayIPv6) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNetworkGatewayIPv6) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/iaasalpha/model_network_gateway_ipv6_test.go b/services/iaasalpha/model_network_gateway_ipv6_test.go deleted file mode 100644 index 7b8f0d01a..000000000 --- a/services/iaasalpha/model_network_gateway_ipv6_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -IaaS-API - -This API allows you to create and modify IaaS resources. - -API version: 2alpha1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package iaasalpha diff --git a/services/iaasalpha/model_network_ipv4.go b/services/iaasalpha/model_network_ipv4.go index 2a8046435..c66c961ca 100644 --- a/services/iaasalpha/model_network_ipv4.go +++ b/services/iaasalpha/model_network_ipv4.go @@ -21,22 +21,27 @@ var _ MappedNullable = &NetworkIPv4{} types and functions for gateway */ -// isModel -type NetworkIPv4GetGatewayAttributeType = *NullableNetworkGatewayIPv4 -type NetworkIPv4GetGatewayArgType = *NullableNetworkGatewayIPv4 -type NetworkIPv4GetGatewayRetType = *NullableNetworkGatewayIPv4 +// isNullableString +type NetworkIPv4GetGatewayAttributeType = *NullableString func getNetworkIPv4GetGatewayAttributeTypeOk(arg NetworkIPv4GetGatewayAttributeType) (ret NetworkIPv4GetGatewayRetType, ok bool) { if arg == nil { return nil, false } - return arg, true + return arg.Get(), true } func setNetworkIPv4GetGatewayAttributeType(arg *NetworkIPv4GetGatewayAttributeType, val NetworkIPv4GetGatewayRetType) { - *arg = val + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } } +type NetworkIPv4GetGatewayArgType = *string +type NetworkIPv4GetGatewayRetType = *string + /* types and functions for nameservers */ @@ -100,6 +105,7 @@ type NetworkIPv4GetPublicIpRetType = string // NetworkIPv4 Object that represents the IPv4 part of a network. type NetworkIPv4 struct { + // The IPv4 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. Gateway NetworkIPv4GetGatewayAttributeType `json:"gateway,omitempty"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers NetworkIPv4GetNameserversAttributeType `json:"nameservers,omitempty"` @@ -148,7 +154,7 @@ func (o *NetworkIPv4) HasGateway() bool { return ok } -// SetGateway gets a reference to the given NetworkGatewayIPv4 and assigns it to the Gateway field. +// SetGateway gets a reference to the given string and assigns it to the Gateway field. func (o *NetworkIPv4) SetGateway(v NetworkIPv4GetGatewayRetType) { setNetworkIPv4GetGatewayAttributeType(&o.Gateway, v) } diff --git a/services/iaasalpha/model_network_ipv6.go b/services/iaasalpha/model_network_ipv6.go index a9058110e..147f42042 100644 --- a/services/iaasalpha/model_network_ipv6.go +++ b/services/iaasalpha/model_network_ipv6.go @@ -21,22 +21,27 @@ var _ MappedNullable = &NetworkIPv6{} types and functions for gateway */ -// isModel -type NetworkIPv6GetGatewayAttributeType = *NullableNetworkGatewayIPv6 -type NetworkIPv6GetGatewayArgType = *NullableNetworkGatewayIPv6 -type NetworkIPv6GetGatewayRetType = *NullableNetworkGatewayIPv6 +// isNullableString +type NetworkIPv6GetGatewayAttributeType = *NullableString func getNetworkIPv6GetGatewayAttributeTypeOk(arg NetworkIPv6GetGatewayAttributeType) (ret NetworkIPv6GetGatewayRetType, ok bool) { if arg == nil { return nil, false } - return arg, true + return arg.Get(), true } func setNetworkIPv6GetGatewayAttributeType(arg *NetworkIPv6GetGatewayAttributeType, val NetworkIPv6GetGatewayRetType) { - *arg = val + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } } +type NetworkIPv6GetGatewayArgType = *string +type NetworkIPv6GetGatewayRetType = *string + /* types and functions for nameservers */ @@ -79,6 +84,7 @@ func setNetworkIPv6GetPrefixesAttributeType(arg *NetworkIPv6GetPrefixesAttribute // NetworkIPv6 Object that represents the IPv6 part of a network. type NetworkIPv6 struct { + // The IPv6 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. Gateway NetworkIPv6GetGatewayAttributeType `json:"gateway,omitempty"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers NetworkIPv6GetNameserversAttributeType `json:"nameservers,omitempty"` @@ -125,7 +131,7 @@ func (o *NetworkIPv6) HasGateway() bool { return ok } -// SetGateway gets a reference to the given NetworkGatewayIPv6 and assigns it to the Gateway field. +// SetGateway gets a reference to the given string and assigns it to the Gateway field. func (o *NetworkIPv6) SetGateway(v NetworkIPv6GetGatewayRetType) { setNetworkIPv6GetGatewayAttributeType(&o.Gateway, v) } diff --git a/services/iaasalpha/model_partial_update_network_payload.go b/services/iaasalpha/model_partial_update_network_payload.go index def06c90b..34fc5146c 100644 --- a/services/iaasalpha/model_partial_update_network_payload.go +++ b/services/iaasalpha/model_partial_update_network_payload.go @@ -17,6 +17,26 @@ import ( // checks if the PartialUpdateNetworkPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PartialUpdateNetworkPayload{} +/* + types and functions for dhcp +*/ + +// isBoolean +type PartialUpdateNetworkPayloadgetDhcpAttributeType = *bool +type PartialUpdateNetworkPayloadgetDhcpArgType = bool +type PartialUpdateNetworkPayloadgetDhcpRetType = bool + +func getPartialUpdateNetworkPayloadgetDhcpAttributeTypeOk(arg PartialUpdateNetworkPayloadgetDhcpAttributeType) (ret PartialUpdateNetworkPayloadgetDhcpRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPartialUpdateNetworkPayloadgetDhcpAttributeType(arg *PartialUpdateNetworkPayloadgetDhcpAttributeType, val PartialUpdateNetworkPayloadgetDhcpRetType) { + *arg = &val +} + /* types and functions for ipv4 */ @@ -141,6 +161,8 @@ type PartialUpdateNetworkPayloadGetRoutingTableIdRetType = string // PartialUpdateNetworkPayload Object that represents the request body for a network update. type PartialUpdateNetworkPayload struct { + // Enable or disable DHCP for a network. + Dhcp PartialUpdateNetworkPayloadgetDhcpAttributeType `json:"dhcp,omitempty"` Ipv4 PartialUpdateNetworkPayloadGetIpv4AttributeType `json:"ipv4,omitempty"` Ipv6 PartialUpdateNetworkPayloadGetIpv6AttributeType `json:"ipv6,omitempty"` // Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. @@ -170,6 +192,29 @@ func NewPartialUpdateNetworkPayloadWithDefaults() *PartialUpdateNetworkPayload { return &this } +// GetDhcp returns the Dhcp field value if set, zero value otherwise. +func (o *PartialUpdateNetworkPayload) GetDhcp() (res PartialUpdateNetworkPayloadgetDhcpRetType) { + res, _ = o.GetDhcpOk() + return +} + +// GetDhcpOk returns a tuple with the Dhcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateNetworkPayload) GetDhcpOk() (ret PartialUpdateNetworkPayloadgetDhcpRetType, ok bool) { + return getPartialUpdateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp) +} + +// HasDhcp returns a boolean if a field has been set. +func (o *PartialUpdateNetworkPayload) HasDhcp() bool { + _, ok := o.GetDhcpOk() + return ok +} + +// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field. +func (o *PartialUpdateNetworkPayload) SetDhcp(v PartialUpdateNetworkPayloadgetDhcpRetType) { + setPartialUpdateNetworkPayloadgetDhcpAttributeType(&o.Dhcp, v) +} + // GetIpv4 returns the Ipv4 field value if set, zero value otherwise. func (o *PartialUpdateNetworkPayload) GetIpv4() (res PartialUpdateNetworkPayloadGetIpv4RetType) { res, _ = o.GetIpv4Ok() @@ -310,6 +355,9 @@ func (o *PartialUpdateNetworkPayload) SetRoutingTableId(v PartialUpdateNetworkPa func (o PartialUpdateNetworkPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getPartialUpdateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok { + toSerialize["Dhcp"] = val + } if val, ok := getPartialUpdateNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok { toSerialize["Ipv4"] = val } diff --git a/services/iaasalpha/model_routing_table.go b/services/iaasalpha/model_routing_table.go index 21530b83c..b4b0316fb 100644 --- a/services/iaasalpha/model_routing_table.go +++ b/services/iaasalpha/model_routing_table.go @@ -185,7 +185,7 @@ func setRoutingTableGetUpdatedAtAttributeType(arg *RoutingTableGetUpdatedAtAttri type RoutingTable struct { // Date-time when resource was created. CreatedAt RoutingTableGetCreatedAtAttributeType `json:"createdAt,omitempty"` - // This is the default routing table for this area. It can't be deleted and is used if the user does not specify it otherwise. + // This is the default routing table. It can't be deleted and is used if the user does not specify it otherwise. Default RoutingTablegetDefaultAttributeType `json:"default,omitempty"` // Description Object. Allows string up to 255 Characters. Description RoutingTableGetDescriptionAttributeType `json:"description,omitempty"` diff --git a/services/iaasalpha/model_update_network_ipv4_body.go b/services/iaasalpha/model_update_network_ipv4_body.go index 8d5d04399..0cfb0c33a 100644 --- a/services/iaasalpha/model_update_network_ipv4_body.go +++ b/services/iaasalpha/model_update_network_ipv4_body.go @@ -21,22 +21,27 @@ var _ MappedNullable = &UpdateNetworkIPv4Body{} types and functions for gateway */ -// isModel -type UpdateNetworkIPv4BodyGetGatewayAttributeType = *NullableNetworkGatewayIPv4 -type UpdateNetworkIPv4BodyGetGatewayArgType = *NullableNetworkGatewayIPv4 -type UpdateNetworkIPv4BodyGetGatewayRetType = *NullableNetworkGatewayIPv4 +// isNullableString +type UpdateNetworkIPv4BodyGetGatewayAttributeType = *NullableString func getUpdateNetworkIPv4BodyGetGatewayAttributeTypeOk(arg UpdateNetworkIPv4BodyGetGatewayAttributeType) (ret UpdateNetworkIPv4BodyGetGatewayRetType, ok bool) { if arg == nil { return nil, false } - return arg, true + return arg.Get(), true } func setUpdateNetworkIPv4BodyGetGatewayAttributeType(arg *UpdateNetworkIPv4BodyGetGatewayAttributeType, val UpdateNetworkIPv4BodyGetGatewayRetType) { - *arg = val + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } } +type UpdateNetworkIPv4BodyGetGatewayArgType = *string +type UpdateNetworkIPv4BodyGetGatewayRetType = *string + /* types and functions for nameservers */ @@ -59,6 +64,7 @@ func setUpdateNetworkIPv4BodyGetNameserversAttributeType(arg *UpdateNetworkIPv4B // UpdateNetworkIPv4Body The config object for a IPv4 network update. type UpdateNetworkIPv4Body struct { + // The IPv4 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. Gateway UpdateNetworkIPv4BodyGetGatewayAttributeType `json:"gateway,omitempty"` // A list containing DNS Servers/Nameservers for IPv4. Nameservers UpdateNetworkIPv4BodyGetNameserversAttributeType `json:"nameservers,omitempty"` @@ -100,7 +106,7 @@ func (o *UpdateNetworkIPv4Body) HasGateway() bool { return ok } -// SetGateway gets a reference to the given NetworkGatewayIPv4 and assigns it to the Gateway field. +// SetGateway gets a reference to the given string and assigns it to the Gateway field. func (o *UpdateNetworkIPv4Body) SetGateway(v UpdateNetworkIPv4BodyGetGatewayRetType) { setUpdateNetworkIPv4BodyGetGatewayAttributeType(&o.Gateway, v) } diff --git a/services/iaasalpha/model_update_network_ipv6_body.go b/services/iaasalpha/model_update_network_ipv6_body.go index d036cb66d..0002d7f93 100644 --- a/services/iaasalpha/model_update_network_ipv6_body.go +++ b/services/iaasalpha/model_update_network_ipv6_body.go @@ -21,22 +21,27 @@ var _ MappedNullable = &UpdateNetworkIPv6Body{} types and functions for gateway */ -// isModel -type UpdateNetworkIPv6BodyGetGatewayAttributeType = *NullableNetworkGatewayIPv6 -type UpdateNetworkIPv6BodyGetGatewayArgType = *NullableNetworkGatewayIPv6 -type UpdateNetworkIPv6BodyGetGatewayRetType = *NullableNetworkGatewayIPv6 +// isNullableString +type UpdateNetworkIPv6BodyGetGatewayAttributeType = *NullableString func getUpdateNetworkIPv6BodyGetGatewayAttributeTypeOk(arg UpdateNetworkIPv6BodyGetGatewayAttributeType) (ret UpdateNetworkIPv6BodyGetGatewayRetType, ok bool) { if arg == nil { return nil, false } - return arg, true + return arg.Get(), true } func setUpdateNetworkIPv6BodyGetGatewayAttributeType(arg *UpdateNetworkIPv6BodyGetGatewayAttributeType, val UpdateNetworkIPv6BodyGetGatewayRetType) { - *arg = val + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } } +type UpdateNetworkIPv6BodyGetGatewayArgType = *string +type UpdateNetworkIPv6BodyGetGatewayRetType = *string + /* types and functions for nameservers */ @@ -59,6 +64,7 @@ func setUpdateNetworkIPv6BodyGetNameserversAttributeType(arg *UpdateNetworkIPv6B // UpdateNetworkIPv6Body The config object for a IPv6 network update. type UpdateNetworkIPv6Body struct { + // The IPv6 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. Gateway UpdateNetworkIPv6BodyGetGatewayAttributeType `json:"gateway,omitempty"` // A list containing DNS Servers/Nameservers for IPv6. Nameservers UpdateNetworkIPv6BodyGetNameserversAttributeType `json:"nameservers,omitempty"` @@ -100,7 +106,7 @@ func (o *UpdateNetworkIPv6Body) HasGateway() bool { return ok } -// SetGateway gets a reference to the given NetworkGatewayIPv6 and assigns it to the Gateway field. +// SetGateway gets a reference to the given string and assigns it to the Gateway field. func (o *UpdateNetworkIPv6Body) SetGateway(v UpdateNetworkIPv6BodyGetGatewayRetType) { setUpdateNetworkIPv6BodyGetGatewayAttributeType(&o.Gateway, v) }