@@ -19,6 +19,10 @@ type TreeMapWidgetRequest struct {
1919 Queries []FormulaAndFunctionQueryDefinition `json:"queries,omitempty"`
2020 // Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets.
2121 ResponseFormat * FormulaAndFunctionResponseFormat `json:"response_format,omitempty"`
22+ // The controls for sorting the widget.
23+ Sort * WidgetSortBy `json:"sort,omitempty"`
24+ // Define request widget style.
25+ Style * WidgetRequestStyle `json:"style,omitempty"`
2226 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2327 UnparsedObject map [string ]interface {} `json:"-"`
2428 AdditionalProperties map [string ]interface {} `json:"-"`
@@ -156,6 +160,62 @@ func (o *TreeMapWidgetRequest) SetResponseFormat(v FormulaAndFunctionResponseFor
156160 o .ResponseFormat = & v
157161}
158162
163+ // GetSort returns the Sort field value if set, zero value otherwise.
164+ func (o * TreeMapWidgetRequest ) GetSort () WidgetSortBy {
165+ if o == nil || o .Sort == nil {
166+ var ret WidgetSortBy
167+ return ret
168+ }
169+ return * o .Sort
170+ }
171+
172+ // GetSortOk returns a tuple with the Sort field value if set, nil otherwise
173+ // and a boolean to check if the value has been set.
174+ func (o * TreeMapWidgetRequest ) GetSortOk () (* WidgetSortBy , bool ) {
175+ if o == nil || o .Sort == nil {
176+ return nil , false
177+ }
178+ return o .Sort , true
179+ }
180+
181+ // HasSort returns a boolean if a field has been set.
182+ func (o * TreeMapWidgetRequest ) HasSort () bool {
183+ return o != nil && o .Sort != nil
184+ }
185+
186+ // SetSort gets a reference to the given WidgetSortBy and assigns it to the Sort field.
187+ func (o * TreeMapWidgetRequest ) SetSort (v WidgetSortBy ) {
188+ o .Sort = & v
189+ }
190+
191+ // GetStyle returns the Style field value if set, zero value otherwise.
192+ func (o * TreeMapWidgetRequest ) GetStyle () WidgetRequestStyle {
193+ if o == nil || o .Style == nil {
194+ var ret WidgetRequestStyle
195+ return ret
196+ }
197+ return * o .Style
198+ }
199+
200+ // GetStyleOk returns a tuple with the Style field value if set, nil otherwise
201+ // and a boolean to check if the value has been set.
202+ func (o * TreeMapWidgetRequest ) GetStyleOk () (* WidgetRequestStyle , bool ) {
203+ if o == nil || o .Style == nil {
204+ return nil , false
205+ }
206+ return o .Style , true
207+ }
208+
209+ // HasStyle returns a boolean if a field has been set.
210+ func (o * TreeMapWidgetRequest ) HasStyle () bool {
211+ return o != nil && o .Style != nil
212+ }
213+
214+ // SetStyle gets a reference to the given WidgetRequestStyle and assigns it to the Style field.
215+ func (o * TreeMapWidgetRequest ) SetStyle (v WidgetRequestStyle ) {
216+ o .Style = & v
217+ }
218+
159219// MarshalJSON serializes the struct using spec logic.
160220func (o TreeMapWidgetRequest ) MarshalJSON () ([]byte , error ) {
161221 toSerialize := map [string ]interface {}{}
@@ -174,6 +234,12 @@ func (o TreeMapWidgetRequest) MarshalJSON() ([]byte, error) {
174234 if o .ResponseFormat != nil {
175235 toSerialize ["response_format" ] = o .ResponseFormat
176236 }
237+ if o .Sort != nil {
238+ toSerialize ["sort" ] = o .Sort
239+ }
240+ if o .Style != nil {
241+ toSerialize ["style" ] = o .Style
242+ }
177243
178244 for key , value := range o .AdditionalProperties {
179245 toSerialize [key ] = value
@@ -188,13 +254,15 @@ func (o *TreeMapWidgetRequest) UnmarshalJSON(bytes []byte) (err error) {
188254 Q * string `json:"q,omitempty"`
189255 Queries []FormulaAndFunctionQueryDefinition `json:"queries,omitempty"`
190256 ResponseFormat * FormulaAndFunctionResponseFormat `json:"response_format,omitempty"`
257+ Sort * WidgetSortBy `json:"sort,omitempty"`
258+ Style * WidgetRequestStyle `json:"style,omitempty"`
191259 }{}
192260 if err = datadog .Unmarshal (bytes , & all ); err != nil {
193261 return datadog .Unmarshal (bytes , & o .UnparsedObject )
194262 }
195263 additionalProperties := make (map [string ]interface {})
196264 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
197- datadog .DeleteKeys (additionalProperties , & []string {"formulas" , "q" , "queries" , "response_format" })
265+ datadog .DeleteKeys (additionalProperties , & []string {"formulas" , "q" , "queries" , "response_format" , "sort" , "style" })
198266 } else {
199267 return err
200268 }
@@ -208,6 +276,14 @@ func (o *TreeMapWidgetRequest) UnmarshalJSON(bytes []byte) (err error) {
208276 } else {
209277 o .ResponseFormat = all .ResponseFormat
210278 }
279+ if all .Sort != nil && all .Sort .UnparsedObject != nil && o .UnparsedObject == nil {
280+ hasInvalidField = true
281+ }
282+ o .Sort = all .Sort
283+ if all .Style != nil && all .Style .UnparsedObject != nil && o .UnparsedObject == nil {
284+ hasInvalidField = true
285+ }
286+ o .Style = all .Style
211287
212288 if len (additionalProperties ) > 0 {
213289 o .AdditionalProperties = additionalProperties
0 commit comments