Skip to content

Commit

Permalink
Change tag to *string on update reqs (#222)
Browse files Browse the repository at this point in the history
* Change tag to pointer on update reqs

* Change type pointers to "omitempty" for updates
  • Loading branch information
optik-aper authored May 17, 2022
1 parent dd14151 commit b5d8037
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bare_metal_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type BareMetalUpdate struct {
ImageID string `json:"image_id,omitempty"`
UserData string `json:"user_data,omitempty"`
// Deprecated: Tag should no longer be used. Instead, use Tags.
Tag string `json:"tag,omitempty"`
Tag *string `json:"tag,omitempty"`
Tags []string `json:"tags"`
}

Expand Down
2 changes: 1 addition & 1 deletion instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ type InstanceUpdateReq struct {
Plan string `json:"plan,omitempty"`
Label string `json:"label,omitempty"`
// Deprecated: Tag should no longer be used. Instead, use Tags.
Tag string `json:"tag,omitempty"`
Tag *string `json:"tag,omitempty"`
Tags []string `json:"tags"`
OsID int `json:"os_id,omitempty"`
AppID int `json:"app_id,omitempty"`
Expand Down
10 changes: 5 additions & 5 deletions kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ type NodePoolReq struct {

// NodePoolReqUpdate struct used to update a node pool
type NodePoolReqUpdate struct {
NodeQuantity int `json:"node_quantity,omitempty"`
Tag string `json:"tag,omitempty"`
MinNodes int `json:"min_nodes,omitempty"`
MaxNodes int `json:"max_nodes,omitempty"`
AutoScaler *bool `json:"auto_scaler"`
NodeQuantity int `json:"node_quantity,omitempty"`
Tag *string `json:"tag,omitempty"`
MinNodes int `json:"min_nodes,omitempty"`
MaxNodes int `json:"max_nodes,omitempty"`
AutoScaler *bool `json:"auto_scaler,omitempty"`
}

type vkeClustersBase struct {
Expand Down

0 comments on commit b5d8037

Please sign in to comment.