8
8
9
9
import com .fasterxml .jackson .annotation .JsonAnyGetter ;
10
10
import com .fasterxml .jackson .annotation .JsonAnySetter ;
11
- import com .fasterxml .jackson .annotation .JsonCreator ;
12
11
import com .fasterxml .jackson .annotation .JsonIgnore ;
13
12
import com .fasterxml .jackson .annotation .JsonInclude ;
14
13
import com .fasterxml .jackson .annotation .JsonProperty ;
15
14
import com .fasterxml .jackson .annotation .JsonPropertyOrder ;
15
+ import java .util .ArrayList ;
16
16
import java .util .HashMap ;
17
+ import java .util .List ;
17
18
import java .util .Map ;
18
19
import java .util .Objects ;
19
20
20
21
/** The view of the world that the map should render. */
21
- @ JsonPropertyOrder ({GeomapWidgetDefinitionView .JSON_PROPERTY_FOCUS })
22
+ @ JsonPropertyOrder ({
23
+ GeomapWidgetDefinitionView .JSON_PROPERTY_CUSTOM_EXTENT ,
24
+ GeomapWidgetDefinitionView .JSON_PROPERTY_FOCUS
25
+ })
22
26
@ jakarta .annotation .Generated (
23
27
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator" )
24
28
public class GeomapWidgetDefinitionView {
25
29
@ JsonIgnore public boolean unparsed = false ;
30
+ public static final String JSON_PROPERTY_CUSTOM_EXTENT = "custom_extent" ;
31
+ private List <Double > customExtent = null ;
32
+
26
33
public static final String JSON_PROPERTY_FOCUS = "focus" ;
27
34
private String focus ;
28
35
29
- public GeomapWidgetDefinitionView () {}
36
+ public GeomapWidgetDefinitionView customExtent (List <Double > customExtent ) {
37
+ this .customExtent = customExtent ;
38
+ return this ;
39
+ }
30
40
31
- @ JsonCreator
32
- public GeomapWidgetDefinitionView (
33
- @ JsonProperty (required = true , value = JSON_PROPERTY_FOCUS ) String focus ) {
34
- this .focus = focus ;
41
+ public GeomapWidgetDefinitionView addCustomExtentItem (Double customExtentItem ) {
42
+ if (this .customExtent == null ) {
43
+ this .customExtent = new ArrayList <>();
44
+ }
45
+ this .customExtent .add (customExtentItem );
46
+ return this ;
47
+ }
48
+
49
+ /**
50
+ * A custom extent of the map defined by an array of four numbers in the order <code>
51
+ * [minLongitude, minLatitude, maxLongitude, maxLatitude]</code>. Mutually exclusive with <code>
52
+ * focus</code>.
53
+ *
54
+ * @return customExtent
55
+ */
56
+ @ jakarta .annotation .Nullable
57
+ @ JsonProperty (JSON_PROPERTY_CUSTOM_EXTENT )
58
+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
59
+ public List <Double > getCustomExtent () {
60
+ return customExtent ;
61
+ }
62
+
63
+ public void setCustomExtent (List <Double > customExtent ) {
64
+ this .customExtent = customExtent ;
35
65
}
36
66
37
67
public GeomapWidgetDefinitionView focus (String focus ) {
@@ -40,12 +70,14 @@ public GeomapWidgetDefinitionView focus(String focus) {
40
70
}
41
71
42
72
/**
43
- * The 2-letter ISO code of a country to focus the map on. Or <code>WORLD</code>.
73
+ * The 2-letter ISO code of a country to focus the map on. Or <code>WORLD</code>. Mutually
74
+ * exclusive with <code>custom_extent</code>.
44
75
*
45
76
* @return focus
46
77
*/
78
+ @ jakarta .annotation .Nullable
47
79
@ JsonProperty (JSON_PROPERTY_FOCUS )
48
- @ JsonInclude (value = JsonInclude .Include .ALWAYS )
80
+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
49
81
public String getFocus () {
50
82
return focus ;
51
83
}
@@ -110,20 +142,22 @@ public boolean equals(Object o) {
110
142
return false ;
111
143
}
112
144
GeomapWidgetDefinitionView geomapWidgetDefinitionView = (GeomapWidgetDefinitionView ) o ;
113
- return Objects .equals (this .focus , geomapWidgetDefinitionView .focus )
145
+ return Objects .equals (this .customExtent , geomapWidgetDefinitionView .customExtent )
146
+ && Objects .equals (this .focus , geomapWidgetDefinitionView .focus )
114
147
&& Objects .equals (
115
148
this .additionalProperties , geomapWidgetDefinitionView .additionalProperties );
116
149
}
117
150
118
151
@ Override
119
152
public int hashCode () {
120
- return Objects .hash (focus , additionalProperties );
153
+ return Objects .hash (customExtent , focus , additionalProperties );
121
154
}
122
155
123
156
@ Override
124
157
public String toString () {
125
158
StringBuilder sb = new StringBuilder ();
126
159
sb .append ("class GeomapWidgetDefinitionView {\n " );
160
+ sb .append (" customExtent: " ).append (toIndentedString (customExtent )).append ("\n " );
127
161
sb .append (" focus: " ).append (toIndentedString (focus )).append ("\n " );
128
162
sb .append (" additionalProperties: " )
129
163
.append (toIndentedString (additionalProperties ))
0 commit comments