diff --git a/.generated-info b/.generated-info index 48849a217087..8881de22dd97 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "3a6cb30", - "generated": "2025-08-12 15:41:18.406" + "spec_repo_commit": "6b8994f", + "generated": "2025-08-13 15:22:09.891" } diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index f6e0e21ed71a..88a12de4fc17 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -3446,9 +3446,25 @@ components: example: focus: WORLD properties: + custom_extent: + description: A custom extent of the map defined by an array of four numbers + in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`. + example: + - -30 + - -40 + - 40 + - 30 + items: + description: The longitudinal or latitudinal coordinates of the bounding + box. + format: double + type: number + maxItems: 4 + minItems: 4 + type: array focus: - description: The 2-letter ISO code of a country to focus the map on. Or - `WORLD`. + description: The ISO code of a country, sub-division, or region to focus + the map on. Or `WORLD`. Mutually exclusive with `custom_extent`. example: WORLD type: string required: diff --git a/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb b/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb index 8f2b0676c7b0..b49164605ea1 100644 --- a/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb +++ b/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb @@ -21,7 +21,10 @@ module DatadogAPIClient::V1 class GeomapWidgetDefinitionView include BaseGenericModel - # The 2-letter ISO code of a country to focus the map on. Or `WORLD`. + # A custom extent of the map defined by an array of four numbers in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`. + attr_reader :custom_extent + + # The ISO code of a country, sub-division, or region to focus the map on. Or `WORLD`. Mutually exclusive with `custom_extent`. attr_reader :focus attr_accessor :additional_properties @@ -30,6 +33,7 @@ class GeomapWidgetDefinitionView # @!visibility private def self.attribute_map { + :'custom_extent' => :'custom_extent', :'focus' => :'focus' } end @@ -38,6 +42,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'custom_extent' => :'Array', :'focus' => :'String' } end @@ -60,6 +65,12 @@ def initialize(attributes = {}) end } + if attributes.key?(:'custom_extent') + if (value = attributes[:'custom_extent']).is_a?(Array) + self.custom_extent = value + end + end + if attributes.key?(:'focus') self.focus = attributes[:'focus'] end @@ -69,10 +80,25 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@custom_extent.nil? && @custom_extent.length > 4 + return false if !@custom_extent.nil? && @custom_extent.length < 4 return false if @focus.nil? true end + # Custom attribute writer method with validation + # @param custom_extent [Object] Object to be assigned + # @!visibility private + def custom_extent=(custom_extent) + if !custom_extent.nil? && custom_extent.length > 4 + fail ArgumentError, 'invalid value for "custom_extent", number of items must be less than or equal to 4.' + end + if !custom_extent.nil? && custom_extent.length < 4 + fail ArgumentError, 'invalid value for "custom_extent", number of items must be greater than or equal to 4.' + end + @custom_extent = custom_extent + end + # Custom attribute writer method with validation # @param focus [Object] Object to be assigned # @!visibility private @@ -109,6 +135,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + custom_extent == o.custom_extent && focus == o.focus && additional_properties == o.additional_properties end @@ -117,7 +144,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [focus, additional_properties].hash + [custom_extent, focus, additional_properties].hash end end end