## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
600 lines
17 KiB
Go
600 lines
17 KiB
Go
/*
|
|
STACKIT IaaS API
|
|
|
|
This API allows you to create and modify IaaS resources.
|
|
|
|
API version: 2beta1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package iaasbeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
// checks if the Network type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Network{}
|
|
|
|
/*
|
|
types and functions for createdAt
|
|
*/
|
|
|
|
// isDateTime
|
|
type NetworkGetCreatedAtAttributeType = *time.Time
|
|
type NetworkGetCreatedAtArgType = time.Time
|
|
type NetworkGetCreatedAtRetType = time.Time
|
|
|
|
func getNetworkGetCreatedAtAttributeTypeOk(arg NetworkGetCreatedAtAttributeType) (ret NetworkGetCreatedAtRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setNetworkGetCreatedAtAttributeType(arg *NetworkGetCreatedAtAttributeType, val NetworkGetCreatedAtRetType) {
|
|
*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
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type NetworkGetIdAttributeType = *string
|
|
|
|
func getNetworkGetIdAttributeTypeOk(arg NetworkGetIdAttributeType) (ret NetworkGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setNetworkGetIdAttributeType(arg *NetworkGetIdAttributeType, val NetworkGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type NetworkGetIdArgType = string
|
|
type NetworkGetIdRetType = string
|
|
|
|
/*
|
|
types and functions for ipv4
|
|
*/
|
|
|
|
// isModel
|
|
type NetworkGetIpv4AttributeType = *NetworkIPv4
|
|
type NetworkGetIpv4ArgType = NetworkIPv4
|
|
type NetworkGetIpv4RetType = NetworkIPv4
|
|
|
|
func getNetworkGetIpv4AttributeTypeOk(arg NetworkGetIpv4AttributeType) (ret NetworkGetIpv4RetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setNetworkGetIpv4AttributeType(arg *NetworkGetIpv4AttributeType, val NetworkGetIpv4RetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for ipv6
|
|
*/
|
|
|
|
// isModel
|
|
type NetworkGetIpv6AttributeType = *NetworkIPv6
|
|
type NetworkGetIpv6ArgType = NetworkIPv6
|
|
type NetworkGetIpv6RetType = NetworkIPv6
|
|
|
|
func getNetworkGetIpv6AttributeTypeOk(arg NetworkGetIpv6AttributeType) (ret NetworkGetIpv6RetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setNetworkGetIpv6AttributeType(arg *NetworkGetIpv6AttributeType, val NetworkGetIpv6RetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for labels
|
|
*/
|
|
|
|
// isFreeform
|
|
type NetworkGetLabelsAttributeType = *map[string]interface{}
|
|
type NetworkGetLabelsArgType = map[string]interface{}
|
|
type NetworkGetLabelsRetType = map[string]interface{}
|
|
|
|
func getNetworkGetLabelsAttributeTypeOk(arg NetworkGetLabelsAttributeType) (ret NetworkGetLabelsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setNetworkGetLabelsAttributeType(arg *NetworkGetLabelsAttributeType, val NetworkGetLabelsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type NetworkGetNameAttributeType = *string
|
|
|
|
func getNetworkGetNameAttributeTypeOk(arg NetworkGetNameAttributeType) (ret NetworkGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setNetworkGetNameAttributeType(arg *NetworkGetNameAttributeType, val NetworkGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type NetworkGetNameArgType = string
|
|
type NetworkGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for routed
|
|
*/
|
|
|
|
// isBoolean
|
|
type NetworkgetRoutedAttributeType = *bool
|
|
type NetworkgetRoutedArgType = bool
|
|
type NetworkgetRoutedRetType = bool
|
|
|
|
func getNetworkgetRoutedAttributeTypeOk(arg NetworkgetRoutedAttributeType) (ret NetworkgetRoutedRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setNetworkgetRoutedAttributeType(arg *NetworkgetRoutedAttributeType, val NetworkgetRoutedRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for routingTableId
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type NetworkGetRoutingTableIdAttributeType = *string
|
|
|
|
func getNetworkGetRoutingTableIdAttributeTypeOk(arg NetworkGetRoutingTableIdAttributeType) (ret NetworkGetRoutingTableIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setNetworkGetRoutingTableIdAttributeType(arg *NetworkGetRoutingTableIdAttributeType, val NetworkGetRoutingTableIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type NetworkGetRoutingTableIdArgType = string
|
|
type NetworkGetRoutingTableIdRetType = string
|
|
|
|
/*
|
|
types and functions for status
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type NetworkGetStatusAttributeType = *string
|
|
|
|
func getNetworkGetStatusAttributeTypeOk(arg NetworkGetStatusAttributeType) (ret NetworkGetStatusRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setNetworkGetStatusAttributeType(arg *NetworkGetStatusAttributeType, val NetworkGetStatusRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type NetworkGetStatusArgType = string
|
|
type NetworkGetStatusRetType = string
|
|
|
|
/*
|
|
types and functions for updatedAt
|
|
*/
|
|
|
|
// isDateTime
|
|
type NetworkGetUpdatedAtAttributeType = *time.Time
|
|
type NetworkGetUpdatedAtArgType = time.Time
|
|
type NetworkGetUpdatedAtRetType = time.Time
|
|
|
|
func getNetworkGetUpdatedAtAttributeTypeOk(arg NetworkGetUpdatedAtAttributeType) (ret NetworkGetUpdatedAtRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setNetworkGetUpdatedAtAttributeType(arg *NetworkGetUpdatedAtAttributeType, val NetworkGetUpdatedAtRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// 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"`
|
|
Ipv4 NetworkGetIpv4AttributeType `json:"ipv4,omitempty"`
|
|
Ipv6 NetworkGetIpv6AttributeType `json:"ipv6,omitempty"`
|
|
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
|
Labels NetworkGetLabelsAttributeType `json:"labels,omitempty"`
|
|
// REQUIRED
|
|
Name NetworkGetNameAttributeType `json:"name" required:"true"`
|
|
// Shows if the network is routed and therefore accessible from other networks.
|
|
Routed NetworkgetRoutedAttributeType `json:"routed,omitempty"`
|
|
// Universally Unique Identifier (UUID).
|
|
RoutingTableId NetworkGetRoutingTableIdAttributeType `json:"routingTableId,omitempty"`
|
|
// The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`.
|
|
// REQUIRED
|
|
Status NetworkGetStatusAttributeType `json:"status" required:"true"`
|
|
// Date-time when resource was last updated.
|
|
UpdatedAt NetworkGetUpdatedAtAttributeType `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(id NetworkGetIdArgType, name NetworkGetNameArgType, status NetworkGetStatusArgType) *Network {
|
|
this := Network{}
|
|
setNetworkGetIdAttributeType(&this.Id, id)
|
|
setNetworkGetNameAttributeType(&this.Name, name)
|
|
setNetworkGetStatusAttributeType(&this.Status, status)
|
|
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() (res NetworkGetCreatedAtRetType) {
|
|
res, _ = o.GetCreatedAtOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret NetworkGetCreatedAtRetType, ok bool) {
|
|
return getNetworkGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *Network) HasCreatedAt() bool {
|
|
_, ok := o.GetCreatedAtOk()
|
|
return ok
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
|
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()
|
|
return ret
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Network) GetIdOk() (ret NetworkGetIdRetType, ok bool) {
|
|
return getNetworkGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *Network) SetId(v NetworkGetIdRetType) {
|
|
setNetworkGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetIpv4 returns the Ipv4 field value if set, zero value otherwise.
|
|
func (o *Network) GetIpv4() (res NetworkGetIpv4RetType) {
|
|
res, _ = o.GetIpv4Ok()
|
|
return
|
|
}
|
|
|
|
// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Network) GetIpv4Ok() (ret NetworkGetIpv4RetType, ok bool) {
|
|
return getNetworkGetIpv4AttributeTypeOk(o.Ipv4)
|
|
}
|
|
|
|
// HasIpv4 returns a boolean if a field has been set.
|
|
func (o *Network) HasIpv4() bool {
|
|
_, ok := o.GetIpv4Ok()
|
|
return ok
|
|
}
|
|
|
|
// SetIpv4 gets a reference to the given NetworkIPv4 and assigns it to the Ipv4 field.
|
|
func (o *Network) SetIpv4(v NetworkGetIpv4RetType) {
|
|
setNetworkGetIpv4AttributeType(&o.Ipv4, v)
|
|
}
|
|
|
|
// GetIpv6 returns the Ipv6 field value if set, zero value otherwise.
|
|
func (o *Network) GetIpv6() (res NetworkGetIpv6RetType) {
|
|
res, _ = o.GetIpv6Ok()
|
|
return
|
|
}
|
|
|
|
// GetIpv6Ok returns a tuple with the Ipv6 field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Network) GetIpv6Ok() (ret NetworkGetIpv6RetType, ok bool) {
|
|
return getNetworkGetIpv6AttributeTypeOk(o.Ipv6)
|
|
}
|
|
|
|
// HasIpv6 returns a boolean if a field has been set.
|
|
func (o *Network) HasIpv6() bool {
|
|
_, ok := o.GetIpv6Ok()
|
|
return ok
|
|
}
|
|
|
|
// SetIpv6 gets a reference to the given NetworkIPv6 and assigns it to the Ipv6 field.
|
|
func (o *Network) SetIpv6(v NetworkGetIpv6RetType) {
|
|
setNetworkGetIpv6AttributeType(&o.Ipv6, v)
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
|
func (o *Network) GetLabels() (res NetworkGetLabelsRetType) {
|
|
res, _ = o.GetLabelsOk()
|
|
return
|
|
}
|
|
|
|
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Network) GetLabelsOk() (ret NetworkGetLabelsRetType, ok bool) {
|
|
return getNetworkGetLabelsAttributeTypeOk(o.Labels)
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *Network) HasLabels() bool {
|
|
_, ok := o.GetLabelsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
|
func (o *Network) SetLabels(v NetworkGetLabelsRetType) {
|
|
setNetworkGetLabelsAttributeType(&o.Labels, v)
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *Network) GetName() (ret NetworkGetNameRetType) {
|
|
ret, _ = o.GetNameOk()
|
|
return ret
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Network) GetNameOk() (ret NetworkGetNameRetType, ok bool) {
|
|
return getNetworkGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *Network) SetName(v NetworkGetNameRetType) {
|
|
setNetworkGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetRouted returns the Routed field value if set, zero value otherwise.
|
|
func (o *Network) GetRouted() (res NetworkgetRoutedRetType) {
|
|
res, _ = o.GetRoutedOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret NetworkgetRoutedRetType, ok bool) {
|
|
return getNetworkgetRoutedAttributeTypeOk(o.Routed)
|
|
}
|
|
|
|
// HasRouted returns a boolean if a field has been set.
|
|
func (o *Network) HasRouted() bool {
|
|
_, ok := o.GetRoutedOk()
|
|
return ok
|
|
}
|
|
|
|
// SetRouted gets a reference to the given bool and assigns it to the Routed field.
|
|
func (o *Network) SetRouted(v NetworkgetRoutedRetType) {
|
|
setNetworkgetRoutedAttributeType(&o.Routed, v)
|
|
}
|
|
|
|
// GetRoutingTableId returns the RoutingTableId field value if set, zero value otherwise.
|
|
func (o *Network) GetRoutingTableId() (res NetworkGetRoutingTableIdRetType) {
|
|
res, _ = o.GetRoutingTableIdOk()
|
|
return
|
|
}
|
|
|
|
// GetRoutingTableIdOk returns a tuple with the RoutingTableId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Network) GetRoutingTableIdOk() (ret NetworkGetRoutingTableIdRetType, ok bool) {
|
|
return getNetworkGetRoutingTableIdAttributeTypeOk(o.RoutingTableId)
|
|
}
|
|
|
|
// HasRoutingTableId returns a boolean if a field has been set.
|
|
func (o *Network) HasRoutingTableId() bool {
|
|
_, ok := o.GetRoutingTableIdOk()
|
|
return ok
|
|
}
|
|
|
|
// SetRoutingTableId gets a reference to the given string and assigns it to the RoutingTableId field.
|
|
func (o *Network) SetRoutingTableId(v NetworkGetRoutingTableIdRetType) {
|
|
setNetworkGetRoutingTableIdAttributeType(&o.RoutingTableId, v)
|
|
}
|
|
|
|
// GetStatus returns the Status field value
|
|
func (o *Network) GetStatus() (ret NetworkGetStatusRetType) {
|
|
ret, _ = o.GetStatusOk()
|
|
return ret
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Network) GetStatusOk() (ret NetworkGetStatusRetType, ok bool) {
|
|
return getNetworkGetStatusAttributeTypeOk(o.Status)
|
|
}
|
|
|
|
// SetStatus sets field value
|
|
func (o *Network) SetStatus(v NetworkGetStatusRetType) {
|
|
setNetworkGetStatusAttributeType(&o.Status, v)
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
|
func (o *Network) GetUpdatedAt() (res NetworkGetUpdatedAtRetType) {
|
|
res, _ = o.GetUpdatedAtOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret NetworkGetUpdatedAtRetType, ok bool) {
|
|
return getNetworkGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
|
|
}
|
|
|
|
// HasUpdatedAt returns a boolean if a field has been set.
|
|
func (o *Network) HasUpdatedAt() bool {
|
|
_, ok := o.GetUpdatedAtOk()
|
|
return ok
|
|
}
|
|
|
|
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
|
func (o *Network) SetUpdatedAt(v NetworkGetUpdatedAtRetType) {
|
|
setNetworkGetUpdatedAtAttributeType(&o.UpdatedAt, v)
|
|
}
|
|
|
|
func (o Network) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
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
|
|
}
|
|
if val, ok := getNetworkGetIpv4AttributeTypeOk(o.Ipv4); ok {
|
|
toSerialize["Ipv4"] = val
|
|
}
|
|
if val, ok := getNetworkGetIpv6AttributeTypeOk(o.Ipv6); ok {
|
|
toSerialize["Ipv6"] = val
|
|
}
|
|
if val, ok := getNetworkGetLabelsAttributeTypeOk(o.Labels); ok {
|
|
toSerialize["Labels"] = val
|
|
}
|
|
if val, ok := getNetworkGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getNetworkgetRoutedAttributeTypeOk(o.Routed); ok {
|
|
toSerialize["Routed"] = val
|
|
}
|
|
if val, ok := getNetworkGetRoutingTableIdAttributeTypeOk(o.RoutingTableId); ok {
|
|
toSerialize["RoutingTableId"] = val
|
|
}
|
|
if val, ok := getNetworkGetStatusAttributeTypeOk(o.Status); ok {
|
|
toSerialize["Status"] = val
|
|
}
|
|
if val, ok := getNetworkGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
|
|
toSerialize["UpdatedAt"] = val
|
|
}
|
|
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)
|
|
}
|