Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-08 20:00:44.120387",
"spec_repo_commit": "3e2afa30"
"regenerated": "2025-04-08 20:55:41.621292",
"spec_repo_commit": "21cf6edb"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-08 20:00:44.136063",
"spec_repo_commit": "3e2afa30"
"regenerated": "2025-04-08 20:55:41.637249",
"spec_repo_commit": "21cf6edb"
}
}
}
8 changes: 8 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17271,6 +17271,14 @@ components:
example: 0
format: int64
type: integer
ip_addresses:
description: The interface IP addresses
example:
- 1.1.1.1
- 1.1.1.2
items:
type: string
type: array
mac_address:
description: The interface MAC address
example: 00:00:00:00:00:00
Expand Down
18 changes: 18 additions & 0 deletions src/datadogV2/model/model_interface_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ pub struct InterfaceAttributes {
/// The interface index
#[serde(rename = "index")]
pub index: Option<i64>,
/// The interface IP addresses
#[serde(rename = "ip_addresses")]
pub ip_addresses: Option<Vec<String>>,
/// The interface MAC address
#[serde(rename = "mac_address")]
pub mac_address: Option<String>,
Expand All @@ -42,6 +45,7 @@ impl InterfaceAttributes {
alias: None,
description: None,
index: None,
ip_addresses: None,
mac_address: None,
name: None,
status: None,
Expand All @@ -65,6 +69,11 @@ impl InterfaceAttributes {
self
}

pub fn ip_addresses(mut self, value: Vec<String>) -> Self {
self.ip_addresses = Some(value);
self
}

pub fn mac_address(mut self, value: String) -> Self {
self.mac_address = Some(value);
self
Expand Down Expand Up @@ -115,6 +124,7 @@ impl<'de> Deserialize<'de> for InterfaceAttributes {
let mut alias: Option<String> = None;
let mut description: Option<String> = None;
let mut index: Option<i64> = None;
let mut ip_addresses: Option<Vec<String>> = None;
let mut mac_address: Option<String> = None;
let mut name: Option<String> = None;
let mut status: Option<crate::datadogV2::model::InterfaceAttributesStatus> = None;
Expand Down Expand Up @@ -145,6 +155,13 @@ impl<'de> Deserialize<'de> for InterfaceAttributes {
}
index = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"ip_addresses" => {
if v.is_null() {
continue;
}
ip_addresses =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"mac_address" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -184,6 +201,7 @@ impl<'de> Deserialize<'de> for InterfaceAttributes {
alias,
description,
index,
ip_addresses,
mac_address,
name,
status,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"response": {
"body": {
"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}}]}",
"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}}]}",
"encoding": null
},
"headers": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Feature: Network Device Monitoring
And the response "data[0].attributes.name" is equal to "if99"
And the response "data[0].attributes.description" is equal to "a network interface"
And the response "data[0].attributes.mac_address" is equal to "00:00:00:00:00:00"
And the response "data[0].attributes.ip_addresses" is equal to ["1.1.1.1","1.1.1.2"]
And the response "data[0].attributes.alias" is equal to "interface_99"
And the response "data[0].attributes.index" is equal to 99
And the response "data[0].attributes.status" is equal to "up"
Expand Down
Loading