Skip to content

Commit

Permalink
Update interval type from int to string in screenboards from legacy api
Browse files Browse the repository at this point in the history
  • Loading branch information
jbenais committed Aug 8, 2019
1 parent 93f907f commit fa2cce3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions datadog-accessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -17685,18 +17685,18 @@ func (t *TileDefApmOrLogQueryCompute) SetFacet(v string) {
}

// GetInterval returns the Interval field if non-nil, zero value otherwise.
func (t *TileDefApmOrLogQueryCompute) GetInterval() int {
func (t *TileDefApmOrLogQueryCompute) GetInterval() string {
if t == nil || t.Interval == nil {
return 0
return ""
}
return *t.Interval
}

// GetIntervalOk returns a tuple with the Interval field if it's non-nil, zero value otherwise
// and a boolean to check if the value has been set.
func (t *TileDefApmOrLogQueryCompute) GetIntervalOk() (int, bool) {
func (t *TileDefApmOrLogQueryCompute) GetIntervalOk() (string, bool) {
if t == nil || t.Interval == nil {
return 0, false
return "", false
}
return *t.Interval, true
}
Expand All @@ -17711,7 +17711,7 @@ func (t *TileDefApmOrLogQueryCompute) HasInterval() bool {
}

// SetInterval allocates a new t.Interval and returns the pointer to it.
func (t *TileDefApmOrLogQueryCompute) SetInterval(v int) {
func (t *TileDefApmOrLogQueryCompute) SetInterval(v string) {
t.Interval = &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 @@ -86,7 +86,7 @@ func TestWidgets(t *testing.T) {
Compute: &datadog.TileDefApmOrLogQueryCompute{
Aggregation: datadog.String("count"),
Facet: datadog.String("host"),
Interval: datadog.Int(300000),
Interval: datadog.String("300000"),
},
Search: &datadog.TileDefApmOrLogQuerySearch{},
GroupBy: []datadog.TileDefApmOrLogQueryGroupBy{{
Expand Down Expand Up @@ -139,7 +139,7 @@ func TestWidgets(t *testing.T) {
Compute: &datadog.TileDefApmOrLogQueryCompute{
Aggregation: datadog.String("count"),
Facet: datadog.String("host"),
Interval: datadog.Int(300000),
Interval: datadog.String("300000"),
},
Search: &datadog.TileDefApmOrLogQuerySearch{},
GroupBy: []datadog.TileDefApmOrLogQueryGroupBy{{}},
Expand Down
2 changes: 1 addition & 1 deletion screen_widgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ type TileDefApmOrLogQuery struct {
type TileDefApmOrLogQueryCompute struct {
Aggregation *string `json:"aggregation"`
Facet *string `json:"facet,omitempty"`
Interval *int `json:"interval,omitempty"`
Interval *string `json:"interval,omitempty"`
}
type TileDefApmOrLogQuerySearch struct {
Query *string `json:"query"`
Expand Down

0 comments on commit fa2cce3

Please sign in to comment.