@@ -12,6 +12,8 @@ import (
12
12
13
13
// GeomapWidgetDefinitionView The view of the world that the map should render.
14
14
type GeomapWidgetDefinitionView struct {
15
+ // A custom extent of the map defined by an array of four numbers in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`.
16
+ CustomExtent []float64 `json:"custom_extent,omitempty"`
15
17
// The 2-letter ISO code of a country to focus the map on. Or `WORLD`.
16
18
Focus string `json:"focus"`
17
19
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -37,6 +39,34 @@ func NewGeomapWidgetDefinitionViewWithDefaults() *GeomapWidgetDefinitionView {
37
39
return & this
38
40
}
39
41
42
+ // GetCustomExtent returns the CustomExtent field value if set, zero value otherwise.
43
+ func (o * GeomapWidgetDefinitionView ) GetCustomExtent () []float64 {
44
+ if o == nil || o .CustomExtent == nil {
45
+ var ret []float64
46
+ return ret
47
+ }
48
+ return o .CustomExtent
49
+ }
50
+
51
+ // GetCustomExtentOk returns a tuple with the CustomExtent field value if set, nil otherwise
52
+ // and a boolean to check if the value has been set.
53
+ func (o * GeomapWidgetDefinitionView ) GetCustomExtentOk () (* []float64 , bool ) {
54
+ if o == nil || o .CustomExtent == nil {
55
+ return nil , false
56
+ }
57
+ return & o .CustomExtent , true
58
+ }
59
+
60
+ // HasCustomExtent returns a boolean if a field has been set.
61
+ func (o * GeomapWidgetDefinitionView ) HasCustomExtent () bool {
62
+ return o != nil && o .CustomExtent != nil
63
+ }
64
+
65
+ // SetCustomExtent gets a reference to the given []float64 and assigns it to the CustomExtent field.
66
+ func (o * GeomapWidgetDefinitionView ) SetCustomExtent (v []float64 ) {
67
+ o .CustomExtent = v
68
+ }
69
+
40
70
// GetFocus returns the Focus field value.
41
71
func (o * GeomapWidgetDefinitionView ) GetFocus () string {
42
72
if o == nil {
@@ -66,6 +96,9 @@ func (o GeomapWidgetDefinitionView) MarshalJSON() ([]byte, error) {
66
96
if o .UnparsedObject != nil {
67
97
return datadog .Marshal (o .UnparsedObject )
68
98
}
99
+ if o .CustomExtent != nil {
100
+ toSerialize ["custom_extent" ] = o .CustomExtent
101
+ }
69
102
toSerialize ["focus" ] = o .Focus
70
103
71
104
for key , value := range o .AdditionalProperties {
@@ -77,7 +110,8 @@ func (o GeomapWidgetDefinitionView) MarshalJSON() ([]byte, error) {
77
110
// UnmarshalJSON deserializes the given payload.
78
111
func (o * GeomapWidgetDefinitionView ) UnmarshalJSON (bytes []byte ) (err error ) {
79
112
all := struct {
80
- Focus * string `json:"focus"`
113
+ CustomExtent []float64 `json:"custom_extent,omitempty"`
114
+ Focus * string `json:"focus"`
81
115
}{}
82
116
if err = datadog .Unmarshal (bytes , & all ); err != nil {
83
117
return datadog .Unmarshal (bytes , & o .UnparsedObject )
@@ -87,10 +121,11 @@ func (o *GeomapWidgetDefinitionView) UnmarshalJSON(bytes []byte) (err error) {
87
121
}
88
122
additionalProperties := make (map [string ]interface {})
89
123
if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
90
- datadog .DeleteKeys (additionalProperties , & []string {"focus" })
124
+ datadog .DeleteKeys (additionalProperties , & []string {"custom_extent" , " focus" })
91
125
} else {
92
126
return err
93
127
}
128
+ o .CustomExtent = all .CustomExtent
94
129
o .Focus = * all .Focus
95
130
96
131
if len (additionalProperties ) > 0 {
0 commit comments