Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions v2/types/servercluster/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import "encoding/json"

type IDName struct {
ID int `json:"id"`
Name string `json:"name"`
Name string `json:"name,omitempty"`
}

type SrvClusterTemplateRef struct {
Expand All @@ -31,8 +31,8 @@ type SrvClusterTemplateRef struct {

type Servers struct {
ID int `json:"id"`
Name string `json:"name"`
Shared bool `json:"shared"`
Name string `json:"name,omitempty"`
Shared bool `json:"shared,omitempty"`
}

type GatewayPrefix struct {
Expand Down Expand Up @@ -100,7 +100,7 @@ type ServerClusterW struct {
Name string `json:"name"`
Admin IDName `json:"admin"`
Site IDName `json:"site"`
VPC IDName `json:"vpc"`
VPC *IDName `json:"vpc,omitempty"`
VPCList []VPCMapping `json:"vpcList,omitempty"`
SrvClusterTemplate IDName `json:"srvClusterTemplate"`
SrvClusterTemplateVLANs []VNetVLAN `json:"-"`
Expand All @@ -121,7 +121,7 @@ func (s ServerClusterW) MarshalJSON() ([]byte, error) {
Name string `json:"name"`
Admin IDName `json:"admin"`
Site IDName `json:"site"`
VPC IDName `json:"vpc"`
VPC *IDName `json:"vpc,omitempty"`
VPCList []VPCMapping `json:"vpcList,omitempty"`
SrvClusterTemplate SrvClusterTemplateRef `json:"srvClusterTemplate"`
Tags []string `json:"tags"`
Expand Down