Skip to content

Commit bd568bc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 21cf6edb of spec repo
1 parent 02adf54 commit bd568bc

File tree

5 files changed

+32
-5
lines changed

5 files changed

+32
-5
lines changed

.apigentools-info

+4-4
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-04-08 20:00:44.120387",
8-
"spec_repo_commit": "3e2afa30"
7+
"regenerated": "2025-04-08 20:55:41.621292",
8+
"spec_repo_commit": "21cf6edb"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-08 20:00:44.136063",
13-
"spec_repo_commit": "3e2afa30"
12+
"regenerated": "2025-04-08 20:55:41.637249",
13+
"spec_repo_commit": "21cf6edb"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -17271,6 +17271,14 @@ components:
1727117271
example: 0
1727217272
format: int64
1727317273
type: integer
17274+
ip_addresses:
17275+
description: The interface IP addresses
17276+
example:
17277+
- 1.1.1.1
17278+
- 1.1.1.2
17279+
items:
17280+
type: string
17281+
type: array
1727417282
mac_address:
1727517283
description: The interface MAC address
1727617284
example: 00:00:00:00:00:00

src/datadogV2/model/model_interface_attributes.rs

+18
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ pub struct InterfaceAttributes {
2020
/// The interface index
2121
#[serde(rename = "index")]
2222
pub index: Option<i64>,
23+
/// The interface IP addresses
24+
#[serde(rename = "ip_addresses")]
25+
pub ip_addresses: Option<Vec<String>>,
2326
/// The interface MAC address
2427
#[serde(rename = "mac_address")]
2528
pub mac_address: Option<String>,
@@ -42,6 +45,7 @@ impl InterfaceAttributes {
4245
alias: None,
4346
description: None,
4447
index: None,
48+
ip_addresses: None,
4549
mac_address: None,
4650
name: None,
4751
status: None,
@@ -65,6 +69,11 @@ impl InterfaceAttributes {
6569
self
6670
}
6771

72+
pub fn ip_addresses(mut self, value: Vec<String>) -> Self {
73+
self.ip_addresses = Some(value);
74+
self
75+
}
76+
6877
pub fn mac_address(mut self, value: String) -> Self {
6978
self.mac_address = Some(value);
7079
self
@@ -115,6 +124,7 @@ impl<'de> Deserialize<'de> for InterfaceAttributes {
115124
let mut alias: Option<String> = None;
116125
let mut description: Option<String> = None;
117126
let mut index: Option<i64> = None;
127+
let mut ip_addresses: Option<Vec<String>> = None;
118128
let mut mac_address: Option<String> = None;
119129
let mut name: Option<String> = None;
120130
let mut status: Option<crate::datadogV2::model::InterfaceAttributesStatus> = None;
@@ -145,6 +155,13 @@ impl<'de> Deserialize<'de> for InterfaceAttributes {
145155
}
146156
index = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
147157
}
158+
"ip_addresses" => {
159+
if v.is_null() {
160+
continue;
161+
}
162+
ip_addresses =
163+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
164+
}
148165
"mac_address" => {
149166
if v.is_null() {
150167
continue;
@@ -184,6 +201,7 @@ impl<'de> Deserialize<'de> for InterfaceAttributes {
184201
alias,
185202
description,
186203
index,
204+
ip_addresses,
187205
mac_address,
188206
name,
189207
status,

tests/scenarios/cassettes/v2/network_device_monitoring/Get-the-list-of-interfaces-of-the-device-returns-OK-response.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"response": {
1515
"body": {
16-
"string": "{\"data\":[{\"id\":\"default:1.2.3.4:99\",\"type\":\"interface\",\"attributes\":{\"name\":\"if99\",\"status\":\"up\",\"description\":\"a network interface\",\"mac_address\":\"00:00:00:00:00:00\",\"alias\":\"interface_99\",\"index\":99}},{\"id\":\"default:1.2.3.4:999\",\"type\":\"interface\",\"attributes\":{\"name\":\"if999\",\"status\":\"down\",\"description\":\"another network interface\",\"mac_address\":\"99:99:99:99:99:99\",\"alias\":\"interface_999\",\"index\":999}}]}",
16+
"string": "{\"data\":[{\"id\":\"default:1.2.3.4:99\",\"type\":\"interface\",\"attributes\":{\"name\":\"if99\",\"status\":\"up\",\"description\":\"a network interface\",\"mac_address\":\"00:00:00:00:00:00\",\"ip_addresses\":[\"1.1.1.1\",\"1.1.1.2\"],\"alias\":\"interface_99\",\"index\":99}},{\"id\":\"default:1.2.3.4:999\",\"type\":\"interface\",\"attributes\":{\"name\":\"if999\",\"status\":\"down\",\"description\":\"another network interface\",\"mac_address\":\"99:99:99:99:99:99\",\"alias\":\"interface_999\",\"index\":999}}]}",
1717
"encoding": null
1818
},
1919
"headers": {

tests/scenarios/features/v2/network_device_monitoring.feature

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Feature: Network Device Monitoring
8686
And the response "data[0].attributes.name" is equal to "if99"
8787
And the response "data[0].attributes.description" is equal to "a network interface"
8888
And the response "data[0].attributes.mac_address" is equal to "00:00:00:00:00:00"
89+
And the response "data[0].attributes.ip_addresses" is equal to ["1.1.1.1","1.1.1.2"]
8990
And the response "data[0].attributes.alias" is equal to "interface_99"
9091
And the response "data[0].attributes.index" is equal to 99
9192
And the response "data[0].attributes.status" is equal to "up"

0 commit comments

Comments
 (0)