From 5c94a1a6e2ce503444c85bc3c24bd61c7ae86922 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 6 Feb 2026 20:41:23 +0000 Subject: [PATCH 1/2] Regenerate client from commit 97cfbb4 of spec repo --- .generator/schemas/v1/openapi.yaml | 19 +- .../model_timeseries_request_style.go | 262 ++++++++++++++++++ .../model_timeseries_widget_request.go | 16 +- .../dashboards/CreateDashboard_1259346254.go | 2 +- .../dashboards/CreateDashboard_1284514532.go | 2 +- .../dashboards/CreateDashboard_1307120899.go | 2 +- .../dashboards/CreateDashboard_1433408735.go | 2 +- .../dashboards/CreateDashboard_2261785072.go | 2 +- .../dashboards/CreateDashboard_2278756614.go | 2 +- .../dashboards/CreateDashboard_2800096921.go | 2 +- .../dashboards/CreateDashboard_3066042014.go | 2 +- .../dashboards/CreateDashboard_3451918078.go | 2 +- .../dashboards/CreateDashboard_3631423980.go | 2 +- .../dashboards/CreateDashboard_3982498788.go | 2 +- .../v1/dashboards/CreateDashboard_41622531.go | 2 +- .../dashboards/CreateDashboard_416487533.go | 2 +- .../dashboards/CreateDashboard_4262729673.go | 2 +- .../dashboards/CreateDashboard_607525069.go | 2 +- .../dashboards/CreateDashboard_985012506.go | 2 +- examples/v1/notebooks/CreateNotebook.go | 2 +- examples/v1/notebooks/UpdateNotebook.go | 2 +- 21 files changed, 306 insertions(+), 27 deletions(-) create mode 100644 api/datadogV1/model_timeseries_request_style.go diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index a38d274f9b8..aa8e993704a 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -19247,6 +19247,23 @@ components: x-enum-varnames: - BARS - AREA + TimeseriesRequestStyle: + description: Define request widget style for timeseries widgets. + properties: + has_value_labels: + description: If true, the value is displayed as a label relative to the + data point. + type: boolean + line_type: + $ref: '#/components/schemas/WidgetLineType' + line_width: + $ref: '#/components/schemas/WidgetLineWidth' + order_by: + $ref: '#/components/schemas/WidgetStyleOrderBy' + palette: + description: Color palette to apply to the widget. + type: string + type: object TimeseriesWidgetDefinition: description: The timeseries visualization allows you to display the evolution of one or more metrics, log events, or Indexed Spans over time. @@ -19401,7 +19418,7 @@ components: security_query: $ref: '#/components/schemas/LogQueryDefinition' style: - $ref: '#/components/schemas/WidgetRequestStyle' + $ref: '#/components/schemas/TimeseriesRequestStyle' type: object ToplistWidgetDefinition: description: The top list visualization enables you to display a list of Tag diff --git a/api/datadogV1/model_timeseries_request_style.go b/api/datadogV1/model_timeseries_request_style.go new file mode 100644 index 00000000000..a5c0054a849 --- /dev/null +++ b/api/datadogV1/model_timeseries_request_style.go @@ -0,0 +1,262 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// TimeseriesRequestStyle Define request widget style for timeseries widgets. +type TimeseriesRequestStyle struct { + // If true, the value is displayed as a label relative to the data point. + HasValueLabels *bool `json:"has_value_labels,omitempty"` + // Type of lines displayed. + LineType *WidgetLineType `json:"line_type,omitempty"` + // Width of line displayed. + LineWidth *WidgetLineWidth `json:"line_width,omitempty"` + // How to order series in timeseries visualizations. + // - `tags`: Order series alphabetically by tag name (default behavior) + // - `values`: Order series by their current metric values (typically descending) + OrderBy *WidgetStyleOrderBy `json:"order_by,omitempty"` + // Color palette to apply to the widget. + Palette *string `json:"palette,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewTimeseriesRequestStyle instantiates a new TimeseriesRequestStyle object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewTimeseriesRequestStyle() *TimeseriesRequestStyle { + this := TimeseriesRequestStyle{} + return &this +} + +// NewTimeseriesRequestStyleWithDefaults instantiates a new TimeseriesRequestStyle object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewTimeseriesRequestStyleWithDefaults() *TimeseriesRequestStyle { + this := TimeseriesRequestStyle{} + return &this +} + +// GetHasValueLabels returns the HasValueLabels field value if set, zero value otherwise. +func (o *TimeseriesRequestStyle) GetHasValueLabels() bool { + if o == nil || o.HasValueLabels == nil { + var ret bool + return ret + } + return *o.HasValueLabels +} + +// GetHasValueLabelsOk returns a tuple with the HasValueLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TimeseriesRequestStyle) GetHasValueLabelsOk() (*bool, bool) { + if o == nil || o.HasValueLabels == nil { + return nil, false + } + return o.HasValueLabels, true +} + +// HasHasValueLabels returns a boolean if a field has been set. +func (o *TimeseriesRequestStyle) HasHasValueLabels() bool { + return o != nil && o.HasValueLabels != nil +} + +// SetHasValueLabels gets a reference to the given bool and assigns it to the HasValueLabels field. +func (o *TimeseriesRequestStyle) SetHasValueLabels(v bool) { + o.HasValueLabels = &v +} + +// GetLineType returns the LineType field value if set, zero value otherwise. +func (o *TimeseriesRequestStyle) GetLineType() WidgetLineType { + if o == nil || o.LineType == nil { + var ret WidgetLineType + return ret + } + return *o.LineType +} + +// GetLineTypeOk returns a tuple with the LineType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TimeseriesRequestStyle) GetLineTypeOk() (*WidgetLineType, bool) { + if o == nil || o.LineType == nil { + return nil, false + } + return o.LineType, true +} + +// HasLineType returns a boolean if a field has been set. +func (o *TimeseriesRequestStyle) HasLineType() bool { + return o != nil && o.LineType != nil +} + +// SetLineType gets a reference to the given WidgetLineType and assigns it to the LineType field. +func (o *TimeseriesRequestStyle) SetLineType(v WidgetLineType) { + o.LineType = &v +} + +// GetLineWidth returns the LineWidth field value if set, zero value otherwise. +func (o *TimeseriesRequestStyle) GetLineWidth() WidgetLineWidth { + if o == nil || o.LineWidth == nil { + var ret WidgetLineWidth + return ret + } + return *o.LineWidth +} + +// GetLineWidthOk returns a tuple with the LineWidth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TimeseriesRequestStyle) GetLineWidthOk() (*WidgetLineWidth, bool) { + if o == nil || o.LineWidth == nil { + return nil, false + } + return o.LineWidth, true +} + +// HasLineWidth returns a boolean if a field has been set. +func (o *TimeseriesRequestStyle) HasLineWidth() bool { + return o != nil && o.LineWidth != nil +} + +// SetLineWidth gets a reference to the given WidgetLineWidth and assigns it to the LineWidth field. +func (o *TimeseriesRequestStyle) SetLineWidth(v WidgetLineWidth) { + o.LineWidth = &v +} + +// GetOrderBy returns the OrderBy field value if set, zero value otherwise. +func (o *TimeseriesRequestStyle) GetOrderBy() WidgetStyleOrderBy { + if o == nil || o.OrderBy == nil { + var ret WidgetStyleOrderBy + return ret + } + return *o.OrderBy +} + +// GetOrderByOk returns a tuple with the OrderBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TimeseriesRequestStyle) GetOrderByOk() (*WidgetStyleOrderBy, bool) { + if o == nil || o.OrderBy == nil { + return nil, false + } + return o.OrderBy, true +} + +// HasOrderBy returns a boolean if a field has been set. +func (o *TimeseriesRequestStyle) HasOrderBy() bool { + return o != nil && o.OrderBy != nil +} + +// SetOrderBy gets a reference to the given WidgetStyleOrderBy and assigns it to the OrderBy field. +func (o *TimeseriesRequestStyle) SetOrderBy(v WidgetStyleOrderBy) { + o.OrderBy = &v +} + +// GetPalette returns the Palette field value if set, zero value otherwise. +func (o *TimeseriesRequestStyle) GetPalette() string { + if o == nil || o.Palette == nil { + var ret string + return ret + } + return *o.Palette +} + +// GetPaletteOk returns a tuple with the Palette field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TimeseriesRequestStyle) GetPaletteOk() (*string, bool) { + if o == nil || o.Palette == nil { + return nil, false + } + return o.Palette, true +} + +// HasPalette returns a boolean if a field has been set. +func (o *TimeseriesRequestStyle) HasPalette() bool { + return o != nil && o.Palette != nil +} + +// SetPalette gets a reference to the given string and assigns it to the Palette field. +func (o *TimeseriesRequestStyle) SetPalette(v string) { + o.Palette = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o TimeseriesRequestStyle) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.HasValueLabels != nil { + toSerialize["has_value_labels"] = o.HasValueLabels + } + if o.LineType != nil { + toSerialize["line_type"] = o.LineType + } + if o.LineWidth != nil { + toSerialize["line_width"] = o.LineWidth + } + if o.OrderBy != nil { + toSerialize["order_by"] = o.OrderBy + } + if o.Palette != nil { + toSerialize["palette"] = o.Palette + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *TimeseriesRequestStyle) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + HasValueLabels *bool `json:"has_value_labels,omitempty"` + LineType *WidgetLineType `json:"line_type,omitempty"` + LineWidth *WidgetLineWidth `json:"line_width,omitempty"` + OrderBy *WidgetStyleOrderBy `json:"order_by,omitempty"` + Palette *string `json:"palette,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"has_value_labels", "line_type", "line_width", "order_by", "palette"}) + } else { + return err + } + + hasInvalidField := false + o.HasValueLabels = all.HasValueLabels + if all.LineType != nil && !all.LineType.IsValid() { + hasInvalidField = true + } else { + o.LineType = all.LineType + } + if all.LineWidth != nil && !all.LineWidth.IsValid() { + hasInvalidField = true + } else { + o.LineWidth = all.LineWidth + } + if all.OrderBy != nil && !all.OrderBy.IsValid() { + hasInvalidField = true + } else { + o.OrderBy = all.OrderBy + } + o.Palette = all.Palette + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_timeseries_widget_request.go b/api/datadogV1/model_timeseries_widget_request.go index ba2fc190ccd..cc3388fb3b7 100644 --- a/api/datadogV1/model_timeseries_widget_request.go +++ b/api/datadogV1/model_timeseries_widget_request.go @@ -42,8 +42,8 @@ type TimeseriesWidgetRequest struct { RumQuery *LogQueryDefinition `json:"rum_query,omitempty"` // The log query. SecurityQuery *LogQueryDefinition `json:"security_query,omitempty"` - // Define request widget style. - Style *WidgetRequestStyle `json:"style,omitempty"` + // Define request widget style for timeseries widgets. + Style *TimeseriesRequestStyle `json:"style,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} `json:"-"` @@ -515,9 +515,9 @@ func (o *TimeseriesWidgetRequest) SetSecurityQuery(v LogQueryDefinition) { } // GetStyle returns the Style field value if set, zero value otherwise. -func (o *TimeseriesWidgetRequest) GetStyle() WidgetRequestStyle { +func (o *TimeseriesWidgetRequest) GetStyle() TimeseriesRequestStyle { if o == nil || o.Style == nil { - var ret WidgetRequestStyle + var ret TimeseriesRequestStyle return ret } return *o.Style @@ -525,7 +525,7 @@ func (o *TimeseriesWidgetRequest) GetStyle() WidgetRequestStyle { // GetStyleOk returns a tuple with the Style field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TimeseriesWidgetRequest) GetStyleOk() (*WidgetRequestStyle, bool) { +func (o *TimeseriesWidgetRequest) GetStyleOk() (*TimeseriesRequestStyle, bool) { if o == nil || o.Style == nil { return nil, false } @@ -537,8 +537,8 @@ func (o *TimeseriesWidgetRequest) HasStyle() bool { return o != nil && o.Style != nil } -// SetStyle gets a reference to the given WidgetRequestStyle and assigns it to the Style field. -func (o *TimeseriesWidgetRequest) SetStyle(v WidgetRequestStyle) { +// SetStyle gets a reference to the given TimeseriesRequestStyle and assigns it to the Style field. +func (o *TimeseriesWidgetRequest) SetStyle(v TimeseriesRequestStyle) { o.Style = &v } @@ -625,7 +625,7 @@ func (o *TimeseriesWidgetRequest) UnmarshalJSON(bytes []byte) (err error) { ResponseFormat *FormulaAndFunctionResponseFormat `json:"response_format,omitempty"` RumQuery *LogQueryDefinition `json:"rum_query,omitempty"` SecurityQuery *LogQueryDefinition `json:"security_query,omitempty"` - Style *WidgetRequestStyle `json:"style,omitempty"` + Style *TimeseriesRequestStyle `json:"style,omitempty"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) diff --git a/examples/v1/dashboards/CreateDashboard_1259346254.go b/examples/v1/dashboards/CreateDashboard_1259346254.go index 30b5ef91d42..598a8ff03df 100644 --- a/examples/v1/dashboards/CreateDashboard_1259346254.go +++ b/examples/v1/dashboards/CreateDashboard_1259346254.go @@ -24,7 +24,7 @@ func main() { Requests: []datadogV1.TimeseriesWidgetRequest{ { Q: datadog.PtrString("avg:system.cpu.user{*} by {host}"), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("warm"), OrderBy: datadogV1.WIDGETSTYLEORDERBY_VALUES.Ptr(), }, diff --git a/examples/v1/dashboards/CreateDashboard_1284514532.go b/examples/v1/dashboards/CreateDashboard_1284514532.go index 53825bc1aae..104828cec60 100644 --- a/examples/v1/dashboards/CreateDashboard_1284514532.go +++ b/examples/v1/dashboards/CreateDashboard_1284514532.go @@ -39,7 +39,7 @@ func main() { }}, }, ResponseFormat: datadogV1.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_1307120899.go b/examples/v1/dashboards/CreateDashboard_1307120899.go index 3b298347bb5..f2dfacdfefb 100644 --- a/examples/v1/dashboards/CreateDashboard_1307120899.go +++ b/examples/v1/dashboards/CreateDashboard_1307120899.go @@ -57,7 +57,7 @@ func main() { }}, }, ResponseFormat: datadogV1.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_1433408735.go b/examples/v1/dashboards/CreateDashboard_1433408735.go index c98d24912a2..edd0d6a6123 100644 --- a/examples/v1/dashboards/CreateDashboard_1433408735.go +++ b/examples/v1/dashboards/CreateDashboard_1433408735.go @@ -39,7 +39,7 @@ func main() { }}, }, ResponseFormat: datadogV1.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_2261785072.go b/examples/v1/dashboards/CreateDashboard_2261785072.go index 2f2a2230fe2..3137040bf78 100644 --- a/examples/v1/dashboards/CreateDashboard_2261785072.go +++ b/examples/v1/dashboards/CreateDashboard_2261785072.go @@ -45,7 +45,7 @@ func main() { Query: "avg:system.cpu.user{*}", }}, }, - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("purple"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_2278756614.go b/examples/v1/dashboards/CreateDashboard_2278756614.go index 594b41ad51f..45400a8a50e 100644 --- a/examples/v1/dashboards/CreateDashboard_2278756614.go +++ b/examples/v1/dashboards/CreateDashboard_2278756614.go @@ -45,7 +45,7 @@ func main() { Query: "avg:system.cpu.user{*}", }}, }, - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_2800096921.go b/examples/v1/dashboards/CreateDashboard_2800096921.go index 5f346de9868..153f6b07e6c 100644 --- a/examples/v1/dashboards/CreateDashboard_2800096921.go +++ b/examples/v1/dashboards/CreateDashboard_2800096921.go @@ -58,7 +58,7 @@ func main() { }}, }, ResponseFormat: datadogV1.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_3066042014.go b/examples/v1/dashboards/CreateDashboard_3066042014.go index 8b0daa80146..7a622bd0f9a 100644 --- a/examples/v1/dashboards/CreateDashboard_3066042014.go +++ b/examples/v1/dashboards/CreateDashboard_3066042014.go @@ -63,7 +63,7 @@ func main() { }}, }, ResponseFormat: datadogV1.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_3451918078.go b/examples/v1/dashboards/CreateDashboard_3451918078.go index ccd7db7ee90..a535e49c89e 100644 --- a/examples/v1/dashboards/CreateDashboard_3451918078.go +++ b/examples/v1/dashboards/CreateDashboard_3451918078.go @@ -63,7 +63,7 @@ func main() { }}, }, ResponseFormat: datadogV1.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_3631423980.go b/examples/v1/dashboards/CreateDashboard_3631423980.go index 5e401d8834b..6fdac729f75 100644 --- a/examples/v1/dashboards/CreateDashboard_3631423980.go +++ b/examples/v1/dashboards/CreateDashboard_3631423980.go @@ -24,7 +24,7 @@ func main() { Requests: []datadogV1.TimeseriesWidgetRequest{ { Q: datadog.PtrString("avg:system.cpu.user{*} by {host}"), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_3982498788.go b/examples/v1/dashboards/CreateDashboard_3982498788.go index c4e71cbcf92..f154941905f 100644 --- a/examples/v1/dashboards/CreateDashboard_3982498788.go +++ b/examples/v1/dashboards/CreateDashboard_3982498788.go @@ -25,7 +25,7 @@ func main() { { Q: datadog.PtrString("sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()"), OnRightYaxis: datadog.PtrBool(false), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("warm"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_41622531.go b/examples/v1/dashboards/CreateDashboard_41622531.go index 6eda8655a44..8acc34be0ba 100644 --- a/examples/v1/dashboards/CreateDashboard_41622531.go +++ b/examples/v1/dashboards/CreateDashboard_41622531.go @@ -52,7 +52,7 @@ func main() { }}, }, ResponseFormat: datadogV1.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_416487533.go b/examples/v1/dashboards/CreateDashboard_416487533.go index a07c922eeed..7559b2a70e0 100644 --- a/examples/v1/dashboards/CreateDashboard_416487533.go +++ b/examples/v1/dashboards/CreateDashboard_416487533.go @@ -24,7 +24,7 @@ func main() { Requests: []datadogV1.TimeseriesWidgetRequest{ { Q: datadog.PtrString("avg:system.cpu.user{*} by {host}"), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), OrderBy: datadogV1.WIDGETSTYLEORDERBY_TAGS.Ptr(), }, diff --git a/examples/v1/dashboards/CreateDashboard_4262729673.go b/examples/v1/dashboards/CreateDashboard_4262729673.go index 0af66fae503..86011bf635d 100644 --- a/examples/v1/dashboards/CreateDashboard_4262729673.go +++ b/examples/v1/dashboards/CreateDashboard_4262729673.go @@ -61,7 +61,7 @@ func main() { }}, }, ResponseFormat: datadogV1.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_607525069.go b/examples/v1/dashboards/CreateDashboard_607525069.go index cf47f0772ce..ee5e2b2704e 100644 --- a/examples/v1/dashboards/CreateDashboard_607525069.go +++ b/examples/v1/dashboards/CreateDashboard_607525069.go @@ -57,7 +57,7 @@ func main() { }}, }, ResponseFormat: datadogV1.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/dashboards/CreateDashboard_985012506.go b/examples/v1/dashboards/CreateDashboard_985012506.go index c9de2a6e94a..43fe86b83f9 100644 --- a/examples/v1/dashboards/CreateDashboard_985012506.go +++ b/examples/v1/dashboards/CreateDashboard_985012506.go @@ -57,7 +57,7 @@ func main() { }}, }, ResponseFormat: datadogV1.FORMULAANDFUNCTIONRESPONSEFORMAT_TIMESERIES.Ptr(), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), diff --git a/examples/v1/notebooks/CreateNotebook.go b/examples/v1/notebooks/CreateNotebook.go index e5c44d45422..9aa0a5d7fc8 100644 --- a/examples/v1/notebooks/CreateNotebook.go +++ b/examples/v1/notebooks/CreateNotebook.go @@ -41,7 +41,7 @@ y = 6; { DisplayType: datadogV1.WIDGETDISPLAYTYPE_LINE.Ptr(), Q: datadog.PtrString("avg:system.load.1{*}"), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), Palette: datadog.PtrString("dog_classic"), diff --git a/examples/v1/notebooks/UpdateNotebook.go b/examples/v1/notebooks/UpdateNotebook.go index 9f042d0ae7e..0b956379e99 100644 --- a/examples/v1/notebooks/UpdateNotebook.go +++ b/examples/v1/notebooks/UpdateNotebook.go @@ -47,7 +47,7 @@ y = 6; { DisplayType: datadogV1.WIDGETDISPLAYTYPE_LINE.Ptr(), Q: datadog.PtrString("avg:system.load.1{*}"), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ LineType: datadogV1.WIDGETLINETYPE_SOLID.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_NORMAL.Ptr(), Palette: datadog.PtrString("dog_classic"), From 20e76d18e01b652faa28b8ff3ad736b1ad9878a4 Mon Sep 17 00:00:00 2001 From: Becca Jellinek Date: Fri, 6 Feb 2026 17:08:29 -0500 Subject: [PATCH 2/2] Fix test: use TimeseriesRequestStyle instead of WidgetRequestStyle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update DashboardsApiTest to use the new TimeseriesRequestStyle type for timeseries widget requests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tests/api/datadogV1/api_dashboards_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/api/datadogV1/api_dashboards_test.go b/tests/api/datadogV1/api_dashboards_test.go index 45787d00950..a02b1578dae 100644 --- a/tests/api/datadogV1/api_dashboards_test.go +++ b/tests/api/datadogV1/api_dashboards_test.go @@ -632,7 +632,7 @@ func TestDashboardLifecycle(t *testing.T) { timeseriesWidgetDefinition := datadogV1.NewTimeseriesWidgetDefinitionWithDefaults() timeseriesWidgetDefinition.SetRequests([]datadogV1.TimeseriesWidgetRequest{{ Q: datadog.PtrString("avg:system.load.1{*}"), - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_DASHED.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_THICK.Ptr(), @@ -688,7 +688,7 @@ func TestDashboardLifecycle(t *testing.T) { Limit: datadog.PtrInt64(10), SearchBy: datadog.PtrString("editor"), }, - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_DASHED.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_THICK.Ptr(), @@ -751,7 +751,7 @@ func TestDashboardLifecycle(t *testing.T) { }, }}, }, - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_DASHED.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_THICK.Ptr(), @@ -806,7 +806,7 @@ func TestDashboardLifecycle(t *testing.T) { }, }}, }, - Style: &datadogV1.WidgetRequestStyle{ + Style: &datadogV1.TimeseriesRequestStyle{ Palette: datadog.PtrString("dog_classic"), LineType: datadogV1.WIDGETLINETYPE_DASHED.Ptr(), LineWidth: datadogV1.WIDGETLINEWIDTH_THICK.Ptr()},