@@ -21,6 +21,9 @@ module DatadogAPIClient::V1
2121 class GeomapWidgetDefinitionView
2222 include BaseGenericModel
2323
24+ # A custom extent of the map defined by an array of four numbers in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`.
25+ attr_reader :custom_extent
26+
2427 # The 2-letter ISO code of a country to focus the map on. Or `WORLD`.
2528 attr_reader :focus
2629
@@ -30,6 +33,7 @@ class GeomapWidgetDefinitionView
3033 # @!visibility private
3134 def self . attribute_map
3235 {
36+ :'custom_extent' => :'custom_extent' ,
3337 :'focus' => :'focus'
3438 }
3539 end
@@ -38,6 +42,7 @@ def self.attribute_map
3842 # @!visibility private
3943 def self . openapi_types
4044 {
45+ :'custom_extent' => :'Array<Float>' ,
4146 :'focus' => :'String'
4247 }
4348 end
@@ -60,6 +65,12 @@ def initialize(attributes = {})
6065 end
6166 }
6267
68+ if attributes . key? ( :'custom_extent' )
69+ if ( value = attributes [ :'custom_extent' ] ) . is_a? ( Array )
70+ self . custom_extent = value
71+ end
72+ end
73+
6374 if attributes . key? ( :'focus' )
6475 self . focus = attributes [ :'focus' ]
6576 end
@@ -69,10 +80,25 @@ def initialize(attributes = {})
6980 # @return true if the model is valid
7081 # @!visibility private
7182 def valid?
83+ return false if !@custom_extent . nil? && @custom_extent . length > 4
84+ return false if !@custom_extent . nil? && @custom_extent . length < 4
7285 return false if @focus . nil?
7386 true
7487 end
7588
89+ # Custom attribute writer method with validation
90+ # @param custom_extent [Object] Object to be assigned
91+ # @!visibility private
92+ def custom_extent = ( custom_extent )
93+ if !custom_extent . nil? && custom_extent . length > 4
94+ fail ArgumentError , 'invalid value for "custom_extent", number of items must be less than or equal to 4.'
95+ end
96+ if !custom_extent . nil? && custom_extent . length < 4
97+ fail ArgumentError , 'invalid value for "custom_extent", number of items must be greater than or equal to 4.'
98+ end
99+ @custom_extent = custom_extent
100+ end
101+
76102 # Custom attribute writer method with validation
77103 # @param focus [Object] Object to be assigned
78104 # @!visibility private
@@ -109,6 +135,7 @@ def to_hash
109135 def ==( o )
110136 return true if self . equal? ( o )
111137 self . class == o . class &&
138+ custom_extent == o . custom_extent &&
112139 focus == o . focus &&
113140 additional_properties == o . additional_properties
114141 end
@@ -117,7 +144,7 @@ def ==(o)
117144 # @return [Integer] Hash code
118145 # @!visibility private
119146 def hash
120- [ focus , additional_properties ] . hash
147+ [ custom_extent , focus , additional_properties ] . hash
121148 end
122149 end
123150end
0 commit comments