Skip to content

Commit 66f4fd4

Browse files
authored
Merge pull request #202 from dabcoder/master
Fix screen widget FillMin and FillMax type matching
2 parents 1df5bda + 7a0edc5 commit 66f4fd4

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

datadog-accessors.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Please see the included LICENSE file for licensing information.
66
*
7-
* Copyright 2018 by authors and contributors.
7+
* Copyright 2019 by authors and contributors.
88
*/
99

1010
package datadog
@@ -8601,7 +8601,7 @@ func (t *TileDefRequestStyle) SetWidth(v string) {
86018601
}
86028602

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

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

86298629
// SetFillMax allocates a new t.FillMax and returns the pointer to it.
8630-
func (t *TileDefStyle) SetFillMax(v string) {
8630+
func (t *TileDefStyle) SetFillMax(v json.Number) {
86318631
t.FillMax = &v
86328632
}
86338633

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

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

86608660
// SetFillMin allocates a new t.FillMin and returns the pointer to it.
8661-
func (t *TileDefStyle) SetFillMin(v string) {
8661+
func (t *TileDefStyle) SetFillMin(v json.Number) {
86628662
t.FillMin = &v
86638663
}
86648664

integration/screen_widgets_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ func TestWidgets(t *testing.T) {
312312
Style: &datadog.TileDefStyle{
313313
Palette: datadog.String("hostmap_blues"),
314314
PaletteFlip: datadog.String("true"),
315-
FillMin: datadog.String("20"),
316-
FillMax: datadog.String("300"),
315+
FillMin: datadog.JsonNumber("20"),
316+
FillMax: datadog.JsonNumber("300"),
317317
},
318318
},
319319
},

screen_widgets.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ type TileDefRequestStyle struct {
9696
}
9797

9898
type TileDefStyle struct {
99-
Palette *string `json:"palette,omitempty"`
100-
PaletteFlip *string `json:"paletteFlip,omitempty"`
101-
FillMin *string `json:"fillMin,omitempty"`
102-
FillMax *string `json:"fillMax,omitempty"`
99+
Palette *string `json:"palette,omitempty"`
100+
PaletteFlip *string `json:"paletteFlip,omitempty"`
101+
FillMin *json.Number `json:"fillMin,omitempty"`
102+
FillMax *json.Number `json:"fillMax,omitempty"`
103103
}
104104

105105
type Time struct {

0 commit comments

Comments
 (0)