Skip to content

Commit

Permalink
Merge pull request #202 from dabcoder/master
Browse files Browse the repository at this point in the history
Fix screen widget FillMin and FillMax type matching
  • Loading branch information
nyanshak authored Jan 8, 2019
2 parents 1df5bda + 7a0edc5 commit 66f4fd4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions datadog-accessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Please see the included LICENSE file for licensing information.
*
* Copyright 2018 by authors and contributors.
* Copyright 2019 by authors and contributors.
*/

package datadog
Expand Down Expand Up @@ -8601,7 +8601,7 @@ func (t *TileDefRequestStyle) SetWidth(v string) {
}

// GetFillMax returns the FillMax field if non-nil, zero value otherwise.
func (t *TileDefStyle) GetFillMax() string {
func (t *TileDefStyle) GetFillMax() json.Number {
if t == nil || t.FillMax == nil {
return ""
}
Expand All @@ -8610,7 +8610,7 @@ func (t *TileDefStyle) GetFillMax() string {

// GetFillMaxOk returns a tuple with the FillMax field if it's non-nil, zero value otherwise
// and a boolean to check if the value has been set.
func (t *TileDefStyle) GetFillMaxOk() (string, bool) {
func (t *TileDefStyle) GetFillMaxOk() (json.Number, bool) {
if t == nil || t.FillMax == nil {
return "", false
}
Expand All @@ -8627,12 +8627,12 @@ func (t *TileDefStyle) HasFillMax() bool {
}

// SetFillMax allocates a new t.FillMax and returns the pointer to it.
func (t *TileDefStyle) SetFillMax(v string) {
func (t *TileDefStyle) SetFillMax(v json.Number) {
t.FillMax = &v
}

// GetFillMin returns the FillMin field if non-nil, zero value otherwise.
func (t *TileDefStyle) GetFillMin() string {
func (t *TileDefStyle) GetFillMin() json.Number {
if t == nil || t.FillMin == nil {
return ""
}
Expand All @@ -8641,7 +8641,7 @@ func (t *TileDefStyle) GetFillMin() string {

// GetFillMinOk returns a tuple with the FillMin field if it's non-nil, zero value otherwise
// and a boolean to check if the value has been set.
func (t *TileDefStyle) GetFillMinOk() (string, bool) {
func (t *TileDefStyle) GetFillMinOk() (json.Number, bool) {
if t == nil || t.FillMin == nil {
return "", false
}
Expand All @@ -8658,7 +8658,7 @@ func (t *TileDefStyle) HasFillMin() bool {
}

// SetFillMin allocates a new t.FillMin and returns the pointer to it.
func (t *TileDefStyle) SetFillMin(v string) {
func (t *TileDefStyle) SetFillMin(v json.Number) {
t.FillMin = &v
}

Expand Down
4 changes: 2 additions & 2 deletions integration/screen_widgets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ func TestWidgets(t *testing.T) {
Style: &datadog.TileDefStyle{
Palette: datadog.String("hostmap_blues"),
PaletteFlip: datadog.String("true"),
FillMin: datadog.String("20"),
FillMax: datadog.String("300"),
FillMin: datadog.JsonNumber("20"),
FillMax: datadog.JsonNumber("300"),
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions screen_widgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ type TileDefRequestStyle struct {
}

type TileDefStyle struct {
Palette *string `json:"palette,omitempty"`
PaletteFlip *string `json:"paletteFlip,omitempty"`
FillMin *string `json:"fillMin,omitempty"`
FillMax *string `json:"fillMax,omitempty"`
Palette *string `json:"palette,omitempty"`
PaletteFlip *string `json:"paletteFlip,omitempty"`
FillMin *json.Number `json:"fillMin,omitempty"`
FillMax *json.Number `json:"fillMax,omitempty"`
}

type Time struct {
Expand Down

0 comments on commit 66f4fd4

Please sign in to comment.