Skip to content

Commit 6afef29

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3211ca1b of spec repo
1 parent 413fb07 commit 6afef29

File tree

5 files changed

+81
-30
lines changed

5 files changed

+81
-30
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-06-26 17:56:23.043504",
8-
"spec_repo_commit": "76086f13"
7+
"regenerated": "2025-06-26 21:05:36.324607",
8+
"spec_repo_commit": "3211ca1b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-26 17:56:23.062756",
13-
"spec_repo_commit": "76086f13"
12+
"regenerated": "2025-06-26 21:05:36.345627",
13+
"spec_repo_commit": "3211ca1b"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3439,13 +3439,28 @@ components:
34393439
example:
34403440
focus: WORLD
34413441
properties:
3442+
custom_extent:
3443+
description: A custom extent of the map defined by an array of four numbers
3444+
in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`.
3445+
Mutually exclusive with `focus`.
3446+
example:
3447+
- -30
3448+
- -40
3449+
- 40
3450+
- 30
3451+
items:
3452+
description: The longitudinal or latitudinal coordinates of the bounding
3453+
box.
3454+
format: double
3455+
type: number
3456+
maxItems: 4
3457+
minItems: 4
3458+
type: array
34423459
focus:
34433460
description: The 2-letter ISO code of a country to focus the map on. Or
3444-
`WORLD`.
3461+
`WORLD`. Mutually exclusive with `custom_extent`.
34453462
example: WORLD
34463463
type: string
3447-
required:
3448-
- focus
34493464
type: object
34503465
GeomapWidgetRequest:
34513466
description: An updated geomap widget.

api/datadogV1/model_geomap_widget_definition_view.go

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
package datadogV1
66

77
import (
8-
"fmt"
9-
108
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
119
)
1210

1311
// GeomapWidgetDefinitionView The view of the world that the map should render.
1412
type GeomapWidgetDefinitionView struct {
15-
// The 2-letter ISO code of a country to focus the map on. Or `WORLD`.
16-
Focus string `json:"focus"`
13+
// A custom extent of the map defined by an array of four numbers in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`. Mutually exclusive with `focus`.
14+
CustomExtent []float64 `json:"custom_extent,omitempty"`
15+
// The 2-letter ISO code of a country to focus the map on. Or `WORLD`. Mutually exclusive with `custom_extent`.
16+
Focus *string `json:"focus,omitempty"`
1717
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1818
UnparsedObject map[string]interface{} `json:"-"`
1919
AdditionalProperties map[string]interface{} `json:"-"`
@@ -23,9 +23,8 @@ type GeomapWidgetDefinitionView struct {
2323
// This constructor will assign default values to properties that have it defined,
2424
// and makes sure properties required by API are set, but the set of arguments
2525
// will change when the set of required properties is changed.
26-
func NewGeomapWidgetDefinitionView(focus string) *GeomapWidgetDefinitionView {
26+
func NewGeomapWidgetDefinitionView() *GeomapWidgetDefinitionView {
2727
this := GeomapWidgetDefinitionView{}
28-
this.Focus = focus
2928
return &this
3029
}
3130

@@ -37,27 +36,60 @@ func NewGeomapWidgetDefinitionViewWithDefaults() *GeomapWidgetDefinitionView {
3736
return &this
3837
}
3938

40-
// GetFocus returns the Focus field value.
39+
// GetCustomExtent returns the CustomExtent field value if set, zero value otherwise.
40+
func (o *GeomapWidgetDefinitionView) GetCustomExtent() []float64 {
41+
if o == nil || o.CustomExtent == nil {
42+
var ret []float64
43+
return ret
44+
}
45+
return o.CustomExtent
46+
}
47+
48+
// GetCustomExtentOk returns a tuple with the CustomExtent field value if set, nil otherwise
49+
// and a boolean to check if the value has been set.
50+
func (o *GeomapWidgetDefinitionView) GetCustomExtentOk() (*[]float64, bool) {
51+
if o == nil || o.CustomExtent == nil {
52+
return nil, false
53+
}
54+
return &o.CustomExtent, true
55+
}
56+
57+
// HasCustomExtent returns a boolean if a field has been set.
58+
func (o *GeomapWidgetDefinitionView) HasCustomExtent() bool {
59+
return o != nil && o.CustomExtent != nil
60+
}
61+
62+
// SetCustomExtent gets a reference to the given []float64 and assigns it to the CustomExtent field.
63+
func (o *GeomapWidgetDefinitionView) SetCustomExtent(v []float64) {
64+
o.CustomExtent = v
65+
}
66+
67+
// GetFocus returns the Focus field value if set, zero value otherwise.
4168
func (o *GeomapWidgetDefinitionView) GetFocus() string {
42-
if o == nil {
69+
if o == nil || o.Focus == nil {
4370
var ret string
4471
return ret
4572
}
46-
return o.Focus
73+
return *o.Focus
4774
}
4875

49-
// GetFocusOk returns a tuple with the Focus field value
76+
// GetFocusOk returns a tuple with the Focus field value if set, nil otherwise
5077
// and a boolean to check if the value has been set.
5178
func (o *GeomapWidgetDefinitionView) GetFocusOk() (*string, bool) {
52-
if o == nil {
79+
if o == nil || o.Focus == nil {
5380
return nil, false
5481
}
55-
return &o.Focus, true
82+
return o.Focus, true
5683
}
5784

58-
// SetFocus sets field value.
85+
// HasFocus returns a boolean if a field has been set.
86+
func (o *GeomapWidgetDefinitionView) HasFocus() bool {
87+
return o != nil && o.Focus != nil
88+
}
89+
90+
// SetFocus gets a reference to the given string and assigns it to the Focus field.
5991
func (o *GeomapWidgetDefinitionView) SetFocus(v string) {
60-
o.Focus = v
92+
o.Focus = &v
6193
}
6294

6395
// MarshalJSON serializes the struct using spec logic.
@@ -66,7 +98,12 @@ func (o GeomapWidgetDefinitionView) MarshalJSON() ([]byte, error) {
6698
if o.UnparsedObject != nil {
6799
return datadog.Marshal(o.UnparsedObject)
68100
}
69-
toSerialize["focus"] = o.Focus
101+
if o.CustomExtent != nil {
102+
toSerialize["custom_extent"] = o.CustomExtent
103+
}
104+
if o.Focus != nil {
105+
toSerialize["focus"] = o.Focus
106+
}
70107

71108
for key, value := range o.AdditionalProperties {
72109
toSerialize[key] = value
@@ -77,21 +114,20 @@ func (o GeomapWidgetDefinitionView) MarshalJSON() ([]byte, error) {
77114
// UnmarshalJSON deserializes the given payload.
78115
func (o *GeomapWidgetDefinitionView) UnmarshalJSON(bytes []byte) (err error) {
79116
all := struct {
80-
Focus *string `json:"focus"`
117+
CustomExtent []float64 `json:"custom_extent,omitempty"`
118+
Focus *string `json:"focus,omitempty"`
81119
}{}
82120
if err = datadog.Unmarshal(bytes, &all); err != nil {
83121
return datadog.Unmarshal(bytes, &o.UnparsedObject)
84122
}
85-
if all.Focus == nil {
86-
return fmt.Errorf("required field focus missing")
87-
}
88123
additionalProperties := make(map[string]interface{})
89124
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
90-
datadog.DeleteKeys(additionalProperties, &[]string{"focus"})
125+
datadog.DeleteKeys(additionalProperties, &[]string{"custom_extent", "focus"})
91126
} else {
92127
return err
93128
}
94-
o.Focus = *all.Focus
129+
o.CustomExtent = all.CustomExtent
130+
o.Focus = all.Focus
95131

96132
if len(additionalProperties) > 0 {
97133
o.AdditionalProperties = additionalProperties

examples/v1/dashboards/CreateDashboard_3513586382.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func main() {
6565
PaletteFlip: false,
6666
},
6767
View: datadogV1.GeomapWidgetDefinitionView{
68-
Focus: "WORLD",
68+
Focus: datadog.PtrString("WORLD"),
6969
},
7070
}},
7171
Layout: &datadogV1.WidgetLayout{

examples/v1/dashboards/CreateDashboard_915214113.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func main() {
8484
PaletteFlip: false,
8585
},
8686
View: datadogV1.GeomapWidgetDefinitionView{
87-
Focus: "WORLD",
87+
Focus: datadog.PtrString("WORLD"),
8888
},
8989
}},
9090
},

0 commit comments

Comments
 (0)