Skip to content

Commit 9934559

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3211ca1b of spec repo
1 parent d4f657a commit 9934559

File tree

5 files changed

+60
-14
lines changed

5 files changed

+60
-14
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:17.758022",
8-
"spec_repo_commit": "76086f13"
7+
"regenerated": "2025-06-26 21:05:33.041204",
8+
"spec_repo_commit": "3211ca1b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-26 17:56:17.774479",
13-
"spec_repo_commit": "76086f13"
12+
"regenerated": "2025-06-26 21:05:33.057660",
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.

examples/v1_dashboards_CreateDashboard_3513586382.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async fn main() {
5858
.response_format(FormulaAndFunctionResponseFormat::EVENT_LIST)],
5959
GeomapWidgetDefinitionStyle::new("hostmap_blues".to_string(), false),
6060
GeomapWidgetDefinitionType::GEOMAP,
61-
GeomapWidgetDefinitionView::new("WORLD".to_string()),
61+
GeomapWidgetDefinitionView::new().focus("WORLD".to_string()),
6262
)
6363
.title("".to_string())
6464
.title_align(WidgetTextAlign::LEFT)

examples/v1_dashboards_CreateDashboard_915214113.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async fn main() {
103103
],
104104
GeomapWidgetDefinitionStyle::new("hostmap_blues".to_string(), false),
105105
GeomapWidgetDefinitionType::GEOMAP,
106-
GeomapWidgetDefinitionView::new("WORLD".to_string()),
106+
GeomapWidgetDefinitionView::new().focus("WORLD".to_string()),
107107
)
108108
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
109109
.title("".to_string())

src/datadogV1/model/model_geomap_widget_definition_view.rs

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ use std::fmt::{self, Formatter};
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct GeomapWidgetDefinitionView {
14-
/// The 2-letter ISO code of a country to focus the map on. Or `WORLD`.
14+
/// A custom extent of the map defined by an array of four numbers in the order `[minLongitude, minLatitude, maxLongitude, maxLatitude]`. Mutually exclusive with `focus`.
15+
#[serde(rename = "custom_extent")]
16+
pub custom_extent: Option<Vec<f64>>,
17+
/// The 2-letter ISO code of a country to focus the map on. Or `WORLD`. Mutually exclusive with `custom_extent`.
1518
#[serde(rename = "focus")]
16-
pub focus: String,
19+
pub focus: Option<String>,
1720
#[serde(flatten)]
1821
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
1922
#[serde(skip)]
@@ -22,14 +25,25 @@ pub struct GeomapWidgetDefinitionView {
2225
}
2326

2427
impl GeomapWidgetDefinitionView {
25-
pub fn new(focus: String) -> GeomapWidgetDefinitionView {
28+
pub fn new() -> GeomapWidgetDefinitionView {
2629
GeomapWidgetDefinitionView {
27-
focus,
30+
custom_extent: None,
31+
focus: None,
2832
additional_properties: std::collections::BTreeMap::new(),
2933
_unparsed: false,
3034
}
3135
}
3236

37+
pub fn custom_extent(mut self, value: Vec<f64>) -> Self {
38+
self.custom_extent = Some(value);
39+
self
40+
}
41+
42+
pub fn focus(mut self, value: String) -> Self {
43+
self.focus = Some(value);
44+
self
45+
}
46+
3347
pub fn additional_properties(
3448
mut self,
3549
value: std::collections::BTreeMap<String, serde_json::Value>,
@@ -39,6 +53,12 @@ impl GeomapWidgetDefinitionView {
3953
}
4054
}
4155

56+
impl Default for GeomapWidgetDefinitionView {
57+
fn default() -> Self {
58+
Self::new()
59+
}
60+
}
61+
4262
impl<'de> Deserialize<'de> for GeomapWidgetDefinitionView {
4363
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
4464
where
@@ -56,6 +76,7 @@ impl<'de> Deserialize<'de> for GeomapWidgetDefinitionView {
5676
where
5777
M: MapAccess<'a>,
5878
{
79+
let mut custom_extent: Option<Vec<f64>> = None;
5980
let mut focus: Option<String> = None;
6081
let mut additional_properties: std::collections::BTreeMap<
6182
String,
@@ -65,7 +86,17 @@ impl<'de> Deserialize<'de> for GeomapWidgetDefinitionView {
6586

6687
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
6788
match k.as_str() {
89+
"custom_extent" => {
90+
if v.is_null() {
91+
continue;
92+
}
93+
custom_extent =
94+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
95+
}
6896
"focus" => {
97+
if v.is_null() {
98+
continue;
99+
}
69100
focus = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
70101
}
71102
&_ => {
@@ -75,9 +106,9 @@ impl<'de> Deserialize<'de> for GeomapWidgetDefinitionView {
75106
}
76107
}
77108
}
78-
let focus = focus.ok_or_else(|| M::Error::missing_field("focus"))?;
79109

80110
let content = GeomapWidgetDefinitionView {
111+
custom_extent,
81112
focus,
82113
additional_properties,
83114
_unparsed,

0 commit comments

Comments
 (0)