Omit empty fields
This commit is contained in:
parent
b3138a42e5
commit
63c2a86871
1 changed files with 14 additions and 14 deletions
|
@ -14,23 +14,23 @@ type VirtualizationInterfacesService service
|
||||||
|
|
||||||
// NewVirtualizationInterface is used for creating a new virtualization interface
|
// NewVirtualizationInterface is used for creating a new virtualization interface
|
||||||
type NewVirtualizationInterface struct {
|
type NewVirtualizationInterface struct {
|
||||||
CustomFields interface{} `json:"custom_fields"`
|
CustomFields *interface{} `json:"custom_fields,omitempty"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Mode string `json:"mode"`
|
Mode string `json:"mode,omitempty"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description,omitempty"`
|
||||||
MACAddress string `json:"mac_address"`
|
MACAddress string `json:"mac_address,omitempty"`
|
||||||
Tags []struct {
|
Tags *[]struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Slug string `json:"slug"`
|
Slug string `json:"slug"`
|
||||||
Color string `json:"color"`
|
Color string `json:"color"`
|
||||||
} `json:"tags"`
|
} `json:"tags,omitempty"`
|
||||||
TaggedVLANs []int `json:"tagged_vlans"`
|
TaggedVLANs *[]int `json:"tagged_vlans,omitempty"`
|
||||||
Bridge int `json:"bridge"`
|
Bridge int `json:"bridge,omitempty"`
|
||||||
Parent int `json:"parent"`
|
Parent int `json:"parent,omitempty"`
|
||||||
UntaggedVLAN int `json:"untagged_vlan"`
|
UntaggedVLAN int `json:"untagged_vlan,omitempty"`
|
||||||
MTU int `json:"mtu"`
|
MTU int `json:"mtu,omitempty"`
|
||||||
VirtualMachine int `json:"virtual_machine"`
|
VirtualMachine int `json:"virtual_machine"`
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// VirtualizationInterfaces is a list of interfaces
|
// VirtualizationInterfaces is a list of interfaces
|
||||||
|
|
Loading…
Reference in a new issue